Sha256: f10310ba83573d0e2dcbd40454d9b1f98b99266affe7c6576d506b6231c80811

Contents?: true

Size: 1.43 KB

Versions: 42

Compression:

Stored size: 1.43 KB

Contents

module RubyApp

  module Elements

    module Pages

      module TestPages
        require 'ruby_app/elements/dialogs/exception_dialog'
        require 'ruby_app/elements/dialogs/message_dialog'
        require 'ruby_app/elements/input'
        require 'ruby_app/elements/markdown'
        require 'ruby_app/elements/pages/blank_page'
        require 'ruby_app/request'
        require 'ruby_app/session'

        class TestPage < RubyApp::Elements::Pages::BlankPage

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

          def initialize
            super

            self.interval = 2

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

            self.loaded do |element, event|
              event.update_text('li#loaded', self.translate.loaded(event.now))
            end
            self.triggered do |element, event|
              event.update_text('li#triggered', self.translate.triggered(event.now))
            end

            @input = RubyApp::Elements::Input.new
            @input.changed do |element, event|
              event.set_cookie('_cookie', @input.value)
              RubyApp::Session.show_dialog(event, RubyApp::Elements::Dialogs::MessageDialog.new(self.translate.message_dialog.message.title,
                                                                                         self.translate.message_dialog.message.message(@input.value)))
            end

          end

        end

      end

    end

  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
RubyApp-0.0.91 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.90 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.89 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.88 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.87 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.86 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.85 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.84 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.83 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.82 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.81 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.80 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.79 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.78 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.77 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.76 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.75 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.74 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.73 lib/ruby_app/elements/pages/test_pages/test_page.rb
RubyApp-0.0.72 lib/ruby_app/elements/pages/test_pages/test_page.rb