jqmobile_helpers 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +13 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +6 -0
- data/Rakefile +29 -0
- data/lib/jqmobile_helpers.rb +1 -0
- data/lib/jqmobile_helpers/action_view_extensions/form_helper.rb +54 -0
- data/lib/jqmobile_helpers/buttons_helper.rb +639 -0
- data/lib/jqmobile_helpers/form_builder.rb +301 -0
- data/lib/jqmobile_helpers/list_views_helper.rb +326 -0
- data/lib/jqmobile_helpers/railtie.rb +23 -0
- data/lib/jqmobile_helpers/toolbars_helper.rb +115 -0
- data/rdoc/JqmobileHelpers.html +185 -0
- data/rdoc/JqmobileHelpers/ActionViewExtensions.html +160 -0
- data/rdoc/JqmobileHelpers/ActionViewExtensions/FormHelper.html +231 -0
- data/rdoc/JqmobileHelpers/ButtonsHelper.html +1502 -0
- data/rdoc/JqmobileHelpers/FormBuilder.html +816 -0
- data/rdoc/JqmobileHelpers/ListViewsHelper.html +952 -0
- data/rdoc/JqmobileHelpers/Railtie.html +177 -0
- data/rdoc/JqmobileHelpers/ToolbarsHelper.html +416 -0
- data/rdoc/README_rdoc.html +109 -0
- data/rdoc/created.rid +9 -0
- data/rdoc/index.html +180 -0
- data/rdoc/js/darkfish.js +116 -0
- data/rdoc/js/jquery.js +32 -0
- data/rdoc/js/quicksearch.js +114 -0
- data/rdoc/js/thickbox-compressed.js +10 -0
- data/rdoc/lib/jqmobile_helpers/action_view_extensions/form_helper_rb.html +52 -0
- data/rdoc/lib/jqmobile_helpers/buttons_helper_rb.html +52 -0
- data/rdoc/lib/jqmobile_helpers/form_builder_rb.html +52 -0
- data/rdoc/lib/jqmobile_helpers/list_views_helper_rb.html +52 -0
- data/rdoc/lib/jqmobile_helpers/railtie_rb.html +62 -0
- data/rdoc/lib/jqmobile_helpers/toolbars_helper_rb.html +52 -0
- data/rdoc/lib/jqmobile_helpers_rb.html +54 -0
- data/rdoc/rdoc.css +706 -0
- data/test/buttons_helper_test.rb +112 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/buttons_controller.rb +9 -0
- data/test/dummy/app/controllers/forms_controller.rb +71 -0
- data/test/dummy/app/controllers/posts_controller.rb +83 -0
- data/test/dummy/app/controllers/toolbars_controller.rb +16 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/posts_helper.rb +2 -0
- data/test/dummy/app/helpers/toolbars_helper.rb +2 -0
- data/test/dummy/app/models/post.rb +2 -0
- data/test/dummy/app/models/toolbar.rb +2 -0
- data/test/dummy/app/views/buttons/index.html.erb +168 -0
- data/test/dummy/app/views/forms/_form.html.erb +20 -0
- data/test/dummy/app/views/forms/edit.html.erb +6 -0
- data/test/dummy/app/views/forms/index.html.erb +7 -0
- data/test/dummy/app/views/forms/new.html.erb +5 -0
- data/test/dummy/app/views/forms/show.html.erb +24 -0
- data/test/dummy/app/views/layouts/application.html.erb +49 -0
- data/test/dummy/app/views/posts/_form.html.erb +29 -0
- data/test/dummy/app/views/posts/edit.html.erb +6 -0
- data/test/dummy/app/views/posts/index.html.erb +128 -0
- data/test/dummy/app/views/posts/new.html.erb +5 -0
- data/test/dummy/app/views/posts/show.html.erb +24 -0
- data/test/dummy/app/views/toolbars/index.html.erb +25 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +45 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +22 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +26 -0
- data/test/dummy/config/environments/production.rb +49 -0
- data/test/dummy/config/environments/test.rb +35 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +69 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20110218095442_create_posts.rb +15 -0
- data/test/dummy/db/migrate/20110223031713_create_toolbars.rb +12 -0
- data/test/dummy/db/schema.rb +29 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +7446 -0
- data/test/dummy/log/production.log +0 -0
- data/test/dummy/log/server.log +0 -0
- data/test/dummy/log/test.log +2278 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/images/ajax-loader.png +0 -0
- data/test/dummy/public/images/form-check-off.png +0 -0
- data/test/dummy/public/images/form-check-on.png +0 -0
- data/test/dummy/public/images/form-radio-off.png +0 -0
- data/test/dummy/public/images/form-radio-on.png +0 -0
- data/test/dummy/public/images/icon-search-black.png +0 -0
- data/test/dummy/public/images/icons-18-black.png +0 -0
- data/test/dummy/public/images/icons-18-white.png +0 -0
- data/test/dummy/public/images/icons-36-black.png +0 -0
- data/test/dummy/public/images/icons-36-white.png +0 -0
- data/test/dummy/public/javascripts/application.js +2 -0
- data/test/dummy/public/javascripts/jquery-1.5.min.js +8176 -0
- data/test/dummy/public/javascripts/jquery-ui-1.8.9.custom.min.js +781 -0
- data/test/dummy/public/javascripts/jquery.mobile-1.0a3.min.js +121 -0
- data/test/dummy/public/javascripts/rails.js +175 -0
- data/test/dummy/public/stylesheets/images/ajax-loader.png +0 -0
- data/test/dummy/public/stylesheets/images/form-check-off.png +0 -0
- data/test/dummy/public/stylesheets/images/form-check-on.png +0 -0
- data/test/dummy/public/stylesheets/images/form-radio-off.png +0 -0
- data/test/dummy/public/stylesheets/images/form-radio-on.png +0 -0
- data/test/dummy/public/stylesheets/images/icon-search-black.png +0 -0
- data/test/dummy/public/stylesheets/images/icons-18-black.png +0 -0
- data/test/dummy/public/stylesheets/images/icons-18-white.png +0 -0
- data/test/dummy/public/stylesheets/images/icons-36-black.png +0 -0
- data/test/dummy/public/stylesheets/images/icons-36-white.png +0 -0
- data/test/dummy/public/stylesheets/jquery-ui-1.8.9.custom.css +573 -0
- data/test/dummy/public/stylesheets/jquery.mobile-1.0a3.min.css +16 -0
- data/test/dummy/public/stylesheets/scaffold.css +56 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/form_helper_test.rb +13 -0
- data/test/integration/navigation_test.rb +7 -0
- data/test/list_views_helper_test.rb +65 -0
- data/test/support/integration_case.rb +5 -0
- data/test/support/misc_helpers.rb +18 -0
- data/test/support/mock_controller.rb +15 -0
- data/test/support/mock_response.rb +14 -0
- data/test/support/models.rb +135 -0
- data/test/test_helper.rb +92 -0
- data/test/toolbars_helper_test.rb +21 -0
- metadata +182 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
7
|
+
|
|
8
|
+
<title>Class: JqmobileHelpers::Railtie</title>
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
11
|
+
|
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
|
13
|
+
charset="utf-8"></script>
|
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
15
|
+
charset="utf-8"></script>
|
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
|
17
|
+
charset="utf-8"></script>
|
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
|
19
|
+
charset="utf-8"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body class="class">
|
|
23
|
+
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<div id="home-metadata">
|
|
26
|
+
<div id="home-section" class="section">
|
|
27
|
+
<h3 class="section-header">
|
|
28
|
+
<a href="../index.html">Home</a>
|
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
|
31
|
+
</h3>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="file-metadata">
|
|
36
|
+
<div id="file-list-section" class="section">
|
|
37
|
+
<h3 class="section-header">In Files</h3>
|
|
38
|
+
<div class="section-body">
|
|
39
|
+
<ul>
|
|
40
|
+
|
|
41
|
+
<li><a href="../lib/jqmobile_helpers/railtie_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/jqmobile_helpers/railtie.rb">lib/jqmobile_helpers/railtie.rb</a></li>
|
|
43
|
+
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="class-metadata">
|
|
52
|
+
|
|
53
|
+
<!-- Parent Class -->
|
|
54
|
+
|
|
55
|
+
<div id="parent-class-section" class="section">
|
|
56
|
+
<h3 class="section-header">Parent</h3>
|
|
57
|
+
|
|
58
|
+
<p class="link">Rails::Railtie</p>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!-- Namespace Contents -->
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<!-- Method Quickref -->
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<!-- Included Modules -->
|
|
70
|
+
|
|
71
|
+
<div id="includes-section" class="section">
|
|
72
|
+
<h3 class="section-header">Included Modules</h3>
|
|
73
|
+
<ul class="link-list">
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<li><a class="include" href="ListViewsHelper.html">JqmobileHelpers::ListViewsHelper</a></li>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<li><a class="include" href="ToolbarsHelper.html">JqmobileHelpers::ToolbarsHelper</a></li>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
<li><a class="include" href="ButtonsHelper.html">JqmobileHelpers::ButtonsHelper</a></li>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div id="project-metadata">
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<div id="fileindex-section" class="section project-section">
|
|
96
|
+
<h3 class="section-header">Files</h3>
|
|
97
|
+
<ul>
|
|
98
|
+
|
|
99
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
|
100
|
+
|
|
101
|
+
</ul>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
<div id="classindex-section" class="section project-section">
|
|
106
|
+
<h3 class="section-header">Class Index
|
|
107
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
108
|
+
height="16" width="16" alt="[+]"
|
|
109
|
+
title="show/hide quicksearch" /></span></h3>
|
|
110
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
111
|
+
<fieldset>
|
|
112
|
+
<legend>Quicksearch</legend>
|
|
113
|
+
<input type="text" name="quicksearch" value=""
|
|
114
|
+
class="quicksearch-field" />
|
|
115
|
+
</fieldset>
|
|
116
|
+
</form>
|
|
117
|
+
|
|
118
|
+
<ul class="link-list">
|
|
119
|
+
|
|
120
|
+
<li><a href="../JqmobileHelpers.html">JqmobileHelpers</a></li>
|
|
121
|
+
|
|
122
|
+
<li><a href="../JqmobileHelpers/ActionViewExtensions.html">JqmobileHelpers::ActionViewExtensions</a></li>
|
|
123
|
+
|
|
124
|
+
<li><a href="../JqmobileHelpers/ActionViewExtensions/FormHelper.html">JqmobileHelpers::ActionViewExtensions::FormHelper</a></li>
|
|
125
|
+
|
|
126
|
+
<li><a href="../JqmobileHelpers/ButtonsHelper.html">JqmobileHelpers::ButtonsHelper</a></li>
|
|
127
|
+
|
|
128
|
+
<li><a href="../JqmobileHelpers/FormBuilder.html">JqmobileHelpers::FormBuilder</a></li>
|
|
129
|
+
|
|
130
|
+
<li><a href="../JqmobileHelpers/ListViewsHelper.html">JqmobileHelpers::ListViewsHelper</a></li>
|
|
131
|
+
|
|
132
|
+
<li><a href="../JqmobileHelpers/Railtie.html">JqmobileHelpers::Railtie</a></li>
|
|
133
|
+
|
|
134
|
+
<li><a href="../JqmobileHelpers/ToolbarsHelper.html">JqmobileHelpers::ToolbarsHelper</a></li>
|
|
135
|
+
|
|
136
|
+
</ul>
|
|
137
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div id="documentation">
|
|
145
|
+
<h1 class="class">JqmobileHelpers::Railtie</h1>
|
|
146
|
+
|
|
147
|
+
<div id="description">
|
|
148
|
+
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<!-- Constants -->
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
<!-- Attributes -->
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<!-- Methods -->
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
164
|
+
|
|
165
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
166
|
+
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<div id="validator-badges">
|
|
170
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
171
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
172
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
</body>
|
|
176
|
+
</html>
|
|
177
|
+
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
7
|
+
|
|
8
|
+
<title>Module: JqmobileHelpers::ToolbarsHelper</title>
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
11
|
+
|
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
|
13
|
+
charset="utf-8"></script>
|
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
15
|
+
charset="utf-8"></script>
|
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
|
17
|
+
charset="utf-8"></script>
|
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
|
19
|
+
charset="utf-8"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body class="module">
|
|
23
|
+
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<div id="home-metadata">
|
|
26
|
+
<div id="home-section" class="section">
|
|
27
|
+
<h3 class="section-header">
|
|
28
|
+
<a href="../index.html">Home</a>
|
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
|
31
|
+
</h3>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="file-metadata">
|
|
36
|
+
<div id="file-list-section" class="section">
|
|
37
|
+
<h3 class="section-header">In Files</h3>
|
|
38
|
+
<div class="section-body">
|
|
39
|
+
<ul>
|
|
40
|
+
|
|
41
|
+
<li><a href="../lib/jqmobile_helpers/toolbars_helper_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/jqmobile_helpers/toolbars_helper.rb">lib/jqmobile_helpers/toolbars_helper.rb</a></li>
|
|
43
|
+
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="class-metadata">
|
|
52
|
+
|
|
53
|
+
<!-- Parent Class -->
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<!-- Namespace Contents -->
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<!-- Method Quickref -->
|
|
60
|
+
|
|
61
|
+
<div id="method-list-section" class="section">
|
|
62
|
+
<h3 class="section-header">Methods</h3>
|
|
63
|
+
<ul class="link-list">
|
|
64
|
+
|
|
65
|
+
<li><a href="#method-i-header_toolbar_link">#header_toolbar_link</a></li>
|
|
66
|
+
|
|
67
|
+
<li><a href="#method-i-header_toolbar_title">#header_toolbar_title</a></li>
|
|
68
|
+
|
|
69
|
+
<li><a href="#method-i-navbar_bar">#navbar_bar</a></li>
|
|
70
|
+
|
|
71
|
+
<li><a href="#method-i-navbar_link">#navbar_link</a></li>
|
|
72
|
+
|
|
73
|
+
</ul>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<!-- Included Modules -->
|
|
78
|
+
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div id="project-metadata">
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
<div id="fileindex-section" class="section project-section">
|
|
85
|
+
<h3 class="section-header">Files</h3>
|
|
86
|
+
<ul>
|
|
87
|
+
|
|
88
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
|
89
|
+
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<div id="classindex-section" class="section project-section">
|
|
95
|
+
<h3 class="section-header">Class Index
|
|
96
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
97
|
+
height="16" width="16" alt="[+]"
|
|
98
|
+
title="show/hide quicksearch" /></span></h3>
|
|
99
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
100
|
+
<fieldset>
|
|
101
|
+
<legend>Quicksearch</legend>
|
|
102
|
+
<input type="text" name="quicksearch" value=""
|
|
103
|
+
class="quicksearch-field" />
|
|
104
|
+
</fieldset>
|
|
105
|
+
</form>
|
|
106
|
+
|
|
107
|
+
<ul class="link-list">
|
|
108
|
+
|
|
109
|
+
<li><a href="../JqmobileHelpers.html">JqmobileHelpers</a></li>
|
|
110
|
+
|
|
111
|
+
<li><a href="../JqmobileHelpers/ActionViewExtensions.html">JqmobileHelpers::ActionViewExtensions</a></li>
|
|
112
|
+
|
|
113
|
+
<li><a href="../JqmobileHelpers/ActionViewExtensions/FormHelper.html">JqmobileHelpers::ActionViewExtensions::FormHelper</a></li>
|
|
114
|
+
|
|
115
|
+
<li><a href="../JqmobileHelpers/ButtonsHelper.html">JqmobileHelpers::ButtonsHelper</a></li>
|
|
116
|
+
|
|
117
|
+
<li><a href="../JqmobileHelpers/FormBuilder.html">JqmobileHelpers::FormBuilder</a></li>
|
|
118
|
+
|
|
119
|
+
<li><a href="../JqmobileHelpers/ListViewsHelper.html">JqmobileHelpers::ListViewsHelper</a></li>
|
|
120
|
+
|
|
121
|
+
<li><a href="../JqmobileHelpers/Railtie.html">JqmobileHelpers::Railtie</a></li>
|
|
122
|
+
|
|
123
|
+
<li><a href="../JqmobileHelpers/ToolbarsHelper.html">JqmobileHelpers::ToolbarsHelper</a></li>
|
|
124
|
+
|
|
125
|
+
</ul>
|
|
126
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div id="documentation">
|
|
134
|
+
<h1 class="module">JqmobileHelpers::ToolbarsHelper</h1>
|
|
135
|
+
|
|
136
|
+
<div id="description">
|
|
137
|
+
<h1><a href="../JqmobileHelpers.html">JqmobileHelpers</a> List View Helpers</h1>
|
|
138
|
+
<p>
|
|
139
|
+
Provides a set of methods for making toolbars views for jquery-mobile
|
|
140
|
+
markup
|
|
141
|
+
</p>
|
|
142
|
+
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<!-- Constants -->
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<!-- Attributes -->
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<!-- Methods -->
|
|
152
|
+
|
|
153
|
+
<div id="public-instance-method-details" class="method-section section">
|
|
154
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<div id="header-toolbar-link-method" class="method-detail ">
|
|
158
|
+
<a name="method-i-header_toolbar_link"></a>
|
|
159
|
+
|
|
160
|
+
<div class="method-heading">
|
|
161
|
+
|
|
162
|
+
<span class="method-name">header_toolbar_link</span><span
|
|
163
|
+
class="method-args">(link_name,path,options = {})</span>
|
|
164
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
165
|
+
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<div class="method-description">
|
|
169
|
+
|
|
170
|
+
<p>
|
|
171
|
+
Header Bar Link
|
|
172
|
+
</p>
|
|
173
|
+
<p>
|
|
174
|
+
—Options —
|
|
175
|
+
</p>
|
|
176
|
+
<pre>
|
|
177
|
+
=> '- data-direction = "reverse" ## reverse transition without actually going back in history
|
|
178
|
+
=> - data-icon [delete,check,home,gear]
|
|
179
|
+
=> - data-iconpos [text,notext] ## if use notext, link only show icon
|
|
180
|
+
=> - class
|
|
181
|
+
=> - data-theme ## default 'a'
|
|
182
|
+
</pre>
|
|
183
|
+
<h3>Examples</h3>
|
|
184
|
+
<pre>
|
|
185
|
+
=> <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a></pre>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
<div class="method-source-code"
|
|
190
|
+
id="header-toolbar-link-source">
|
|
191
|
+
<pre>
|
|
192
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/toolbars_helper.rb, line 33</span>
|
|
193
|
+
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">header_toolbar_link</span>(<span class="ruby-identifier">link_name</span>,<span class="ruby-identifier">path</span>,<span class="ruby-identifier">options</span> = {})
|
|
194
|
+
34: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
195
|
+
35: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'href'</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{path}"</span>, <span class="ruby-value str">'data-direction'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"reverse"</span>}
|
|
196
|
+
36:
|
|
197
|
+
37: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'data-iconpos'</span>)
|
|
198
|
+
38: <span class="ruby-identifier">default_options</span> = <span class="ruby-identifier">default_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'data-iconpos'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-iconpos'</span>]})
|
|
199
|
+
39: <span class="ruby-keyword kw">end</span>
|
|
200
|
+
40:
|
|
201
|
+
41: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'data-icon'</span>)
|
|
202
|
+
42: <span class="ruby-identifier">default_options</span> = <span class="ruby-identifier">default_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-icon'</span>]})
|
|
203
|
+
43: <span class="ruby-keyword kw">end</span>
|
|
204
|
+
44:
|
|
205
|
+
45: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'data-theme'</span>)
|
|
206
|
+
46: <span class="ruby-identifier">default_options</span> = <span class="ruby-identifier">default_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'data-theme'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-theme'</span>]})
|
|
207
|
+
47: <span class="ruby-keyword kw">end</span>
|
|
208
|
+
48:
|
|
209
|
+
49: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-node">"#{link_name}"</span>,<span class="ruby-identifier">default_options</span>)
|
|
210
|
+
50: <span class="ruby-keyword kw">end</span></pre>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<div id="header-toolbar-title-method" class="method-detail ">
|
|
222
|
+
<a name="method-i-header_toolbar_title"></a>
|
|
223
|
+
|
|
224
|
+
<div class="method-heading">
|
|
225
|
+
|
|
226
|
+
<span class="method-name">header_toolbar_title</span><span
|
|
227
|
+
class="method-args">(title)</span>
|
|
228
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
229
|
+
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<div class="method-description">
|
|
233
|
+
|
|
234
|
+
<p>
|
|
235
|
+
Header Bar Title
|
|
236
|
+
</p>
|
|
237
|
+
<h3>Examples</h3>
|
|
238
|
+
<pre>
|
|
239
|
+
=> <%= header_toolbar_title('Put Title Here') %>
|
|
240
|
+
=> <h1>Page Title</h1></pre>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<div class="method-source-code"
|
|
245
|
+
id="header-toolbar-title-source">
|
|
246
|
+
<pre>
|
|
247
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/toolbars_helper.rb, line 16</span>
|
|
248
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">header_toolbar_title</span>(<span class="ruby-identifier">title</span>)
|
|
249
|
+
17: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:h1</span>, <span class="ruby-identifier">title</span>)
|
|
250
|
+
18: <span class="ruby-keyword kw">end</span></pre>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<div id="navbar-bar-method" class="method-detail ">
|
|
262
|
+
<a name="method-i-navbar_bar"></a>
|
|
263
|
+
|
|
264
|
+
<div class="method-heading">
|
|
265
|
+
|
|
266
|
+
<span class="method-name">navbar_bar</span><span
|
|
267
|
+
class="method-args">(collection)</span>
|
|
268
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
269
|
+
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
<div class="method-description">
|
|
273
|
+
|
|
274
|
+
<p>
|
|
275
|
+
navigation bar container
|
|
276
|
+
</p>
|
|
277
|
+
<pre>
|
|
278
|
+
A navbar is coded as an unordered list of links wrapped in a container element that has the data-role="navbar" attribute
|
|
279
|
+
To set one of links to the active (selected) state, add class="ui-btn-active" to the anchor
|
|
280
|
+
The navbar maxes out with 5 items, each 1/5 the width of the browser window
|
|
281
|
+
Navbar can be in the header/footer.just add the navbar container inside header/footer container
|
|
282
|
+
|
|
283
|
+
*** Options ***
|
|
284
|
+
=> data-role = 'navbar' (to specify the contanier as navbar)
|
|
285
|
+
</pre>
|
|
286
|
+
<p>
|
|
287
|
+
Example :
|
|
288
|
+
</p>
|
|
289
|
+
<pre>
|
|
290
|
+
<div data-role="navbar">
|
|
291
|
+
<ul>
|
|
292
|
+
<li><a href="a.html" class="ui-btn-active">One</a></li>
|
|
293
|
+
<li><a href="b.html">Two</a></li>
|
|
294
|
+
</ul>
|
|
295
|
+
</div><!-- /navbar -->
|
|
296
|
+
</pre>
|
|
297
|
+
<p>
|
|
298
|
+
Usage :
|
|
299
|
+
</p>
|
|
300
|
+
<pre>
|
|
301
|
+
navbar_link(collection) ** this method is to create the link inside the navbar container
|
|
302
|
+
<%= navbar_bar([navbar_link('saya',root_path,{'data-icon' => 'gear'}),navbar_link('saya',root_path,{'data-icon' => 'gear'}),navbar_link('dia',toolbars_path,{'data-icon' => 'home'}), navbar_link('kami',toolbars_path,{'data-icon' => 'plus'})]) %></pre>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
<div class="method-source-code"
|
|
307
|
+
id="navbar-bar-source">
|
|
308
|
+
<pre>
|
|
309
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/toolbars_helper.rb, line 74</span>
|
|
310
|
+
74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">navbar_bar</span>(<span class="ruby-identifier">collection</span>)
|
|
311
|
+
75: <span class="ruby-identifier">listing</span> = <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">"li"</span>,<span class="ruby-identifier">item</span>)}
|
|
312
|
+
76: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">"div"</span>,<span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:ul</span>, <span class="ruby-identifier">listing</span>.<span class="ruby-identifier">join</span>.<span class="ruby-identifier">html_safe</span>), {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'navbar'</span>})
|
|
313
|
+
77: <span class="ruby-keyword kw">end</span></pre>
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
<div id="navbar-link-method" class="method-detail ">
|
|
325
|
+
<a name="method-i-navbar_link"></a>
|
|
326
|
+
|
|
327
|
+
<div class="method-heading">
|
|
328
|
+
|
|
329
|
+
<span class="method-name">navbar_link</span><span
|
|
330
|
+
class="method-args">(name,link, options ={})</span>
|
|
331
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
332
|
+
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
<div class="method-description">
|
|
336
|
+
|
|
337
|
+
<p>
|
|
338
|
+
link inside the navbar
|
|
339
|
+
</p>
|
|
340
|
+
<pre>
|
|
341
|
+
*** Options ***
|
|
342
|
+
=> data-icon (to add icon to navbar items)
|
|
343
|
+
=> data-iconpos="top" (to stack icon above the navbar items label)
|
|
344
|
+
=> data-theme (set theming for navbar)
|
|
345
|
+
</pre>
|
|
346
|
+
<p>
|
|
347
|
+
Example
|
|
348
|
+
</p>
|
|
349
|
+
<pre>
|
|
350
|
+
# => <a href="a.html" class="ui-btn-active" 'data-icon'="gear">One</a>
|
|
351
|
+
</pre>
|
|
352
|
+
<p>
|
|
353
|
+
Usage :
|
|
354
|
+
</p>
|
|
355
|
+
<pre>
|
|
356
|
+
=> navbar_link('saya',root_path,{'data-icon' => 'gear'})</pre>
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
<div class="method-source-code"
|
|
361
|
+
id="navbar-link-source">
|
|
362
|
+
<pre>
|
|
363
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/toolbars_helper.rb, line 90</span>
|
|
364
|
+
90: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">navbar_link</span>(<span class="ruby-identifier">name</span>,<span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> ={})
|
|
365
|
+
91: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
366
|
+
92: <span class="ruby-identifier">default_options</span> = {}
|
|
367
|
+
93:
|
|
368
|
+
94: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'data-icon'</span>)
|
|
369
|
+
95: <span class="ruby-identifier">default_options</span> = <span class="ruby-identifier">default_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-icon'</span>]})
|
|
370
|
+
96: <span class="ruby-keyword kw">end</span>
|
|
371
|
+
97:
|
|
372
|
+
98: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'data-iconpos'</span>)
|
|
373
|
+
99: <span class="ruby-identifier">default_options</span> = <span class="ruby-identifier">default_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'data-iconpos'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-iconpos'</span>]})
|
|
374
|
+
100: <span class="ruby-keyword kw">end</span>
|
|
375
|
+
101:
|
|
376
|
+
102: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'data-theme'</span>)
|
|
377
|
+
103: <span class="ruby-identifier">default_options</span> = <span class="ruby-identifier">default_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'data-theme'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-theme'</span>]})
|
|
378
|
+
104: <span class="ruby-keyword kw">end</span>
|
|
379
|
+
105:
|
|
380
|
+
106: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value str">'class'</span>)
|
|
381
|
+
107: <span class="ruby-identifier">default_options</span> = <span class="ruby-identifier">default_options</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'class'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'class'</span>]})
|
|
382
|
+
108: <span class="ruby-keyword kw">end</span>
|
|
383
|
+
109:
|
|
384
|
+
110: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">'a'</span>,<span class="ruby-identifier">name</span>, {<span class="ruby-value str">'href'</span> =<span class="ruby-operator">></span> <span class="ruby-node">"#{link}"</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
385
|
+
111: <span class="ruby-keyword kw">end</span></pre>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
</div>
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
</div>
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
403
|
+
|
|
404
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
405
|
+
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
<div id="validator-badges">
|
|
409
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
410
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
411
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
</body>
|
|
415
|
+
</html>
|
|
416
|
+
|