Sha256: 6f297f08f7cca2fa0dad40b5a62dc0cfa3634275dd58eb066a56038eededa9fa

Contents?: true

Size: 580 Bytes

Versions: 11

Compression:

Stored size: 580 Bytes

Contents

module MotionPrime
  class SelectFieldSection < BaseFieldSection
    element :label, type: :label do
      default_label_options
    end
    element :button, type: :button do
      options[:button] || {}
    end
    element :arrow, type: :image do
      options[:arrow] || {}
    end
    element :error_message, type: :error_message, text: proc { observing_errors? and all_errors.join("\n") }

    after_render :bind_select_button

    def bind_select_button
      view(:button).on :touch_down do
        form.send(options[:action]) if options[:action]
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
motion-prime-0.8.10 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.9 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.8 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.7 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.6 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.5 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.4 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.3 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.2 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.1 motion-prime/sections/form/select_field_section.rb
motion-prime-0.8.0 motion-prime/sections/form/select_field_section.rb