hallo_rails 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/hallo_rails/version.rb +1 -1
- data/lib/hallo_rails.rb +20 -15
- data/vendor/assets/stylesheets/hallo_rails.css.scss +9 -5
- metadata +3 -3
data/lib/hallo_rails/version.rb
CHANGED
data/lib/hallo_rails.rb
CHANGED
@@ -24,14 +24,17 @@ module HalloRails
|
|
24
24
|
blank_text: "<i>Click to Edit</i>".html_safe
|
25
25
|
|
26
26
|
options[:content] = sanitize(options[:content]) if options[:sanitize]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
|
28
|
+
content_tag( :div, class: 'editable_wrapper') do
|
29
|
+
content_tag options[:tag], options[:content].present? ? options[:content] : options[:blank_text],
|
30
|
+
class: "#{'editable' if !options.has_key?(:editable) or options[:editable]}",
|
31
|
+
id: "#{object_name}_#{method.to_s}",
|
32
|
+
data: { update_url: options[:update_url],
|
33
|
+
model: object_name,
|
34
|
+
method: method.to_s,
|
35
|
+
editable_options: options[:hallo_options],
|
36
|
+
editable_plugins: options[:plugins] }.merge(options[:params] || {})
|
37
|
+
end
|
35
38
|
end
|
36
39
|
|
37
40
|
|
@@ -41,14 +44,16 @@ module HalloRails
|
|
41
44
|
content: object.send(method).try(:html_safe),
|
42
45
|
blank_text: "<i>Click to Edit</i>".html_safe
|
43
46
|
options[:content] = sanitize(options[:content]) if options[:sanitize]
|
44
|
-
content_tag(
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
content_tag( :div, class: 'editable_wrapper') do
|
48
|
+
content_tag( options[:tag], options[:content].present? ? options[:content] : options[:blank_text],
|
49
|
+
class: 'form_editable',
|
50
|
+
id: "#{object_name}_#{method.to_s}",
|
51
|
+
data: { model: object_name,
|
52
|
+
method: method.to_s,
|
53
|
+
editable_options: options[:hallo_options],
|
54
|
+
editable_plugins: options[:plugins] }.merge(options[:params] || {})) +
|
51
55
|
text_area_tag( "#{object_name}[#{method}]", options[:content], style: "display:none" )
|
56
|
+
end
|
52
57
|
end
|
53
58
|
|
54
59
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
@include border-radius;
|
3
3
|
border: 1px solid #AAA;
|
4
4
|
padding: 3px;
|
5
|
-
background-color:
|
5
|
+
background-color: white;
|
6
6
|
}
|
7
7
|
|
8
8
|
.dropdown-menu{
|
@@ -36,19 +36,23 @@
|
|
36
36
|
z-index: 10001 !important;
|
37
37
|
}
|
38
38
|
|
39
|
+
.editable_wrapper{
|
40
|
+
position: relative;
|
41
|
+
}
|
42
|
+
|
39
43
|
.editable:hover:before, .hallo_updating:before{
|
40
44
|
font-size: 14px;
|
41
45
|
color: orange;
|
42
46
|
display: block;
|
43
47
|
width: 100%;
|
44
48
|
height: 100%;
|
45
|
-
padding-top:
|
46
|
-
padding-bottom:
|
49
|
+
padding-top: 5px;
|
50
|
+
padding-bottom: 5px;
|
51
|
+
text-align: center;
|
52
|
+
z-index: 1;
|
47
53
|
position: absolute;
|
48
54
|
top: 0;
|
49
55
|
left: 0;
|
50
|
-
text-align: center;
|
51
|
-
z-index: 1;
|
52
56
|
background-color: white;
|
53
57
|
border: 1px dashed orange;
|
54
58
|
@include opacity(0.9);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hallo_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
segments:
|
62
62
|
- 0
|
63
|
-
hash:
|
63
|
+
hash: 4372135573006360911
|
64
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
version: '0'
|
70
70
|
segments:
|
71
71
|
- 0
|
72
|
-
hash:
|
72
|
+
hash: 4372135573006360911
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
75
|
rubygems_version: 1.8.24
|