Sha256: ef86a437458392dc799efa1ae263b7f8fdb91ce16d3ba3124bc710f4fd982ea1

Contents?: true

Size: 1.18 KB

Versions: 7

Compression:

Stored size: 1.18 KB

Contents

module RubyApp

  module Elements

    module Mobile

      module Pages

        module Information
          require 'ruby_app/elements/mobile/dialogs/acknowledgement_dialog'
          require 'ruby_app/elements/mobile/navigation/back_button'
          require 'ruby_app/elements/mobile/pages/information/scripts_list'
          require 'ruby_app/elements/mobile/page'

          class ScriptsPage < RubyApp::Elements::Mobile::Page

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

            def initialize
              super

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

              @scripts_list = RubyApp::Elements::Mobile::Pages::Information::ScriptsList.new
              @scripts_list.clicked do |element, event|
                if RubyApp::Session.configuration.scripts.enabled
                  event.go(event.item.url)
                else
                  RubyApp::Elements::Mobile::Dialog.show(event, RubyApp::Elements::Mobile::Dialogs::AcknowledgementDialog.new('Scripts', 'Scripts are currently disabled.'), :transition => 'pop')
                end
              end

            end

          end

        end

      end

    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
RubyApp-0.5.16 lib/ruby_app/elements/mobile/pages/information/scripts_page.rb
RubyApp-0.5.15 lib/ruby_app/elements/mobile/pages/information/scripts_page.rb
RubyApp-0.5.14 lib/ruby_app/elements/mobile/pages/information/scripts_page.rb
RubyApp-0.5.13 lib/ruby_app/elements/mobile/pages/information/scripts_page.rb
RubyApp-0.5.12 lib/ruby_app/elements/mobile/pages/information/scripts_page.rb
RubyApp-0.5.11 lib/ruby_app/elements/mobile/pages/information/scripts_page.rb
RubyApp-0.5.10 lib/ruby_app/elements/mobile/pages/information/scripts_page.rb