Sha256: effb15036ec841a448bd434ab1050d0ae7dac77b6009378fb2a76bc6d7c2779d

Contents?: true

Size: 1.63 KB

Versions: 8

Compression:

Stored size: 1.63 KB

Contents

module RubyApp

  module Elements

    module Pages

      module TestPages
        require 'ruby_app'
        require 'ruby_app/elements'

        class ListTestPage < RubyApp::Elements::Pages::BlankPage

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

          def initialize
            super

            @markdown = RubyApp::Elements::Markdown.new

            @list = RubyApp::Elements::List.new
            @list.items += [ 'Item 01',
                             'Item 02',
                             'Item 03',
                             'Item 04',
                             'Item 05' ]
            @list.clicked do |element, event|
              RubyApp::Session.show_dialog(event, RubyApp::Elements::Dialogs::MessageDialog.new(self.translate.message_dialog.message.title,
                                                                                                self.translate.message_dialog.message.message(event.item)))
            end

            @select = RubyApp::Elements::Lists::Select.new
            @select.items += [ 'Item 11',
                               'Item 12',
                               'Item 13',
                               'Item 14',
                               'Item 15' ]
            @select.clicked do |element, event|
              RubyApp::Session.show_dialog(event, RubyApp::Elements::Dialogs::MessageDialog.new(self.translate.message_dialog.message.title,
                                                                                                self.translate.message_dialog.message.message(@select.selected_item)))
            end

          end

        end

      end

    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
RubyApp-0.2.7 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.2.6 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.2.5 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.2.4 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.2.3 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.2.2 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.2.1 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.2.0 lib/ruby_app/elements/pages/test_pages/list_test_page.rb