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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac6d8d7d56162dfe2d6d64c552aa4f350455516c
4
- data.tar.gz: b015c5dc8c22a327ccc95caa48e183bc1ddda6a3
3
+ metadata.gz: 69b8177a1d3704afd9395e7e99aa2f3c7aa0848e
4
+ data.tar.gz: 70c5027a2f387e257743e6affa5ff32eb79508a1
5
5
  SHA512:
6
- metadata.gz: a675c387e726ab1fb93660c89a037160d4979703b935301159a700b60f60b2dd17ddc37d524a59a55c4ba54c834d7731c429c2e5fe79374948e63ba188ae7ea6
7
- data.tar.gz: 1134bafbd3804a966c7ea3def02dbd879427da8e4948177272a7c4b8c37ae163aede21016f77f48e64543a61239e6f53a37ad935742dc54edc9ac8379cfba5f5
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 defined? Ckeditor
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
- link_to_inline_edit object, attribute, object[attribute]
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
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "3.2.5"
3
+ VERSION = "3.2.6"
4
4
  end
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.5
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-28 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rvm