Class: RubyApp::Elements::Pages::TestPages::DialogTestPage
- Inherits:
-
BlankPage
- Object
- RubyApp::Element
- Base::BasePage
- RubyApp::Elements::Page
- Base::BaseBlankPage
- BlankPage
- RubyApp::Elements::Pages::TestPages::DialogTestPage
- Defined in:
- lib/ruby_app/elements/pages/test_pages/dialog_test_page.rb
Instance Attribute Summary
Attributes inherited from Base::BasePage
Attributes inherited from RubyApp::Element
Instance Method Summary collapse
-
#initialize ⇒ DialogTestPage
constructor
A new instance of DialogTestPage.
Methods inherited from RubyApp::Element
Methods included from Mixins::ConfigureMixin
Methods included from Mixins::TranslateMixin
Methods included from Mixins::TemplateMixin
#exclude_parent_template, #exclude_parent_template?, #get_templates, #template_name, #template_path
Methods included from Mixins::RenderMixin
#clear_content_for, #content_for, #render, #rendered?
Constructor Details
#initialize ⇒ DialogTestPage
Returns a new instance of DialogTestPage.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ruby_app/elements/pages/test_pages/dialog_test_page.rb', line 21 def initialize super @markdown = RubyApp::Elements::Markdown.new @markdown.clicked do |element, event| case event.name when 'do_busy_dialog' RubyApp::Session.show(event, RubyApp::Elements::Dialogs::BusyDialog.new(self.translate.busy_dialog.)) do |_event| sleep 30 end when 'do_confirmation_dialog' RubyApp::Session.show(event, RubyApp::Elements::Dialogs::ConfirmationDialog.new(self.translate.confirmation_dialog.title, self.translate.confirmation_dialog.)) do |_event, response| RubyApp::Session.show(_event, RubyApp::Elements::Dialogs::MessageDialog.new(self.translate.confirmation_dialog..title, self.translate.confirmation_dialog..(response))) end when 'do_exception_dialog' RubyApp::Elements::Dialogs::ExceptionDialog.show(event) do raise self.translate.exception end when 'do_unhandled_exception_dialog' raise self.translate.exception when 'do_message_dialog' RubyApp::Session.show(event, RubyApp::Elements::Dialogs::MessageDialog.new(self.translate...title, self.translate...)) when 'do_month_dialog' RubyApp::Session.show(event, RubyApp::Elements::Dialogs::Calendars::MonthDialog.new(self.translate.month_dialog.title, event.today)) do |_event, response| RubyApp::Session.show(_event, RubyApp::Elements::Dialogs::MessageDialog.new(self.translate.month_dialog..title, self.translate.month_dialog..(response))) do |__event, _response| __event.execute("$('#last_value').text('#{response}');") end end end end end |