Sha256: 9401e1c4d6410330ad8b96ac9a4287a905117f165d8fb57469ecd9d9af1de3c1

Contents?: true

Size: 540 Bytes

Versions: 6

Compression:

Stored size: 540 Bytes

Contents

class NavbarPage < UnderOs::Page
  def initialize
    find('#buttons button').each do |button|
      button.on :tap do
        if button.hasClass('icons')
          navbar.right_buttons = @icons = button.data('icons').split(',').map do |type|
            UnderOs::UI::Icon.new(type: type)
          end
        else
          navbar.right_buttons = {}.tap do |hash|
            button.data('icons').split(',').map do |type|
              hash[type] = Proc.new{ p type }
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
under-os-1.4.0 app/pages/navbar_page.rb
under-os-1.3.0 app/pages/navbar_page.rb
under-os-1.2.1 app/pages/navbar_page.rb
under-os-1.2.0 app/pages/navbar_page.rb
under-os-1.1.0 app/pages/navbar_page.rb
under-os-1.0.0 app/pages/navbar_page.rb