Sha256: 8f0b5a7e2997eb874a034bbed8aa6af5a2849cea4cf38bdb55309c8db10f7d12

Contents?: true

Size: 1.83 KB

Versions: 42

Compression:

Stored size: 1.83 KB

Contents

module RubyApp

  module Elements

    module Pages

      module TestPages
        require 'ruby_app/elements/dialogs/message_dialog'
        require 'ruby_app/elements/markdown'
        require 'ruby_app/elements/pages/blank_page'
        require 'ruby_app/elements/list'
        require 'ruby_app/elements/lists/select'
        require 'ruby_app/session'

        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

42 entries across 42 versions & 1 rubygems

Version Path
RubyApp-0.0.71 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.70 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.69 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.68 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.64 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.63 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.62 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.61 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.60 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.59 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.58 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.57 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.56 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.55 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.54 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.53 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.52 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.51 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.50 lib/ruby_app/elements/pages/test_pages/list_test_page.rb
RubyApp-0.0.49 lib/ruby_app/elements/pages/test_pages/list_test_page.rb