Sha256: c5b61821ef7ab6598476cfb39d41792ad64241c3e9c70d0aa7a4be3e89f81eb3

Contents?: true

Size: 717 Bytes

Versions: 48

Compression:

Stored size: 717 Bytes

Contents

InlineForms::SPECIAL_COLUMN_TYPES[:datetime_select]=:date

# datetime
def datetime_select_show(object, attribute)
  link_to_inline_edit object, attribute, object.send(attribute)
end

def datetime_select_edit(object, attribute)
  css_id = 'datepicker_' + object.class.to_s.underscore + '_' + object.id.to_s + '_' + attribute.to_s
  out = text_field_tag attribute, object[attribute], :id => css_id
  out << '<SCRIPT>'.html_safe
  out << "$(function() { ".html_safe
  out << '$("#'.html_safe + css_id.html_safe + '").datepicker();'.html_safe
  out << '});'.html_safe
  out << '</SCRIPT>'.html_safe
  return out
end

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

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
inline_forms-1.2.2 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.2.1 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.2.0 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.1.20 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.1.19 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.1.18 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.1.17 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.1.16 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.1.15 lib/app/helpers/form_elements/datetime.rb
inline_forms-1.1.13 app/helpers/form_elements/datetime.rb
inline_forms-1.1.12 app/helpers/form_elements/datetime.rb
inline_forms-1.1.11 app/helpers/form_elements/datetime.rb
inline_forms-1.1.10 app/helpers/form_elements/datetime.rb
inline_forms-1.1.9 app/helpers/form_elements/datetime.rb
inline_forms-1.1.8 app/helpers/form_elements/datetime.rb
inline_forms-1.1.7 app/helpers/form_elements/datetime.rb
inline_forms-1.1.6 app/helpers/form_elements/datetime.rb
inline_forms-1.1.5 app/helpers/form_elements/datetime.rb
inline_forms-1.1.4 app/helpers/form_elements/datetime.rb
inline_forms-1.1.3 app/helpers/form_elements/datetime.rb