Sha256: 024b8dec083858d580c839a97ecc07d3949d2498187940bb6ed626e047e6d7f2

Contents?: true

Size: 580 Bytes

Versions: 12

Compression:

Stored size: 580 Bytes

Contents

module MotionPrime
  class SelectFieldSection < BaseFieldSection
    element :label, type: :label do
      options[:label] || {}
    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

12 entries across 12 versions & 1 rubygems

Version Path
motion-prime-0.7.2 motion-prime/sections/form/select_field_section.rb
motion-prime-0.7.1 motion-prime/sections/form/select_field_section.rb
motion-prime-0.4.5 motion-prime/sections/form/select_field_section.rb
motion-prime-0.4.4 motion-prime/sections/form/select_field_section.rb
motion-prime-0.4.3 motion-prime/sections/form/select_field_section.rb
motion-prime-0.4.2 motion-prime/sections/form/select_field_section.rb
motion-prime-0.4.1 motion-prime/sections/form/select_field_section.rb
motion-prime-0.4.0 motion-prime/sections/form/select_field_section.rb
motion-prime-0.3.3 motion-prime/sections/form/select_field_section.rb
motion-prime-0.3.2 motion-prime/sections/form/select_field_section.rb
motion-prime-0.3.1 motion-prime/sections/form/select_field_section.rb
motion-prime-0.3.0 motion-prime/sections/form/select_field_section.rb