inline_forms 3.0.43 → 3.0.44

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: 1643aeb3e3000ef29a76cb7f78a0f7c5aeacbe8c
4
- data.tar.gz: 2570fcde652f3a8535449a2cfc0d96863ac9f0c3
3
+ metadata.gz: 43961eaf9fb1309ecddeb9746df143c64896d5db
4
+ data.tar.gz: 2ef9957432d56f235c59b17a9a0be7b7fdcd6c67
5
5
  SHA512:
6
- metadata.gz: 9df7a7e563ecd85629ecbb93fd3742e65b1cc3d1415e7dce763da7035c870e79260a75ae674e5010b4bbd9a223f5e2157d510441b4b5608a8b134071665dae35
7
- data.tar.gz: a41413f393b6ae675f2a26ac9535c190ebca4d3c720066d9eb1eaba31600baac22091737cc495cb7758046d8041b51dd2fcf9d8933c1573f86ddb6ac6702b3a8
6
+ metadata.gz: 44313596241694f9f859a0317989e95e7609e597c6fdbfee878439386c2108a248957a3644437afa29bb0bb35bcda87e912a23ea86446778518b3fb07b80e4a8
7
+ data.tar.gz: 1e81648269722214a7c2e1b75e4d9669a16e69a33aac872725ed67bd6feeb76d1fe394d004e5b45e794f2beaa143d8ae9dd534f922937bdf1b6784da81179736
@@ -571,9 +571,9 @@ run 'git commit -a -m " * Initial"'
571
571
  # example
572
572
  if ENV['install_example'] == 'true'
573
573
  say "\nInstalling example application..."
574
- run 'bundle exec rails g inline_forms Photo name:string caption:string image:image_field description:text apartment:belongs_to _presentation:\'#{name}\'' # FIXME temporary changed because ckeditor is playing dirty
574
+ run 'bundle exec rails g inline_forms Photo name:string caption:string image:image_field description:ckeditor apartment:belongs_to _presentation:\'#{name}\'' # FIXME temporary changed because ckeditor is playing dirty
575
575
  run 'bundle exec rails generate uploader Image'
576
- run 'bundle exec rails g inline_forms Apartment name:string title:string description:text photos:has_many photos:associated _enabled:yes _presentation:\'#{name}\'' # FIXME temporary changed because ckeditor is playing dirty
576
+ run 'bundle exec rails g inline_forms Apartment name:string title:string description:ckeditor photos:has_many photos:associated _enabled:yes _presentation:\'#{name}\'' # FIXME temporary changed because ckeditor is playing dirty
577
577
  run 'bundle exec rake db:migrate'
578
578
  say '-Adding example test'
579
579
  create_file "spec/models/#{app_name}_example.rb", <<-END_EXAMPLE_TEST.strip_heredoc
@@ -5,7 +5,7 @@ def ckeditor_show(object, attribute)
5
5
  link_to_inline_edit object,
6
6
  attribute,
7
7
  '<div class="ckeditor_area">'.html_safe +
8
- ckckeditor_tag(
8
+ cktext_area_tag(
9
9
  attribute,
10
10
  object[attribute],
11
11
  :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
@@ -20,17 +20,19 @@ def ckeditor_show(object, attribute)
20
20
  image_tag( 'glass_plate.gif',
21
21
  :class => "glass_plate",
22
22
  :title => '' ) +
23
+ "<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe +
23
24
  '</div>'.html_safe
24
25
  end
25
26
 
26
27
  def ckeditor_edit(object, attribute)
27
- ckckeditor_tag( attribute,
28
+ cktext_area_tag( attribute,
28
29
  object[attribute],
29
- :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
30
+ :id => "textarea_rw_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
30
31
  :ckeditor => { :width => '100%',
31
32
  :height => '200px'
32
33
  }
33
- )
34
+ ) +
35
+ "<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe
34
36
  end
35
37
 
36
38
  def ckeditor_update(object, attribute)
@@ -2,7 +2,7 @@
2
2
  InlineForms::SPECIAL_COLUMN_TYPES[:text_area]=:text
3
3
 
4
4
  def text_area_show(object, attribute)
5
- if defined? Ckeditor
5
+ if defined? Ckeditor
6
6
  link_to_inline_edit object,
7
7
  attribute,
8
8
  '<div class="ckeditor_area">'.html_safe +
@@ -21,6 +21,7 @@ def text_area_show(object, attribute)
21
21
  image_tag( 'glass_plate.gif',
22
22
  :class => "glass_plate",
23
23
  :title => '' ) +
24
+ "<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe +
24
25
  '</div>'.html_safe
25
26
  else
26
27
  link_to_inline_edit object, attribute, object[attribute]
@@ -35,7 +36,9 @@ def text_area_edit(object, attribute)
35
36
  :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
36
37
  :ckeditor => { :width => '100%',
37
38
  :height => '200px'
38
- }
39
+ } +
40
+ "<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe
41
+
39
42
  )
40
43
  else
41
44
  text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "3.0.43"
3
+ VERSION = "3.0.44"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.43
4
+ version: 3.0.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares