inline_forms 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.8
1
+ 0.9.9
@@ -1,22 +1,42 @@
1
1
  InlineForms::SPECIAL_COLUMN_TYPES[:text_area]=:text
2
2
 
3
3
  def text_area_show(object, attribute)
4
- link_to_inline_edit object,
5
- attribute,
6
- ckeditor_textarea( object.class,
7
- attribute,
8
- :width => '100%',
9
- :height => '200px',
10
- :value => object[attribute],
11
- :toolbar => "None",
12
- :resize_enabled => "false",
13
- :toolbarCanCollapse => false ) +
14
- raw('<img class="window_pane" src="/images/clear.gif" />')
4
+ if defined? Ckeditor
5
+ link_to_inline_edit object,
6
+ attribute,
7
+ ckeditor_textarea(
8
+ object.class,
9
+ attribute,
10
+ :value => object[attribute],
11
+ :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
12
+ :width => '100%',
13
+ :ckeditor_options => {
14
+ :height => '200px',
15
+ :toolbar => "None",
16
+ :readOnly => "true",
17
+ :resize_enabled => "false",
18
+ :toolbarCanCollapse => "false"
19
+ }
20
+ )
21
+ else
22
+ link_to_inline_edit object, attribute, object[attribute]
23
+ end
15
24
  end
16
25
 
17
26
  def text_area_edit(object, attribute)
18
- # text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
19
- ckeditor_textarea(object.class, attribute, :width => '100%', :height => '200px', :value => object[attribute], :name => attribute )
27
+ if defined? Ckeditor
28
+ ckeditor_textarea(
29
+ object.class,
30
+ attribute,
31
+ :value => object[attribute],
32
+ :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
33
+ :width => '100%',
34
+ :height => '200px',
35
+ :name => attribute
36
+ )
37
+ else
38
+ text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
39
+ end
20
40
  end
21
41
 
22
42
  def text_area_update(object, attribute)
data/inline_forms.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{inline_forms}
8
- s.version = "0.9.8"
8
+ s.version = "0.9.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ace Suares"]
12
- s.date = %q{2011-05-29}
12
+ s.date = %q{2011-05-30}
13
13
  s.description = %q{Inline Forms aims to ease the setup of forms that provide inline editing. The field list can be specified in the model.}
14
14
  s.email = %q{ace@suares.an}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 41
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 8
10
- version: 0.9.8
9
+ - 9
10
+ version: 0.9.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ace Suares
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-29 00:00:00 -04:00
18
+ date: 2011-05-30 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency