Class: CollectionsPage
- Inherits:
-
UnderOs::Page
- Object
- UnderOs::Page
- CollectionsPage
- Defined in:
- app/pages/collections_page.rb
Instance Attribute Summary
Attributes inherited from UnderOs::Page
Instance Method Summary collapse
-
#initialize ⇒ CollectionsPage
constructor
A new instance of CollectionsPage.
Methods inherited from UnderOs::Page
#alert, #build_layout, #compile_styles, #history, layout, #name, #navbar, new, #repaint, #setup_wrap, #title, #title=, #view, #view=
Methods included from UnderOs::Events
Constructor Details
#initialize ⇒ CollectionsPage
Returns a new instance of CollectionsPage.
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/pages/collections_page.rb', line 2 def initialize @collection = first('collection') @collection.number_of_items = 1000 @collection.on :item do |item, index| item.children[0].text = "##{index + 1}" end @collection.on :select do |item| item.addClass 'selected' end @collection.on :unselect do |item| item.removeClass 'selected' end end |