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,231 @@
|
|
|
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::ActionViewExtensions::FormHelper</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/action_view_extensions/form_helper_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/jqmobile_helpers/action_view_extensions/form_helper.rb">lib/jqmobile_helpers/action_view_extensions/form_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-with_custom_field_error_proc">#with_custom_field_error_proc</a></li>
|
|
66
|
+
|
|
67
|
+
</ul>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
<!-- Included Modules -->
|
|
72
|
+
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div id="project-metadata">
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
<div id="fileindex-section" class="section project-section">
|
|
79
|
+
<h3 class="section-header">Files</h3>
|
|
80
|
+
<ul>
|
|
81
|
+
|
|
82
|
+
<li class="file"><a href="../../README_rdoc.html">README.rdoc</a></li>
|
|
83
|
+
|
|
84
|
+
</ul>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<div id="classindex-section" class="section project-section">
|
|
89
|
+
<h3 class="section-header">Class Index
|
|
90
|
+
<span class="search-toggle"><img src="../../images/find.png"
|
|
91
|
+
height="16" width="16" alt="[+]"
|
|
92
|
+
title="show/hide quicksearch" /></span></h3>
|
|
93
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
94
|
+
<fieldset>
|
|
95
|
+
<legend>Quicksearch</legend>
|
|
96
|
+
<input type="text" name="quicksearch" value=""
|
|
97
|
+
class="quicksearch-field" />
|
|
98
|
+
</fieldset>
|
|
99
|
+
</form>
|
|
100
|
+
|
|
101
|
+
<ul class="link-list">
|
|
102
|
+
|
|
103
|
+
<li><a href="../../JqmobileHelpers.html">JqmobileHelpers</a></li>
|
|
104
|
+
|
|
105
|
+
<li><a href="../../JqmobileHelpers/ActionViewExtensions.html">JqmobileHelpers::ActionViewExtensions</a></li>
|
|
106
|
+
|
|
107
|
+
<li><a href="../../JqmobileHelpers/ActionViewExtensions/FormHelper.html">JqmobileHelpers::ActionViewExtensions::FormHelper</a></li>
|
|
108
|
+
|
|
109
|
+
<li><a href="../../JqmobileHelpers/ButtonsHelper.html">JqmobileHelpers::ButtonsHelper</a></li>
|
|
110
|
+
|
|
111
|
+
<li><a href="../../JqmobileHelpers/FormBuilder.html">JqmobileHelpers::FormBuilder</a></li>
|
|
112
|
+
|
|
113
|
+
<li><a href="../../JqmobileHelpers/ListViewsHelper.html">JqmobileHelpers::ListViewsHelper</a></li>
|
|
114
|
+
|
|
115
|
+
<li><a href="../../JqmobileHelpers/Railtie.html">JqmobileHelpers::Railtie</a></li>
|
|
116
|
+
|
|
117
|
+
<li><a href="../../JqmobileHelpers/ToolbarsHelper.html">JqmobileHelpers::ToolbarsHelper</a></li>
|
|
118
|
+
|
|
119
|
+
</ul>
|
|
120
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div id="documentation">
|
|
128
|
+
<h1 class="module">JqmobileHelpers::ActionViewExtensions::FormHelper</h1>
|
|
129
|
+
|
|
130
|
+
<div id="description">
|
|
131
|
+
<p>
|
|
132
|
+
This module creates simple form wrappers around default form_for and
|
|
133
|
+
fields_for.
|
|
134
|
+
</p>
|
|
135
|
+
<p>
|
|
136
|
+
Example:
|
|
137
|
+
</p>
|
|
138
|
+
<pre>
|
|
139
|
+
jq_form_for @user do |f|
|
|
140
|
+
f.input :name, :required => true, :description => 'Your name please'
|
|
141
|
+
end</pre>
|
|
142
|
+
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<!-- Constants -->
|
|
146
|
+
|
|
147
|
+
<div id="constants-list" class="section">
|
|
148
|
+
<h3 class="section-header">Constants</h3>
|
|
149
|
+
<dl>
|
|
150
|
+
|
|
151
|
+
<dt><a name="FIELD_ERROR_PROC">FIELD_ERROR_PROC</a></dt>
|
|
152
|
+
|
|
153
|
+
<dd class="description"><p>
|
|
154
|
+
Override the default ActiveRecordHelper behaviour of wrapping the input.
|
|
155
|
+
This gets taken care of semantically by adding an error class to the
|
|
156
|
+
wrapper tag containing the input.
|
|
157
|
+
</p></dd>
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</dl>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<!-- Attributes -->
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<!-- Methods -->
|
|
168
|
+
|
|
169
|
+
<div id="public-instance-method-details" class="method-section section">
|
|
170
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div id="with-custom-field-error-proc-method" class="method-detail ">
|
|
174
|
+
<a name="method-i-with_custom_field_error_proc"></a>
|
|
175
|
+
|
|
176
|
+
<div class="method-heading">
|
|
177
|
+
|
|
178
|
+
<span class="method-name">with_custom_field_error_proc</span><span
|
|
179
|
+
class="method-args">(&block)</span>
|
|
180
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
181
|
+
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<div class="method-description">
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
<div class="method-source-code"
|
|
191
|
+
id="with-custom-field-error-proc-source">
|
|
192
|
+
<pre>
|
|
193
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/action_view_extensions/form_helper.rb, line 24</span>
|
|
194
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_custom_field_error_proc</span>(&<span class="ruby-identifier">block</span>)
|
|
195
|
+
25: <span class="ruby-identifier">@@default_field_error_proc</span> = <span class="ruby-operator">::</span><span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">field_error_proc</span>
|
|
196
|
+
26: <span class="ruby-operator">::</span><span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">field_error_proc</span> = <span class="ruby-constant">FIELD_ERROR_PROC</span>
|
|
197
|
+
27: <span class="ruby-identifier">result</span> = <span class="ruby-keyword kw">yield</span>
|
|
198
|
+
28: <span class="ruby-operator">::</span><span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">field_error_proc</span> = <span class="ruby-identifier">@@default_field_error_proc</span>
|
|
199
|
+
29: <span class="ruby-identifier">result</span>
|
|
200
|
+
30: <span class="ruby-keyword kw">end</span></pre>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
218
|
+
|
|
219
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
220
|
+
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<div id="validator-badges">
|
|
224
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
225
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
226
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
</body>
|
|
230
|
+
</html>
|
|
231
|
+
|
|
@@ -0,0 +1,1502 @@
|
|
|
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::ButtonsHelper</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/buttons_helper_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/jqmobile_helpers/buttons_helper.rb">lib/jqmobile_helpers/buttons_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-alert_button_link">#alert_button_link</a></li>
|
|
66
|
+
|
|
67
|
+
<li><a href="#method-i-back_button_link">#back_button_link</a></li>
|
|
68
|
+
|
|
69
|
+
<li><a href="#method-i-back_split_button">#back_split_button</a></li>
|
|
70
|
+
|
|
71
|
+
<li><a href="#method-i-button_link">#button_link</a></li>
|
|
72
|
+
|
|
73
|
+
<li><a href="#method-i-check_button_link">#check_button_link</a></li>
|
|
74
|
+
|
|
75
|
+
<li><a href="#method-i-delete_button_link">#delete_button_link</a></li>
|
|
76
|
+
|
|
77
|
+
<li><a href="#method-i-down_button_link">#down_button_link</a></li>
|
|
78
|
+
|
|
79
|
+
<li><a href="#method-i-forward_button_link">#forward_button_link</a></li>
|
|
80
|
+
|
|
81
|
+
<li><a href="#method-i-gear_button_link">#gear_button_link</a></li>
|
|
82
|
+
|
|
83
|
+
<li><a href="#method-i-grid_button_link">#grid_button_link</a></li>
|
|
84
|
+
|
|
85
|
+
<li><a href="#method-i-group_button">#group_button</a></li>
|
|
86
|
+
|
|
87
|
+
<li><a href="#method-i-home_button_link">#home_button_link</a></li>
|
|
88
|
+
|
|
89
|
+
<li><a href="#method-i-info_button_link">#info_button_link</a></li>
|
|
90
|
+
|
|
91
|
+
<li><a href="#method-i-inline_button">#inline_button</a></li>
|
|
92
|
+
|
|
93
|
+
<li><a href="#method-i-left_button_link">#left_button_link</a></li>
|
|
94
|
+
|
|
95
|
+
<li><a href="#method-i-minus_button_link">#minus_button_link</a></li>
|
|
96
|
+
|
|
97
|
+
<li><a href="#method-i-plus_button_link">#plus_button_link</a></li>
|
|
98
|
+
|
|
99
|
+
<li><a href="#method-i-refresh_button_link">#refresh_button_link</a></li>
|
|
100
|
+
|
|
101
|
+
<li><a href="#method-i-right_button_link">#right_button_link</a></li>
|
|
102
|
+
|
|
103
|
+
<li><a href="#method-i-search_button_link">#search_button_link</a></li>
|
|
104
|
+
|
|
105
|
+
<li><a href="#method-i-star_button_link">#star_button_link</a></li>
|
|
106
|
+
|
|
107
|
+
<li><a href="#method-i-up_button_link">#up_button_link</a></li>
|
|
108
|
+
|
|
109
|
+
</ul>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
<!-- Included Modules -->
|
|
114
|
+
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<div id="project-metadata">
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
<div id="fileindex-section" class="section project-section">
|
|
121
|
+
<h3 class="section-header">Files</h3>
|
|
122
|
+
<ul>
|
|
123
|
+
|
|
124
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
|
125
|
+
|
|
126
|
+
</ul>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<div id="classindex-section" class="section project-section">
|
|
131
|
+
<h3 class="section-header">Class Index
|
|
132
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
133
|
+
height="16" width="16" alt="[+]"
|
|
134
|
+
title="show/hide quicksearch" /></span></h3>
|
|
135
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
136
|
+
<fieldset>
|
|
137
|
+
<legend>Quicksearch</legend>
|
|
138
|
+
<input type="text" name="quicksearch" value=""
|
|
139
|
+
class="quicksearch-field" />
|
|
140
|
+
</fieldset>
|
|
141
|
+
</form>
|
|
142
|
+
|
|
143
|
+
<ul class="link-list">
|
|
144
|
+
|
|
145
|
+
<li><a href="../JqmobileHelpers.html">JqmobileHelpers</a></li>
|
|
146
|
+
|
|
147
|
+
<li><a href="../JqmobileHelpers/ActionViewExtensions.html">JqmobileHelpers::ActionViewExtensions</a></li>
|
|
148
|
+
|
|
149
|
+
<li><a href="../JqmobileHelpers/ActionViewExtensions/FormHelper.html">JqmobileHelpers::ActionViewExtensions::FormHelper</a></li>
|
|
150
|
+
|
|
151
|
+
<li><a href="../JqmobileHelpers/ButtonsHelper.html">JqmobileHelpers::ButtonsHelper</a></li>
|
|
152
|
+
|
|
153
|
+
<li><a href="../JqmobileHelpers/FormBuilder.html">JqmobileHelpers::FormBuilder</a></li>
|
|
154
|
+
|
|
155
|
+
<li><a href="../JqmobileHelpers/ListViewsHelper.html">JqmobileHelpers::ListViewsHelper</a></li>
|
|
156
|
+
|
|
157
|
+
<li><a href="../JqmobileHelpers/Railtie.html">JqmobileHelpers::Railtie</a></li>
|
|
158
|
+
|
|
159
|
+
<li><a href="../JqmobileHelpers/ToolbarsHelper.html">JqmobileHelpers::ToolbarsHelper</a></li>
|
|
160
|
+
|
|
161
|
+
</ul>
|
|
162
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<div id="documentation">
|
|
170
|
+
<h1 class="module">JqmobileHelpers::ButtonsHelper</h1>
|
|
171
|
+
|
|
172
|
+
<div id="description">
|
|
173
|
+
<h1><a href="../JqmobileHelpers.html">JqmobileHelpers</a> Buttons Helper</h1>
|
|
174
|
+
<p>
|
|
175
|
+
Provides a set of helper methods for jquery-mobile buttons
|
|
176
|
+
</p>
|
|
177
|
+
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<!-- Constants -->
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
<!-- Attributes -->
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
<!-- Methods -->
|
|
187
|
+
|
|
188
|
+
<div id="public-instance-method-details" class="method-section section">
|
|
189
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
<div id="alert-button-link-method" class="method-detail ">
|
|
193
|
+
<a name="method-i-alert_button_link"></a>
|
|
194
|
+
|
|
195
|
+
<div class="method-heading">
|
|
196
|
+
|
|
197
|
+
<span class="method-name">alert_button_link</span><span
|
|
198
|
+
class="method-args">(name, link, options = {})</span>
|
|
199
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
200
|
+
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<div class="method-description">
|
|
204
|
+
|
|
205
|
+
<p>
|
|
206
|
+
Alert Button Link
|
|
207
|
+
</p>
|
|
208
|
+
<h4>Examples</h4>
|
|
209
|
+
<pre>
|
|
210
|
+
alert_button_link 'alert', new_post_path
|
|
211
|
+
# => <a data-role="button" data-icon="alert" href="/posts/new">alert</a>
|
|
212
|
+
|
|
213
|
+
alert_button_link 'alert', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
214
|
+
# => <a data-role="button" data-icon="alert" data-iconpos="right" data-theme="c" href="/posts/new">alert</a></pre>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
<div class="method-source-code"
|
|
219
|
+
id="alert-button-link-source">
|
|
220
|
+
<pre>
|
|
221
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 454</span>
|
|
222
|
+
454: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alert_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
223
|
+
455:
|
|
224
|
+
456: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
225
|
+
457: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"alert"</span>}
|
|
226
|
+
458:
|
|
227
|
+
459: <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>)
|
|
228
|
+
460: <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>]})
|
|
229
|
+
461: <span class="ruby-keyword kw">end</span>
|
|
230
|
+
462:
|
|
231
|
+
463: <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>)
|
|
232
|
+
464: <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>]})
|
|
233
|
+
465: <span class="ruby-keyword kw">end</span>
|
|
234
|
+
466:
|
|
235
|
+
467: <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-inline'</span>)
|
|
236
|
+
468: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
237
|
+
469: <span class="ruby-keyword kw">end</span>
|
|
238
|
+
470:
|
|
239
|
+
471: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
240
|
+
472: <span class="ruby-keyword kw">end</span></pre>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
<div id="back-button-link-method" class="method-detail ">
|
|
252
|
+
<a name="method-i-back_button_link"></a>
|
|
253
|
+
|
|
254
|
+
<div class="method-heading">
|
|
255
|
+
|
|
256
|
+
<span class="method-name">back_button_link</span><span
|
|
257
|
+
class="method-args">(name, link, options = {})</span>
|
|
258
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
259
|
+
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
<div class="method-description">
|
|
263
|
+
|
|
264
|
+
<p>
|
|
265
|
+
Back Button Link
|
|
266
|
+
</p>
|
|
267
|
+
<h4>Examples</h4>
|
|
268
|
+
<pre>
|
|
269
|
+
back_button_link 'back', new_post_path
|
|
270
|
+
# => <a data-role="button" data-icon="back" href="/posts/new">back</a>
|
|
271
|
+
|
|
272
|
+
back_button_link 'back', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
273
|
+
# => <a data-role="button" data-icon="back" data-iconpos="right" data-theme="c" href="/posts/new">back</a></pre>
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
<div class="method-source-code"
|
|
278
|
+
id="back-button-link-source">
|
|
279
|
+
<pre>
|
|
280
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 367</span>
|
|
281
|
+
367: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">back_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
282
|
+
368:
|
|
283
|
+
369: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
284
|
+
370: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"back"</span>}
|
|
285
|
+
371:
|
|
286
|
+
372: <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>)
|
|
287
|
+
373: <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>]})
|
|
288
|
+
374: <span class="ruby-keyword kw">end</span>
|
|
289
|
+
375:
|
|
290
|
+
376: <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>)
|
|
291
|
+
377: <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>]})
|
|
292
|
+
378: <span class="ruby-keyword kw">end</span>
|
|
293
|
+
379:
|
|
294
|
+
380: <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-inline'</span>)
|
|
295
|
+
381: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
296
|
+
382: <span class="ruby-keyword kw">end</span>
|
|
297
|
+
383:
|
|
298
|
+
384: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
299
|
+
385: <span class="ruby-keyword kw">end</span></pre>
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
</div>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
<div id="back-split-button-method" class="method-detail ">
|
|
311
|
+
<a name="method-i-back_split_button"></a>
|
|
312
|
+
|
|
313
|
+
<div class="method-heading">
|
|
314
|
+
|
|
315
|
+
<span class="method-name">back_split_button</span><span
|
|
316
|
+
class="method-args">(name, link, options ={} )</span>
|
|
317
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
318
|
+
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div class="method-description">
|
|
322
|
+
|
|
323
|
+
<h6>BACK-SPLIT-BUTTON ===========================================================</h6>
|
|
324
|
+
<p>
|
|
325
|
+
In cases where there is more than one possible action per list item, a
|
|
326
|
+
split button can be used to offer two independently clickable items —
|
|
327
|
+
the list item and a small arrow icon in the far right The framework will
|
|
328
|
+
add a vertical divider line and sets the title attribute of the link to the
|
|
329
|
+
text the link for accessibility. It is similar for the Split-Button List.
|
|
330
|
+
</p>
|
|
331
|
+
<h4>Options</h4>
|
|
332
|
+
<pre>
|
|
333
|
+
# => 'data-inset' => 'true' (Default data-inset is set to true)
|
|
334
|
+
# => 'data-theme' => 'c' (Default data-theme is set to c)
|
|
335
|
+
|
|
336
|
+
</pre>
|
|
337
|
+
<h4>Examples</h4>
|
|
338
|
+
<pre>
|
|
339
|
+
<%= back_split_button "Back", posts_path %>
|
|
340
|
+
# => <div data-role="content"><a href="index.html" data-role="button" data-rel="back">Back</a></div> </pre>
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
<div class="method-source-code"
|
|
345
|
+
id="back-split-button-source">
|
|
346
|
+
<pre>
|
|
347
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 579</span>
|
|
348
|
+
579: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">back_split_button</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> ={} )
|
|
349
|
+
580: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
350
|
+
581: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-rel'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"back"</span>}
|
|
351
|
+
582: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
352
|
+
583: <span class="ruby-keyword kw">end</span></pre>
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
</div>
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
</div>
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
<div id="button-link-method" class="method-detail ">
|
|
364
|
+
<a name="method-i-button_link"></a>
|
|
365
|
+
|
|
366
|
+
<div class="method-heading">
|
|
367
|
+
|
|
368
|
+
<span class="method-name">button_link</span><span
|
|
369
|
+
class="method-args">(name, link, options = {})</span>
|
|
370
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
371
|
+
|
|
372
|
+
</div>
|
|
373
|
+
|
|
374
|
+
<div class="method-description">
|
|
375
|
+
|
|
376
|
+
<p>
|
|
377
|
+
Button Link
|
|
378
|
+
</p>
|
|
379
|
+
<h4>Examples</h4>
|
|
380
|
+
<pre>
|
|
381
|
+
button_link 'New Post', new_post_path
|
|
382
|
+
# => <a data-role="button" href="http://google.com">New Post</a>
|
|
383
|
+
|
|
384
|
+
button_link 'New Post', new_post_path, {'data-theme' => 'c', 'data-icon' => 'plus', 'data-iconpos' => 'right'}
|
|
385
|
+
# => <a data-icon="plus" data-iconpos="right" data-role="button" data-theme="c" href="http://google.com">New Post</a></pre>
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
<div class="method-source-code"
|
|
390
|
+
id="button-link-source">
|
|
391
|
+
<pre>
|
|
392
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 15</span>
|
|
393
|
+
15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
394
|
+
16:
|
|
395
|
+
17: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
396
|
+
18: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>}
|
|
397
|
+
19:
|
|
398
|
+
20: <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>)
|
|
399
|
+
21: <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>]})
|
|
400
|
+
22: <span class="ruby-keyword kw">end</span>
|
|
401
|
+
23:
|
|
402
|
+
24: <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>)
|
|
403
|
+
25: <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>]})
|
|
404
|
+
26: <span class="ruby-keyword kw">end</span>
|
|
405
|
+
27:
|
|
406
|
+
28: <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>)
|
|
407
|
+
29: <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>]})
|
|
408
|
+
30: <span class="ruby-keyword kw">end</span>
|
|
409
|
+
31:
|
|
410
|
+
32: <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-inline'</span>)
|
|
411
|
+
33: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
412
|
+
34: <span class="ruby-keyword kw">end</span>
|
|
413
|
+
35:
|
|
414
|
+
36: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
415
|
+
37: <span class="ruby-keyword kw">end</span></pre>
|
|
416
|
+
</div>
|
|
417
|
+
|
|
418
|
+
</div>
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
</div>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
<div id="check-button-link-method" class="method-detail ">
|
|
427
|
+
<a name="method-i-check_button_link"></a>
|
|
428
|
+
|
|
429
|
+
<div class="method-heading">
|
|
430
|
+
|
|
431
|
+
<span class="method-name">check_button_link</span><span
|
|
432
|
+
class="method-args">(name, link, options = {})</span>
|
|
433
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
434
|
+
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
<div class="method-description">
|
|
438
|
+
|
|
439
|
+
<p>
|
|
440
|
+
Check Button Link
|
|
441
|
+
</p>
|
|
442
|
+
<h4>Examples</h4>
|
|
443
|
+
<pre>
|
|
444
|
+
check_button_link 'check', new_post_path
|
|
445
|
+
# => <a data-role="button" data-icon="check" href="/posts/new">check</a>
|
|
446
|
+
|
|
447
|
+
check_button_link 'check', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
448
|
+
# => <a data-role="button" data-icon="check" data-iconpos="right" data-theme="c" href="/posts/new">check</a></pre>
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
<div class="method-source-code"
|
|
453
|
+
id="check-button-link-source">
|
|
454
|
+
<pre>
|
|
455
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 251</span>
|
|
456
|
+
251: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
457
|
+
252:
|
|
458
|
+
253: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
459
|
+
254: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"check"</span>}
|
|
460
|
+
255:
|
|
461
|
+
256: <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>)
|
|
462
|
+
257: <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>]})
|
|
463
|
+
258: <span class="ruby-keyword kw">end</span>
|
|
464
|
+
259:
|
|
465
|
+
260: <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>)
|
|
466
|
+
261: <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>]})
|
|
467
|
+
262: <span class="ruby-keyword kw">end</span>
|
|
468
|
+
263:
|
|
469
|
+
264: <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-inline'</span>)
|
|
470
|
+
265: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
471
|
+
266: <span class="ruby-keyword kw">end</span>
|
|
472
|
+
267:
|
|
473
|
+
268: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
474
|
+
269: <span class="ruby-keyword kw">end</span></pre>
|
|
475
|
+
</div>
|
|
476
|
+
|
|
477
|
+
</div>
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
</div>
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
<div id="delete-button-link-method" class="method-detail ">
|
|
486
|
+
<a name="method-i-delete_button_link"></a>
|
|
487
|
+
|
|
488
|
+
<div class="method-heading">
|
|
489
|
+
|
|
490
|
+
<span class="method-name">delete_button_link</span><span
|
|
491
|
+
class="method-args">(name, link, options = {})</span>
|
|
492
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
493
|
+
|
|
494
|
+
</div>
|
|
495
|
+
|
|
496
|
+
<div class="method-description">
|
|
497
|
+
|
|
498
|
+
<p>
|
|
499
|
+
Delete Button Link
|
|
500
|
+
</p>
|
|
501
|
+
<h4>Examples</h4>
|
|
502
|
+
<pre>
|
|
503
|
+
delete_button_link 'Delete', destroy_path
|
|
504
|
+
# => <a data-role="button" data-icon="delete" href="/posts/new">Delete</a>
|
|
505
|
+
|
|
506
|
+
delete_button_link 'Delete', destroy_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
507
|
+
# => <a data-role="button" data-icon="delete" data-iconpos="right" data-theme="c" href="/posts/destroy">Delete</a></pre>
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
<div class="method-source-code"
|
|
512
|
+
id="delete-button-link-source">
|
|
513
|
+
<pre>
|
|
514
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 48</span>
|
|
515
|
+
48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
516
|
+
49:
|
|
517
|
+
50: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
518
|
+
51: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"delete"</span>}
|
|
519
|
+
52:
|
|
520
|
+
53: <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>)
|
|
521
|
+
54: <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>]})
|
|
522
|
+
55: <span class="ruby-keyword kw">end</span>
|
|
523
|
+
56:
|
|
524
|
+
57: <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>)
|
|
525
|
+
58: <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>]})
|
|
526
|
+
59: <span class="ruby-keyword kw">end</span>
|
|
527
|
+
60:
|
|
528
|
+
61: <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-inline'</span>)
|
|
529
|
+
62: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
530
|
+
63: <span class="ruby-keyword kw">end</span>
|
|
531
|
+
64:
|
|
532
|
+
65: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
533
|
+
66: <span class="ruby-keyword kw">end</span></pre>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
</div>
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
</div>
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
<div id="down-button-link-method" class="method-detail ">
|
|
545
|
+
<a name="method-i-down_button_link"></a>
|
|
546
|
+
|
|
547
|
+
<div class="method-heading">
|
|
548
|
+
|
|
549
|
+
<span class="method-name">down_button_link</span><span
|
|
550
|
+
class="method-args">(name, link, options = {})</span>
|
|
551
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
552
|
+
|
|
553
|
+
</div>
|
|
554
|
+
|
|
555
|
+
<div class="method-description">
|
|
556
|
+
|
|
557
|
+
<p>
|
|
558
|
+
Down Button Link
|
|
559
|
+
</p>
|
|
560
|
+
<h4>Examples</h4>
|
|
561
|
+
<pre>
|
|
562
|
+
down_button_link 'bottom', new_post_path
|
|
563
|
+
# => <a data-role="button" data-icon="arrow-d" href="/posts/new">bottom</a>
|
|
564
|
+
|
|
565
|
+
down_button_link 'bottom', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'bottom'}
|
|
566
|
+
# => <a data-role="button" data-icon="arrow-d" data-iconpos="bottom" data-theme="c" href="/posts/new">bottom</a></pre>
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
<div class="method-source-code"
|
|
571
|
+
id="down-button-link-source">
|
|
572
|
+
<pre>
|
|
573
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 164</span>
|
|
574
|
+
164: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">down_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
575
|
+
165:
|
|
576
|
+
166: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
577
|
+
167: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"arrow-d"</span>}
|
|
578
|
+
168:
|
|
579
|
+
169: <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>)
|
|
580
|
+
170: <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>]})
|
|
581
|
+
171: <span class="ruby-keyword kw">end</span>
|
|
582
|
+
172:
|
|
583
|
+
173: <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>)
|
|
584
|
+
174: <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>]})
|
|
585
|
+
175: <span class="ruby-keyword kw">end</span>
|
|
586
|
+
176:
|
|
587
|
+
177: <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-inline'</span>)
|
|
588
|
+
178: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
589
|
+
179: <span class="ruby-keyword kw">end</span>
|
|
590
|
+
180:
|
|
591
|
+
181: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
592
|
+
182: <span class="ruby-keyword kw">end</span></pre>
|
|
593
|
+
</div>
|
|
594
|
+
|
|
595
|
+
</div>
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
</div>
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
<div id="forward-button-link-method" class="method-detail ">
|
|
604
|
+
<a name="method-i-forward_button_link"></a>
|
|
605
|
+
|
|
606
|
+
<div class="method-heading">
|
|
607
|
+
|
|
608
|
+
<span class="method-name">forward_button_link</span><span
|
|
609
|
+
class="method-args">(name, link, options = {})</span>
|
|
610
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
611
|
+
|
|
612
|
+
</div>
|
|
613
|
+
|
|
614
|
+
<div class="method-description">
|
|
615
|
+
|
|
616
|
+
<p>
|
|
617
|
+
Forward Button Link
|
|
618
|
+
</p>
|
|
619
|
+
<h4>Examples</h4>
|
|
620
|
+
<pre>
|
|
621
|
+
forward_button_link 'forward', new_post_path
|
|
622
|
+
# => <a data-role="button" data-icon="forward" href="/posts/new">forward</a>
|
|
623
|
+
|
|
624
|
+
forward_button_link 'forward', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
625
|
+
# => <a data-role="button" data-icon="forward" data-iconpos="right" data-theme="c" href="/posts/new">forward</a></pre>
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
<div class="method-source-code"
|
|
630
|
+
id="forward-button-link-source">
|
|
631
|
+
<pre>
|
|
632
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 338</span>
|
|
633
|
+
338: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">forward_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
634
|
+
339:
|
|
635
|
+
340: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
636
|
+
341: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"forward"</span>}
|
|
637
|
+
342:
|
|
638
|
+
343: <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>)
|
|
639
|
+
344: <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>]})
|
|
640
|
+
345: <span class="ruby-keyword kw">end</span>
|
|
641
|
+
346:
|
|
642
|
+
347: <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>)
|
|
643
|
+
348: <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>]})
|
|
644
|
+
349: <span class="ruby-keyword kw">end</span>
|
|
645
|
+
350:
|
|
646
|
+
351: <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-inline'</span>)
|
|
647
|
+
352: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
648
|
+
353: <span class="ruby-keyword kw">end</span>
|
|
649
|
+
354:
|
|
650
|
+
355: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
651
|
+
356: <span class="ruby-keyword kw">end</span></pre>
|
|
652
|
+
</div>
|
|
653
|
+
|
|
654
|
+
</div>
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
</div>
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
<div id="gear-button-link-method" class="method-detail ">
|
|
663
|
+
<a name="method-i-gear_button_link"></a>
|
|
664
|
+
|
|
665
|
+
<div class="method-heading">
|
|
666
|
+
|
|
667
|
+
<span class="method-name">gear_button_link</span><span
|
|
668
|
+
class="method-args">(name, link, options = {})</span>
|
|
669
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
670
|
+
|
|
671
|
+
</div>
|
|
672
|
+
|
|
673
|
+
<div class="method-description">
|
|
674
|
+
|
|
675
|
+
<p>
|
|
676
|
+
Gear Button Link
|
|
677
|
+
</p>
|
|
678
|
+
<h4>Examples</h4>
|
|
679
|
+
<pre>
|
|
680
|
+
gear_button_link 'gear', new_post_path
|
|
681
|
+
# => <a data-role="button" data-icon="gear" href="/posts/new">gear</a>
|
|
682
|
+
|
|
683
|
+
gear_button_link 'gear', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
684
|
+
# => <a data-role="button" data-icon="gear" data-iconpos="right" data-theme="c" href="/posts/new">gear</a></pre>
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
<div class="method-source-code"
|
|
689
|
+
id="gear-button-link-source">
|
|
690
|
+
<pre>
|
|
691
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 280</span>
|
|
692
|
+
280: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gear_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
693
|
+
281:
|
|
694
|
+
282: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
695
|
+
283: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"gear"</span>}
|
|
696
|
+
284:
|
|
697
|
+
285: <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>)
|
|
698
|
+
286: <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>]})
|
|
699
|
+
287: <span class="ruby-keyword kw">end</span>
|
|
700
|
+
288:
|
|
701
|
+
289: <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>)
|
|
702
|
+
290: <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>]})
|
|
703
|
+
291: <span class="ruby-keyword kw">end</span>
|
|
704
|
+
292:
|
|
705
|
+
293: <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-inline'</span>)
|
|
706
|
+
294: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
707
|
+
295: <span class="ruby-keyword kw">end</span>
|
|
708
|
+
296:
|
|
709
|
+
297: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
710
|
+
298: <span class="ruby-keyword kw">end</span></pre>
|
|
711
|
+
</div>
|
|
712
|
+
|
|
713
|
+
</div>
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
</div>
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
<div id="grid-button-link-method" class="method-detail ">
|
|
722
|
+
<a name="method-i-grid_button_link"></a>
|
|
723
|
+
|
|
724
|
+
<div class="method-heading">
|
|
725
|
+
|
|
726
|
+
<span class="method-name">grid_button_link</span><span
|
|
727
|
+
class="method-args">(name, link, options = {})</span>
|
|
728
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
729
|
+
|
|
730
|
+
</div>
|
|
731
|
+
|
|
732
|
+
<div class="method-description">
|
|
733
|
+
|
|
734
|
+
<p>
|
|
735
|
+
Grid Button Link
|
|
736
|
+
</p>
|
|
737
|
+
<h4>Examples</h4>
|
|
738
|
+
<pre>
|
|
739
|
+
grid_button_link 'grid', new_post_path
|
|
740
|
+
# => <a data-role="button" data-icon="grid" href="/posts/new">grid</a>
|
|
741
|
+
|
|
742
|
+
grid_button_link 'grid', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
743
|
+
# => <a data-role="button" data-icon="grid" data-iconpos="right" data-theme="c" href="/posts/new">grid</a></pre>
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
<div class="method-source-code"
|
|
748
|
+
id="grid-button-link-source">
|
|
749
|
+
<pre>
|
|
750
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 396</span>
|
|
751
|
+
396: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">grid_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
752
|
+
397:
|
|
753
|
+
398: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
754
|
+
399: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"grid"</span>}
|
|
755
|
+
400:
|
|
756
|
+
401: <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>)
|
|
757
|
+
402: <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>]})
|
|
758
|
+
403: <span class="ruby-keyword kw">end</span>
|
|
759
|
+
404:
|
|
760
|
+
405: <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>)
|
|
761
|
+
406: <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>]})
|
|
762
|
+
407: <span class="ruby-keyword kw">end</span>
|
|
763
|
+
408:
|
|
764
|
+
409: <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-inline'</span>)
|
|
765
|
+
410: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
766
|
+
411: <span class="ruby-keyword kw">end</span>
|
|
767
|
+
412:
|
|
768
|
+
413: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
769
|
+
414: <span class="ruby-keyword kw">end</span></pre>
|
|
770
|
+
</div>
|
|
771
|
+
|
|
772
|
+
</div>
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
</div>
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
<div id="group-button-method" class="method-detail ">
|
|
781
|
+
<a name="method-i-group_button"></a>
|
|
782
|
+
|
|
783
|
+
<div class="method-heading">
|
|
784
|
+
|
|
785
|
+
<span class="method-name">group_button</span><span
|
|
786
|
+
class="method-args">(content, options = {})</span>
|
|
787
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
788
|
+
|
|
789
|
+
</div>
|
|
790
|
+
|
|
791
|
+
<div class="method-description">
|
|
792
|
+
|
|
793
|
+
<p>
|
|
794
|
+
Grouped Button
|
|
795
|
+
</p>
|
|
796
|
+
<h4>Examples</h4>
|
|
797
|
+
<pre>
|
|
798
|
+
group_button("
|
|
799
|
+
#{home_button_link('home', buttons_path, 'data-iconpos' => 'right')}
|
|
800
|
+
#{refresh_button_link 'refresh', buttons_path}
|
|
801
|
+
")
|
|
802
|
+
# => <div data-role="controlgroup">
|
|
803
|
+
<a data-icon="home" data-iconpos="right" data-role="button" href="/buttons">home</a>
|
|
804
|
+
<a data-icon="refresh" data-role="button" href="/buttons">refresh</a>
|
|
805
|
+
</div>
|
|
806
|
+
|
|
807
|
+
group_button("
|
|
808
|
+
#{home_button_link('home', buttons_path, 'data-iconpos' => 'right')}
|
|
809
|
+
#{refresh_button_link 'refresh', buttons_path}, {'data-type' => 'horizontal'}
|
|
810
|
+
")
|
|
811
|
+
# => <div data-role="controlgroup" data-type="horizontal" >
|
|
812
|
+
<a data-icon="home" data-iconpos="right" data-role="button" href="/buttons">home</a>
|
|
813
|
+
<a data-icon="refresh" data-role="button" href="/buttons">refresh</a>
|
|
814
|
+
</div></pre>
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
<div class="method-source-code"
|
|
819
|
+
id="group-button-source">
|
|
820
|
+
<pre>
|
|
821
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 605</span>
|
|
822
|
+
605: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group_button</span>(<span class="ruby-identifier">content</span>, <span class="ruby-identifier">options</span> = {})
|
|
823
|
+
606:
|
|
824
|
+
607: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
825
|
+
608: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"controlgroup"</span>}
|
|
826
|
+
609:
|
|
827
|
+
610: <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-type'</span>)
|
|
828
|
+
611: <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-type'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-type'</span>]})
|
|
829
|
+
612: <span class="ruby-keyword kw">end</span>
|
|
830
|
+
613:
|
|
831
|
+
614: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:div</span>, <span class="ruby-identifier">content</span>, <span class="ruby-identifier">default_options</span>, <span class="ruby-keyword kw">false</span>)
|
|
832
|
+
615: <span class="ruby-keyword kw">end</span></pre>
|
|
833
|
+
</div>
|
|
834
|
+
|
|
835
|
+
</div>
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
</div>
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
<div id="home-button-link-method" class="method-detail ">
|
|
844
|
+
<a name="method-i-home_button_link"></a>
|
|
845
|
+
|
|
846
|
+
<div class="method-heading">
|
|
847
|
+
|
|
848
|
+
<span class="method-name">home_button_link</span><span
|
|
849
|
+
class="method-args">(name, link, options = {})</span>
|
|
850
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
851
|
+
|
|
852
|
+
</div>
|
|
853
|
+
|
|
854
|
+
<div class="method-description">
|
|
855
|
+
|
|
856
|
+
<p>
|
|
857
|
+
Home Button Link
|
|
858
|
+
</p>
|
|
859
|
+
<h4>Examples</h4>
|
|
860
|
+
<pre>
|
|
861
|
+
home_button_link 'home', new_post_path
|
|
862
|
+
# => <a data-role="button" data-icon="home" href="/posts/new">home</a>
|
|
863
|
+
|
|
864
|
+
home_button_link 'home', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
865
|
+
# => <a data-role="button" data-icon="home" data-iconpos="right" data-theme="c" href="/posts/new">home</a></pre>
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
<div class="method-source-code"
|
|
870
|
+
id="home-button-link-source">
|
|
871
|
+
<pre>
|
|
872
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 512</span>
|
|
873
|
+
512: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">home_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
874
|
+
513:
|
|
875
|
+
514: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
876
|
+
515: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"home"</span>}
|
|
877
|
+
516:
|
|
878
|
+
517: <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>)
|
|
879
|
+
518: <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>]})
|
|
880
|
+
519: <span class="ruby-keyword kw">end</span>
|
|
881
|
+
520:
|
|
882
|
+
521: <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>)
|
|
883
|
+
522: <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>]})
|
|
884
|
+
523: <span class="ruby-keyword kw">end</span>
|
|
885
|
+
524:
|
|
886
|
+
525: <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-inline'</span>)
|
|
887
|
+
526: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
888
|
+
527: <span class="ruby-keyword kw">end</span>
|
|
889
|
+
528:
|
|
890
|
+
529: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
891
|
+
530: <span class="ruby-keyword kw">end</span></pre>
|
|
892
|
+
</div>
|
|
893
|
+
|
|
894
|
+
</div>
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
</div>
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
<div id="info-button-link-method" class="method-detail ">
|
|
903
|
+
<a name="method-i-info_button_link"></a>
|
|
904
|
+
|
|
905
|
+
<div class="method-heading">
|
|
906
|
+
|
|
907
|
+
<span class="method-name">info_button_link</span><span
|
|
908
|
+
class="method-args">(name, link, options = {})</span>
|
|
909
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
910
|
+
|
|
911
|
+
</div>
|
|
912
|
+
|
|
913
|
+
<div class="method-description">
|
|
914
|
+
|
|
915
|
+
<p>
|
|
916
|
+
Info Button Link
|
|
917
|
+
</p>
|
|
918
|
+
<h4>Examples</h4>
|
|
919
|
+
<pre>
|
|
920
|
+
info_button_link 'info', new_post_path
|
|
921
|
+
# => <a data-role="button" data-icon="info" href="/posts/new">info</a>
|
|
922
|
+
|
|
923
|
+
info_button_link 'info', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
924
|
+
# => <a data-role="button" data-icon="info" data-iconpos="right" data-theme="c" href="/posts/new">info</a></pre>
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
<div class="method-source-code"
|
|
929
|
+
id="info-button-link-source">
|
|
930
|
+
<pre>
|
|
931
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 483</span>
|
|
932
|
+
483: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">info_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
933
|
+
484:
|
|
934
|
+
485: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
935
|
+
486: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"info"</span>}
|
|
936
|
+
487:
|
|
937
|
+
488: <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>)
|
|
938
|
+
489: <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>]})
|
|
939
|
+
490: <span class="ruby-keyword kw">end</span>
|
|
940
|
+
491:
|
|
941
|
+
492: <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>)
|
|
942
|
+
493: <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>]})
|
|
943
|
+
494: <span class="ruby-keyword kw">end</span>
|
|
944
|
+
495:
|
|
945
|
+
496: <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-inline'</span>)
|
|
946
|
+
497: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
947
|
+
498: <span class="ruby-keyword kw">end</span>
|
|
948
|
+
499:
|
|
949
|
+
500: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
950
|
+
501: <span class="ruby-keyword kw">end</span></pre>
|
|
951
|
+
</div>
|
|
952
|
+
|
|
953
|
+
</div>
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
</div>
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
<div id="inline-button-method" class="method-detail ">
|
|
962
|
+
<a name="method-i-inline_button"></a>
|
|
963
|
+
|
|
964
|
+
<div class="method-heading">
|
|
965
|
+
|
|
966
|
+
<span class="method-name">inline_button</span><span
|
|
967
|
+
class="method-args">(content)</span>
|
|
968
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
969
|
+
|
|
970
|
+
</div>
|
|
971
|
+
|
|
972
|
+
<div class="method-description">
|
|
973
|
+
|
|
974
|
+
<p>
|
|
975
|
+
Inline Buttons
|
|
976
|
+
</p>
|
|
977
|
+
<h4>Examples</h4>
|
|
978
|
+
<pre>
|
|
979
|
+
inline_button("
|
|
980
|
+
#{home_button_link('home', buttons_path, 'data-iconpos' => 'right')}
|
|
981
|
+
#{refresh_button_link 'refresh', buttons_path}
|
|
982
|
+
")
|
|
983
|
+
# => <div data-inline="true" data-role="controlgroup" data-type="horizontal">
|
|
984
|
+
<a data-icon="home" data-iconpos="right" data-role="button" href="/buttons">home</a>
|
|
985
|
+
<a data-icon="refresh" data-role="button" href="/buttons">refresh</a>
|
|
986
|
+
</div></pre>
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
<div class="method-source-code"
|
|
991
|
+
id="inline-button-source">
|
|
992
|
+
<pre>
|
|
993
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 630</span>
|
|
994
|
+
630: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inline_button</span>(<span class="ruby-identifier">content</span>)
|
|
995
|
+
631:
|
|
996
|
+
632: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-inline'</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"true"</span>, <span class="ruby-value str">'data-role'</span>=<span class="ruby-operator">></span> <span class="ruby-value str">"controlgroup"</span>, <span class="ruby-value str">'data-type'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"horizontal"</span>}
|
|
997
|
+
633:
|
|
998
|
+
634: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:div</span>, <span class="ruby-identifier">content</span>, <span class="ruby-identifier">default_options</span>, <span class="ruby-keyword kw">false</span>)
|
|
999
|
+
635: <span class="ruby-keyword kw">end</span></pre>
|
|
1000
|
+
</div>
|
|
1001
|
+
|
|
1002
|
+
</div>
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
</div>
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
<div id="left-button-link-method" class="method-detail ">
|
|
1011
|
+
<a name="method-i-left_button_link"></a>
|
|
1012
|
+
|
|
1013
|
+
<div class="method-heading">
|
|
1014
|
+
|
|
1015
|
+
<span class="method-name">left_button_link</span><span
|
|
1016
|
+
class="method-args">(name, link, options = {})</span>
|
|
1017
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1018
|
+
|
|
1019
|
+
</div>
|
|
1020
|
+
|
|
1021
|
+
<div class="method-description">
|
|
1022
|
+
|
|
1023
|
+
<p>
|
|
1024
|
+
Left Button Link
|
|
1025
|
+
</p>
|
|
1026
|
+
<h4>Examples</h4>
|
|
1027
|
+
<pre>
|
|
1028
|
+
left_button_link 'Back', new_post_path
|
|
1029
|
+
# => <a data-role="button" data-icon="arrow-l" href="/posts/new">Back</a>
|
|
1030
|
+
|
|
1031
|
+
left_button_link 'Back', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
1032
|
+
# => <a data-role="button" data-icon="arrow-l" data-iconpos="right" data-theme="c" href="/posts/new">Back</a></pre>
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
<div class="method-source-code"
|
|
1037
|
+
id="left-button-link-source">
|
|
1038
|
+
<pre>
|
|
1039
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 77</span>
|
|
1040
|
+
77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">left_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1041
|
+
78:
|
|
1042
|
+
79: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1043
|
+
80: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"arrow-l"</span>}
|
|
1044
|
+
81:
|
|
1045
|
+
82: <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>)
|
|
1046
|
+
83: <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>]})
|
|
1047
|
+
84: <span class="ruby-keyword kw">end</span>
|
|
1048
|
+
85:
|
|
1049
|
+
86: <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>)
|
|
1050
|
+
87: <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>]})
|
|
1051
|
+
88: <span class="ruby-keyword kw">end</span>
|
|
1052
|
+
89:
|
|
1053
|
+
90: <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-inline'</span>)
|
|
1054
|
+
91: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1055
|
+
92: <span class="ruby-keyword kw">end</span>
|
|
1056
|
+
93:
|
|
1057
|
+
94: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1058
|
+
95: <span class="ruby-keyword kw">end</span></pre>
|
|
1059
|
+
</div>
|
|
1060
|
+
|
|
1061
|
+
</div>
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
</div>
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
<div id="minus-button-link-method" class="method-detail ">
|
|
1070
|
+
<a name="method-i-minus_button_link"></a>
|
|
1071
|
+
|
|
1072
|
+
<div class="method-heading">
|
|
1073
|
+
|
|
1074
|
+
<span class="method-name">minus_button_link</span><span
|
|
1075
|
+
class="method-args">(name, link, options = {})</span>
|
|
1076
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1077
|
+
|
|
1078
|
+
</div>
|
|
1079
|
+
|
|
1080
|
+
<div class="method-description">
|
|
1081
|
+
|
|
1082
|
+
<p>
|
|
1083
|
+
Minus Button Link
|
|
1084
|
+
</p>
|
|
1085
|
+
<h4>Examples</h4>
|
|
1086
|
+
<pre>
|
|
1087
|
+
minus_button_link 'minus', new_post_path
|
|
1088
|
+
# => <a data-role="button" data-icon="minus" href="/posts/new">minus</a>
|
|
1089
|
+
|
|
1090
|
+
minus_button_link 'minus', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
1091
|
+
# => <a data-role="button" data-icon="minus" data-iconpos="right" data-theme="c" href="/posts/new">minus</a></pre>
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
<div class="method-source-code"
|
|
1096
|
+
id="minus-button-link-source">
|
|
1097
|
+
<pre>
|
|
1098
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 222</span>
|
|
1099
|
+
222: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">minus_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1100
|
+
223:
|
|
1101
|
+
224: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1102
|
+
225: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"minus"</span>}
|
|
1103
|
+
226:
|
|
1104
|
+
227: <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>)
|
|
1105
|
+
228: <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>]})
|
|
1106
|
+
229: <span class="ruby-keyword kw">end</span>
|
|
1107
|
+
230:
|
|
1108
|
+
231: <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>)
|
|
1109
|
+
232: <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>]})
|
|
1110
|
+
233: <span class="ruby-keyword kw">end</span>
|
|
1111
|
+
234:
|
|
1112
|
+
235: <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-inline'</span>)
|
|
1113
|
+
236: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1114
|
+
237: <span class="ruby-keyword kw">end</span>
|
|
1115
|
+
238:
|
|
1116
|
+
239: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1117
|
+
240: <span class="ruby-keyword kw">end</span></pre>
|
|
1118
|
+
</div>
|
|
1119
|
+
|
|
1120
|
+
</div>
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
</div>
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
<div id="plus-button-link-method" class="method-detail ">
|
|
1129
|
+
<a name="method-i-plus_button_link"></a>
|
|
1130
|
+
|
|
1131
|
+
<div class="method-heading">
|
|
1132
|
+
|
|
1133
|
+
<span class="method-name">plus_button_link</span><span
|
|
1134
|
+
class="method-args">(name, link, options = {})</span>
|
|
1135
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1136
|
+
|
|
1137
|
+
</div>
|
|
1138
|
+
|
|
1139
|
+
<div class="method-description">
|
|
1140
|
+
|
|
1141
|
+
<p>
|
|
1142
|
+
Plus Button Link
|
|
1143
|
+
</p>
|
|
1144
|
+
<h4>Examples</h4>
|
|
1145
|
+
<pre>
|
|
1146
|
+
plus_button_link 'plus', new_post_path
|
|
1147
|
+
# => <a data-role="button" data-icon="plus" href="/posts/new">plus</a>
|
|
1148
|
+
|
|
1149
|
+
plus_button_link 'plus', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
1150
|
+
# => <a data-role="button" data-icon="plus" data-iconpos="right" data-theme="c" href="/posts/new">plus</a></pre>
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
<div class="method-source-code"
|
|
1155
|
+
id="plus-button-link-source">
|
|
1156
|
+
<pre>
|
|
1157
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 193</span>
|
|
1158
|
+
193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">plus_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1159
|
+
194:
|
|
1160
|
+
195: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1161
|
+
196: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"plus"</span>}
|
|
1162
|
+
197:
|
|
1163
|
+
198: <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>)
|
|
1164
|
+
199: <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>]})
|
|
1165
|
+
200: <span class="ruby-keyword kw">end</span>
|
|
1166
|
+
201:
|
|
1167
|
+
202: <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>)
|
|
1168
|
+
203: <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>]})
|
|
1169
|
+
204: <span class="ruby-keyword kw">end</span>
|
|
1170
|
+
205:
|
|
1171
|
+
206: <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-inline'</span>)
|
|
1172
|
+
207: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1173
|
+
208: <span class="ruby-keyword kw">end</span>
|
|
1174
|
+
209:
|
|
1175
|
+
210: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1176
|
+
211: <span class="ruby-keyword kw">end</span></pre>
|
|
1177
|
+
</div>
|
|
1178
|
+
|
|
1179
|
+
</div>
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
</div>
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
<div id="refresh-button-link-method" class="method-detail ">
|
|
1188
|
+
<a name="method-i-refresh_button_link"></a>
|
|
1189
|
+
|
|
1190
|
+
<div class="method-heading">
|
|
1191
|
+
|
|
1192
|
+
<span class="method-name">refresh_button_link</span><span
|
|
1193
|
+
class="method-args">(name, link, options = {})</span>
|
|
1194
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1195
|
+
|
|
1196
|
+
</div>
|
|
1197
|
+
|
|
1198
|
+
<div class="method-description">
|
|
1199
|
+
|
|
1200
|
+
<p>
|
|
1201
|
+
Refresh Button Link
|
|
1202
|
+
</p>
|
|
1203
|
+
<h4>Examples</h4>
|
|
1204
|
+
<pre>
|
|
1205
|
+
refresh_button_link 'refresh', new_post_path
|
|
1206
|
+
# => <a data-role="button" data-icon="refresh" href="/posts/new">refresh</a>
|
|
1207
|
+
|
|
1208
|
+
refresh_button_link 'refresh', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
1209
|
+
# => <a data-role="button" data-icon="refresh" data-iconpos="right" data-theme="c" href="/posts/new">refresh</a></pre>
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
<div class="method-source-code"
|
|
1214
|
+
id="refresh-button-link-source">
|
|
1215
|
+
<pre>
|
|
1216
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 309</span>
|
|
1217
|
+
309: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">refresh_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1218
|
+
310:
|
|
1219
|
+
311: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1220
|
+
312: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"refresh"</span>}
|
|
1221
|
+
313:
|
|
1222
|
+
314: <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>)
|
|
1223
|
+
315: <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>]})
|
|
1224
|
+
316: <span class="ruby-keyword kw">end</span>
|
|
1225
|
+
317:
|
|
1226
|
+
318: <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>)
|
|
1227
|
+
319: <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>]})
|
|
1228
|
+
320: <span class="ruby-keyword kw">end</span>
|
|
1229
|
+
321:
|
|
1230
|
+
322: <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-inline'</span>)
|
|
1231
|
+
323: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1232
|
+
324: <span class="ruby-keyword kw">end</span>
|
|
1233
|
+
325:
|
|
1234
|
+
326: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1235
|
+
327: <span class="ruby-keyword kw">end</span></pre>
|
|
1236
|
+
</div>
|
|
1237
|
+
|
|
1238
|
+
</div>
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
</div>
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
<div id="right-button-link-method" class="method-detail ">
|
|
1247
|
+
<a name="method-i-right_button_link"></a>
|
|
1248
|
+
|
|
1249
|
+
<div class="method-heading">
|
|
1250
|
+
|
|
1251
|
+
<span class="method-name">right_button_link</span><span
|
|
1252
|
+
class="method-args">(name, link, options = {})</span>
|
|
1253
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1254
|
+
|
|
1255
|
+
</div>
|
|
1256
|
+
|
|
1257
|
+
<div class="method-description">
|
|
1258
|
+
|
|
1259
|
+
<p>
|
|
1260
|
+
Right Button Link
|
|
1261
|
+
</p>
|
|
1262
|
+
<h4>Examples</h4>
|
|
1263
|
+
<pre>
|
|
1264
|
+
right_button_link 'Proceed', new_post_path
|
|
1265
|
+
# => <a data-role="button" data-icon="arrow-r" href="/posts/new" data-theme="c">Proceed</a>
|
|
1266
|
+
|
|
1267
|
+
right_button_link 'Proceed', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
1268
|
+
# => <a data-role="button" data-icon="arrow-r" data-iconpos="right" data-theme="c" href="/posts/new">Proceed</a></pre>
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
<div class="method-source-code"
|
|
1273
|
+
id="right-button-link-source">
|
|
1274
|
+
<pre>
|
|
1275
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 106</span>
|
|
1276
|
+
106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">right_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1277
|
+
107:
|
|
1278
|
+
108: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1279
|
+
109: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"arrow-r"</span>}
|
|
1280
|
+
110:
|
|
1281
|
+
111: <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>)
|
|
1282
|
+
112: <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>]})
|
|
1283
|
+
113: <span class="ruby-keyword kw">end</span>
|
|
1284
|
+
114:
|
|
1285
|
+
115: <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>)
|
|
1286
|
+
116: <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>]})
|
|
1287
|
+
117: <span class="ruby-keyword kw">end</span>
|
|
1288
|
+
118:
|
|
1289
|
+
119: <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-inline'</span>)
|
|
1290
|
+
120: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1291
|
+
121: <span class="ruby-keyword kw">end</span>
|
|
1292
|
+
122:
|
|
1293
|
+
123: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1294
|
+
124: <span class="ruby-keyword kw">end</span></pre>
|
|
1295
|
+
</div>
|
|
1296
|
+
|
|
1297
|
+
</div>
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
</div>
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
<div id="search-button-link-method" class="method-detail ">
|
|
1306
|
+
<a name="method-i-search_button_link"></a>
|
|
1307
|
+
|
|
1308
|
+
<div class="method-heading">
|
|
1309
|
+
|
|
1310
|
+
<span class="method-name">search_button_link</span><span
|
|
1311
|
+
class="method-args">(name, link, options = {})</span>
|
|
1312
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1313
|
+
|
|
1314
|
+
</div>
|
|
1315
|
+
|
|
1316
|
+
<div class="method-description">
|
|
1317
|
+
|
|
1318
|
+
<p>
|
|
1319
|
+
Search Button Link
|
|
1320
|
+
</p>
|
|
1321
|
+
<h4>Examples</h4>
|
|
1322
|
+
<pre>
|
|
1323
|
+
search_button_link 'search', new_post_path
|
|
1324
|
+
# => <a data-role="button" data-icon="search" href="/posts/new">search</a>
|
|
1325
|
+
|
|
1326
|
+
search_button_link 'search', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
1327
|
+
# => <a data-role="button" data-icon="search" data-iconpos="right" data-theme="c" href="/posts/new">search</a></pre>
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
<div class="method-source-code"
|
|
1332
|
+
id="search-button-link-source">
|
|
1333
|
+
<pre>
|
|
1334
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 541</span>
|
|
1335
|
+
541: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1336
|
+
542:
|
|
1337
|
+
543: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1338
|
+
544: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"search"</span>}
|
|
1339
|
+
545:
|
|
1340
|
+
546: <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>)
|
|
1341
|
+
547: <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>]})
|
|
1342
|
+
548: <span class="ruby-keyword kw">end</span>
|
|
1343
|
+
549:
|
|
1344
|
+
550: <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>)
|
|
1345
|
+
551: <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>]})
|
|
1346
|
+
552: <span class="ruby-keyword kw">end</span>
|
|
1347
|
+
553:
|
|
1348
|
+
554: <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-inline'</span>)
|
|
1349
|
+
555: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1350
|
+
556: <span class="ruby-keyword kw">end</span>
|
|
1351
|
+
557:
|
|
1352
|
+
558: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1353
|
+
559: <span class="ruby-keyword kw">end</span></pre>
|
|
1354
|
+
</div>
|
|
1355
|
+
|
|
1356
|
+
</div>
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
</div>
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
<div id="star-button-link-method" class="method-detail ">
|
|
1365
|
+
<a name="method-i-star_button_link"></a>
|
|
1366
|
+
|
|
1367
|
+
<div class="method-heading">
|
|
1368
|
+
|
|
1369
|
+
<span class="method-name">star_button_link</span><span
|
|
1370
|
+
class="method-args">(name, link, options = {})</span>
|
|
1371
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1372
|
+
|
|
1373
|
+
</div>
|
|
1374
|
+
|
|
1375
|
+
<div class="method-description">
|
|
1376
|
+
|
|
1377
|
+
<p>
|
|
1378
|
+
Star Button Link
|
|
1379
|
+
</p>
|
|
1380
|
+
<h4>Examples</h4>
|
|
1381
|
+
<pre>
|
|
1382
|
+
star_button_link 'star', new_post_path
|
|
1383
|
+
# => <a data-role="button" data-icon="star" href="/posts/new">star</a>
|
|
1384
|
+
|
|
1385
|
+
star_button_link 'star', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'right'}
|
|
1386
|
+
# => <a data-role="button" data-icon="star" data-iconpos="right" data-theme="c" href="/posts/new">star</a></pre>
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
<div class="method-source-code"
|
|
1391
|
+
id="star-button-link-source">
|
|
1392
|
+
<pre>
|
|
1393
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 425</span>
|
|
1394
|
+
425: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">star_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1395
|
+
426:
|
|
1396
|
+
427: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1397
|
+
428: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"star"</span>}
|
|
1398
|
+
429:
|
|
1399
|
+
430: <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>)
|
|
1400
|
+
431: <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>]})
|
|
1401
|
+
432: <span class="ruby-keyword kw">end</span>
|
|
1402
|
+
433:
|
|
1403
|
+
434: <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>)
|
|
1404
|
+
435: <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>]})
|
|
1405
|
+
436: <span class="ruby-keyword kw">end</span>
|
|
1406
|
+
437:
|
|
1407
|
+
438: <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-inline'</span>)
|
|
1408
|
+
439: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1409
|
+
440: <span class="ruby-keyword kw">end</span>
|
|
1410
|
+
441:
|
|
1411
|
+
442: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1412
|
+
443: <span class="ruby-keyword kw">end</span></pre>
|
|
1413
|
+
</div>
|
|
1414
|
+
|
|
1415
|
+
</div>
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
</div>
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
<div id="up-button-link-method" class="method-detail ">
|
|
1424
|
+
<a name="method-i-up_button_link"></a>
|
|
1425
|
+
|
|
1426
|
+
<div class="method-heading">
|
|
1427
|
+
|
|
1428
|
+
<span class="method-name">up_button_link</span><span
|
|
1429
|
+
class="method-args">(name, link, options = {})</span>
|
|
1430
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
1431
|
+
|
|
1432
|
+
</div>
|
|
1433
|
+
|
|
1434
|
+
<div class="method-description">
|
|
1435
|
+
|
|
1436
|
+
<p>
|
|
1437
|
+
Up Button Link
|
|
1438
|
+
</p>
|
|
1439
|
+
<h4>Examples</h4>
|
|
1440
|
+
<pre>
|
|
1441
|
+
up_button_link 'top', new_post_path
|
|
1442
|
+
# => <a data-role="button" data-icon="arrow-u" href="/posts/new">top</a>
|
|
1443
|
+
|
|
1444
|
+
up_button_link 'top', new_post_path, {'data-theme' => 'c', 'data-iconpos' => 'top'}
|
|
1445
|
+
# => <a data-role="button" data-icon="arrow-u" data-iconpos="top" data-theme="c" href="/posts/new">top</a></pre>
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
<div class="method-source-code"
|
|
1450
|
+
id="up-button-link-source">
|
|
1451
|
+
<pre>
|
|
1452
|
+
<span class="ruby-comment cmt"># File lib/jqmobile_helpers/buttons_helper.rb, line 135</span>
|
|
1453
|
+
135: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">up_button_link</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">link</span>, <span class="ruby-identifier">options</span> = {})
|
|
1454
|
+
136:
|
|
1455
|
+
137: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">stringify_keys!</span>
|
|
1456
|
+
138: <span class="ruby-identifier">default_options</span> = {<span class="ruby-value str">'data-role'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"button"</span>, <span class="ruby-value str">'data-icon'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"arrow-u"</span>}
|
|
1457
|
+
139:
|
|
1458
|
+
140: <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>)
|
|
1459
|
+
141: <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>]})
|
|
1460
|
+
142: <span class="ruby-keyword kw">end</span>
|
|
1461
|
+
143:
|
|
1462
|
+
144: <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>)
|
|
1463
|
+
145: <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>]})
|
|
1464
|
+
146: <span class="ruby-keyword kw">end</span>
|
|
1465
|
+
147:
|
|
1466
|
+
148: <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-inline'</span>)
|
|
1467
|
+
149: <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-inline'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">html_options</span>[<span class="ruby-value str">'data-inline'</span>]})
|
|
1468
|
+
150: <span class="ruby-keyword kw">end</span>
|
|
1469
|
+
151:
|
|
1470
|
+
152: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:a</span>, <span class="ruby-identifier">name</span>, {<span class="ruby-value">:href</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">link</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">default_options</span>))
|
|
1471
|
+
153: <span class="ruby-keyword kw">end</span></pre>
|
|
1472
|
+
</div>
|
|
1473
|
+
|
|
1474
|
+
</div>
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
</div>
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
</div>
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
</div>
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
1489
|
+
|
|
1490
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
1491
|
+
|
|
1492
|
+
</div>
|
|
1493
|
+
|
|
1494
|
+
<div id="validator-badges">
|
|
1495
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
1496
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
1497
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
1498
|
+
</div>
|
|
1499
|
+
|
|
1500
|
+
</body>
|
|
1501
|
+
</html>
|
|
1502
|
+
|