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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43961eaf9fb1309ecddeb9746df143c64896d5db
|
4
|
+
data.tar.gz: 2ef9957432d56f235c59b17a9a0be7b7fdcd6c67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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:
|
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
|
-
|
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
|
-
|
28
|
+
cktext_area_tag( attribute,
|
28
29
|
object[attribute],
|
29
|
-
:id => "
|
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'
|
data/lib/inline_forms/version.rb
CHANGED