Class: SidebarsPage
Instance Attribute Summary
#_, #stylesheet
Instance Method Summary
collapse
#alert, #build_layout, #compile_styles, #history, layout, #name, #navbar, new, #repaint, #setup_wrap, #title, #title=, #view, #view=
#emit, #off, #on
Constructor Details
Returns a new instance of SidebarsPage.
2
3
4
5
6
7
8
9
|
# File 'app/pages/sidebars_page.rb', line 2
def initialize
first('#top' ).on(:tap){ show_on_top }
first('#left' ).on(:tap){ show_on_left }
first('#right' ).on(:tap){ show_on_right }
first('#bottom').on(:tap){ show_on_bottom }
@sidebar = first('sidebar#test')
end
|
Instance Method Details
#show_on_bottom ⇒ Object
35
36
37
38
39
40
41
|
# File 'app/pages/sidebars_page.rb', line 35
def show_on_bottom
return @sidebar.hide if @sidebar.visible?
@sidebar.location = :bottom
@sidebar.style.height = 100
@sidebar.show
end
|
#show_on_left ⇒ Object
19
20
21
22
23
24
25
|
# File 'app/pages/sidebars_page.rb', line 19
def show_on_left
return @sidebar.hide if @sidebar.visible?
@sidebar.location = :left
@sidebar.style.width = 200
@sidebar.show
end
|
#show_on_right ⇒ Object
27
28
29
30
31
32
33
|
# File 'app/pages/sidebars_page.rb', line 27
def show_on_right
return @sidebar.hide if @sidebar.visible?
@sidebar.location = :right
@sidebar.style.width = 200
@sidebar.show
end
|
#show_on_top ⇒ Object
11
12
13
14
15
16
17
|
# File 'app/pages/sidebars_page.rb', line 11
def show_on_top
return @sidebar.hide if @sidebar.visible?
@sidebar.location = :top
@sidebar.style.height = 100
@sidebar.show
end
|