Sha256: 10f2e6d7408b069f512ae77659b3e7be74ed7cd6e934747e00c8c640672750c1

Contents?: true

Size: 1.13 KB

Versions: 24

Compression:

Stored size: 1.13 KB

Contents

module RubyApp

  module Elements

    module Dialogs

      module Calendars
        require 'ruby_app/elements/calendars/month'
        require 'ruby_app/elements/dialogs/blank_dialog'
        require 'ruby_app/elements/link'

        class MonthDialog < RubyApp::Elements::Dialogs::BlankDialog

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

          def initialize(title, value = Date.today)
            super()

            attributes.merge!(:style => 'width: auto;')

            @title = title

            @month = RubyApp::Elements::Calendars::Month.new
            @month.display = value;
            @month.value = value;
            @month.changed do |element, event|
              @response = event.value
              event.hide(self)
            end

            @today = RubyApp::Elements::Link.new
            @today.clicked do |element, event|
              @response = Date.today
              event.hide(self)
            end

            @cancel = RubyApp::Elements::Link.new
            @cancel.clicked do |element, event|
              event.hide(self)
            end

          end

        end

      end

    end

  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
RubyApp-0.0.29 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.28 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.27 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.26 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.25 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.24 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.23 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.22 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.21 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.20 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.19 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.18 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.17 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.16 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.15 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.14 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.13 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.12 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.11 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb
RubyApp-0.0.10 lib/ruby_app/elements/dialogs/calendars/month_dialog.rb