Sha256: a2ae1517a792dc2e52a32fd6ba5db433b6ef9463187f675e11f42c3e88c8a79a

Contents?: true

Size: 1.63 KB

Versions: 65

Compression:

Stored size: 1.63 KB

Contents

module RubyApp

  module Elements

    module Mobile

      module Default

        module Features
          require 'ruby_app/elements/mobile/dialogs/acknowledgement_dialog'
          require 'ruby_app/elements/mobile/list'
          require 'ruby_app/elements/mobile/navigation/back_button'
          require 'ruby_app/elements/mobile/page'

          class ListsPage < RubyApp::Elements::Mobile::Page

            template_path(:all, File.dirname(__FILE__))

            def initialize
              super

              @back_button = RubyApp::Elements::Mobile::Navigation::BackButton.new

              @list = RubyApp::Elements::Mobile::List.new
              @list.attributes.merge!('data-inset' => 'true')
              @list.items += [  RubyApp::Elements::Mobile::List::ListDivider.new('List') ]
              @list.items += [  'Item 01',
                                'Item 02',
                                'Item 03',
                                'Item 04',
                                'Item 05' ].collect { |item| RubyApp::Elements::Mobile::List::ListSplitItem.new(item) }

              @list.item_clicked do |element, event|
                RubyApp::Elements::Mobile::Dialog.show(event, RubyApp::Elements::Mobile::Dialogs::AcknowledgementDialog.new('List', "You clicked the item #{event.item.item}."))
              end
              @list.link_clicked do |element, event|
                RubyApp::Elements::Mobile::Dialog.show(event, RubyApp::Elements::Mobile::Dialogs::AcknowledgementDialog.new('List', "You clicked the link #{event.item.item}."))
              end

            end

          end

        end

      end

    end

  end

end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
RubyApp-0.6.24 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.22 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.21 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.16 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.12 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.11 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.10 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.8 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.7 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.2 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.6.1 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.95 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.99 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.98 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.97 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.96 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.94 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.93 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.92 lib/ruby_app/elements/mobile/default/features/lists_page.rb
RubyApp-0.5.91 lib/ruby_app/elements/mobile/default/features/lists_page.rb