inline_forms 3.2.5 → 3.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app/helpers/form_elements/text_area.rb +27 -23
- data/lib/inline_forms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69b8177a1d3704afd9395e7e99aa2f3c7aa0848e
|
4
|
+
data.tar.gz: 70c5027a2f387e257743e6affa5ff32eb79508a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0d90ebc1df9a0a73f6e0326a08becb67f2191d03f6b9b875afedaecc8aa8cfd3371e44b1c663f4ebb7604a9eb7889cd1380e7c1e89d1daf4bdb294155c0527
|
7
|
+
data.tar.gz: eccfc4b5cd9a336f02022642aeb733ecf57554eae36063cd8cad857d8d3d4f575f5dfbac4ec1799dc71b696d3d0572434627bbedd36430f249cf3990aba4d9fe
|
@@ -2,29 +2,33 @@
|
|
2
2
|
InlineForms::SPECIAL_COLUMN_TYPES[:text_area]=:text
|
3
3
|
|
4
4
|
def text_area_show(object, attribute)
|
5
|
-
if
|
6
|
-
link_to_inline_edit object,
|
7
|
-
attribute,
|
8
|
-
'<div class="ckeditor_area">'.html_safe +
|
9
|
-
cktext_area_tag(
|
10
|
-
attribute,
|
11
|
-
object[attribute],
|
12
|
-
:id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
|
13
|
-
:ckeditor => { :width => '100%',
|
14
|
-
:height => '200px',
|
15
|
-
:toolbar => "None",
|
16
|
-
:readOnly => "true",
|
17
|
-
:resize_enabled => "false",
|
18
|
-
:toolbarCanCollapse => "false"
|
19
|
-
}
|
20
|
-
) +
|
21
|
-
image_tag( 'glass_plate.gif',
|
22
|
-
:class => "glass_plate",
|
23
|
-
:title => '' ) +
|
24
|
-
"<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe +
|
25
|
-
'</div>'.html_safe
|
5
|
+
if object.send(attribute).blank?
|
6
|
+
link_to_inline_edit object, attribute, "<i class='fi-plus'></i>".html_safe
|
26
7
|
else
|
27
|
-
|
8
|
+
if defined? Ckeditor
|
9
|
+
link_to_inline_edit object,
|
10
|
+
attribute,
|
11
|
+
'<div class="ckeditor_area">'.html_safe +
|
12
|
+
cktext_area_tag(
|
13
|
+
attribute,
|
14
|
+
object[attribute],
|
15
|
+
:id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
|
16
|
+
:ckeditor => { :width => '100%',
|
17
|
+
:height => '200px',
|
18
|
+
:toolbar => "None",
|
19
|
+
:readOnly => "true",
|
20
|
+
:resize_enabled => "false",
|
21
|
+
:toolbarCanCollapse => "false"
|
22
|
+
}
|
23
|
+
) +
|
24
|
+
image_tag( 'glass_plate.gif',
|
25
|
+
:class => "glass_plate",
|
26
|
+
:title => '' ) +
|
27
|
+
"<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe +
|
28
|
+
'</div>'.html_safe
|
29
|
+
else
|
30
|
+
link_to_inline_edit object, attribute, object[attribute]
|
31
|
+
end
|
28
32
|
end
|
29
33
|
end
|
30
34
|
|
@@ -38,7 +42,7 @@ def text_area_edit(object, attribute)
|
|
38
42
|
:height => '200px'
|
39
43
|
}
|
40
44
|
) +
|
41
|
-
"<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe
|
45
|
+
"<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe
|
42
46
|
else
|
43
47
|
text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
|
44
48
|
end
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ace Suares
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rvm
|