Sha256: b81cdc9deb586085f163d83f92b7862b8888093a7405c40b316193ab76690014

Contents?: true

Size: 1.22 KB

Versions: 56

Compression:

Stored size: 1.22 KB

Contents

InlineForms::SPECIAL_COLUMN_TYPES[:text_area]=:text

def text_area_show(object, attribute)
  if defined? Ckeditor
    link_to_inline_edit object,
      attribute,
      '<div class="ckeditor_area">'.html_safe +
      cktext_area_tag(
      attribute,
      object[attribute],
      :input_html => { :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
        :width => '100%' },
      :height => '200px',
      :toolbar => "None",
      :readOnly => "true",
      :resize_enabled => "false",
      :toolbarCanCollapse => "false"
    ) +
      image_tag(  'glass_plate.gif',
      :class => "glass_plate",
      :title => '' ) +
      '</div>'.html_safe
  else
    link_to_inline_edit object, attribute, object[attribute]
  end
end

def text_area_edit(object, attribute)
  if defined? Ckeditor
    cktext_area_tag(
      attribute,
      object[attribute],
      :input_html => { :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
        :width => '100%'},
      :height => '200px'
    )
  else
    text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
  end
end

def text_area_update(object, attribute)
  object[attribute.to_sym] = params[attribute.to_sym]
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
inline_forms-1.1.16 lib/app/helpers/form_elements/text_area.rb
inline_forms-1.1.15 lib/app/helpers/form_elements/text_area.rb
inline_forms-1.1.13 app/helpers/form_elements/text_area.rb
inline_forms-1.1.12 app/helpers/form_elements/text_area.rb
inline_forms-1.1.11 app/helpers/form_elements/text_area.rb
inline_forms-1.1.10 app/helpers/form_elements/text_area.rb
inline_forms-1.1.9 app/helpers/form_elements/text_area.rb
inline_forms-1.1.8 app/helpers/form_elements/text_area.rb
inline_forms-1.1.7 app/helpers/form_elements/text_area.rb
inline_forms-1.1.6 app/helpers/form_elements/text_area.rb
inline_forms-1.1.5 app/helpers/form_elements/text_area.rb
inline_forms-1.1.4 app/helpers/form_elements/text_area.rb
inline_forms-1.1.3 app/helpers/form_elements/text_area.rb
inline_forms-1.1.2 app/helpers/form_elements/text_area.rb
inline_forms-1.1.1 app/helpers/form_elements/text_area.rb
inline_forms-1.1.0 app/helpers/form_elements/text_area.rb
inline_forms-1.0.19 app/helpers/form_elements/text_area.rb
inline_forms-1.0.18 app/helpers/form_elements/text_area.rb
inline_forms-1.0.17 app/helpers/form_elements/text_area.rb
inline_forms-1.0.16 app/helpers/form_elements/text_area.rb