jqr-helpers 1.0.19 → 1.0.20
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.md +7 -1
- data/app/assets/javascripts/jqr-helpers.js +11 -3
- data/app/assets/stylesheets/jqr-helpers.css +4 -0
- data/doc/JqrHelpers/Generators/InstallGenerator.html +1 -1
- data/doc/JqrHelpers/Generators.html +1 -1
- data/doc/JqrHelpers/Helpers/PanelRenderer.html +1 -1
- data/doc/JqrHelpers/Helpers.html +140 -72
- data/doc/JqrHelpers/Rails.html +2 -2
- data/doc/JqrHelpers/Railtie.html +1 -1
- data/doc/JqrHelpers.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +15 -9
- data/doc/top-level-namespace.html +1 -1
- data/jqr-helpers.gemspec +2 -2
- data/lib/jqr-helpers/helpers.rb +6 -0
- data/lib/jqr-helpers/version.rb +1 -1
- metadata +2 -2
data/Readme.md
CHANGED
@@ -42,6 +42,7 @@ Full documentation can be found [here](https://rawgithub.com/wishabi/jqr-helpers
|
|
42
42
|
* `link_to_remote_dialog` - open a remote dialog when a link is clicked (i.e. load
|
43
43
|
the dialog content from a remote route)
|
44
44
|
* `button_to_remote_dialog` - open a remote dialog when a button is clicked
|
45
|
+
* `dialog_title` - set the dialog title from inside remote content
|
45
46
|
* `link_to_ajax` - send an Ajax request when a link is clicked
|
46
47
|
* `button_to_ajax` - send an Ajax request when a button is clicked
|
47
48
|
* `form_tag_ajax` - send an Ajax request when a form is submitted
|
@@ -49,7 +50,7 @@ the dialog content from a remote route)
|
|
49
50
|
* `tab_container` - create a tab container
|
50
51
|
* `date_picker_tag` - create a date picker
|
51
52
|
* `buttonset` - create a radio button set
|
52
|
-
* `will_paginate_ajax` - create a will_paginate interface that uses Ajax to
|
53
|
+
* `will_paginate_ajax` - create a `will_paginate` interface that uses Ajax to
|
53
54
|
replace the paginated contents.
|
54
55
|
|
55
56
|
There are two sets of options that recur throughout the methods here:
|
@@ -87,6 +88,11 @@ the data into the URL and have Rails populate it on the server side.
|
|
87
88
|
of the screen. `:small` would be a small inline throbber next to the button or
|
88
89
|
link that called the dialog, and `:none` shows no throbber at all.
|
89
90
|
|
91
|
+
A separate method `dialog_title` allows you to set the dialog title in a
|
92
|
+
remote dialog from _within_ the remote content. This allows you to reuse the
|
93
|
+
remote content and call it from multiple pages while still showing the same
|
94
|
+
title.
|
95
|
+
|
90
96
|
A note about dialog ID - you can always pass in the special value `:next` for
|
91
97
|
this. This will use whatever element is just after the clicked element
|
92
98
|
for the dialog contents. This can be useful for printing simple dialogs inside a
|
@@ -114,6 +114,11 @@
|
|
114
114
|
if (closeX) {
|
115
115
|
dialogElement.prepend('<span class="ujs-dialog-x"></span>');
|
116
116
|
}
|
117
|
+
if (dialogElement.find('.ujs-dialog-title-hidden').length) {
|
118
|
+
if (!dialogOptions['title'])
|
119
|
+
dialogOptions['title'] =
|
120
|
+
dialogElement.find('.ujs-dialog-title-hidden').text();
|
121
|
+
}
|
117
122
|
$('.ui-widget-overlay').remove();
|
118
123
|
hideThrobber(ujsDialogElement);
|
119
124
|
$('#ujs-dialog-throbber').remove();
|
@@ -172,9 +177,12 @@
|
|
172
177
|
if (element.data('real-element')) {
|
173
178
|
element = $('#' + element.data('real-element'));
|
174
179
|
}
|
175
|
-
if (element.is('form')
|
176
|
-
|
177
|
-
|
180
|
+
if (element.is('form')) {
|
181
|
+
if ($(ujsSubmitElement).parents('form').index(element) >= 0)
|
182
|
+
element = ujsSubmitElement;
|
183
|
+
else
|
184
|
+
$(element).data('throbber', 'large');
|
185
|
+
}
|
178
186
|
showThrobber(element);
|
179
187
|
}
|
180
188
|
|
@@ -201,7 +201,7 @@
|
|
201
201
|
</div>
|
202
202
|
|
203
203
|
<div id="footer">
|
204
|
-
Generated on
|
204
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
205
205
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
206
206
|
0.8.7.3 (ruby-1.9.3).
|
207
207
|
</div>
|
@@ -106,7 +106,7 @@
|
|
106
106
|
</div>
|
107
107
|
|
108
108
|
<div id="footer">
|
109
|
-
Generated on
|
109
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
110
110
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
111
|
0.8.7.3 (ruby-1.9.3).
|
112
112
|
</div>
|
@@ -452,7 +452,7 @@ be passed as is into the HTML <li> tag.</p>
|
|
452
452
|
</div>
|
453
453
|
|
454
454
|
<div id="footer">
|
455
|
-
Generated on
|
455
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
456
456
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
457
457
|
0.8.7.3 (ruby-1.9.3).
|
458
458
|
</div>
|
data/doc/JqrHelpers/Helpers.html
CHANGED
@@ -285,6 +285,30 @@ nicer-looking than the default window.confirm() which is used by Rails.</p>
|
|
285
285
|
<p>Create a date picker field.</p>
|
286
286
|
</div></span>
|
287
287
|
|
288
|
+
</li>
|
289
|
+
|
290
|
+
|
291
|
+
<li class="public ">
|
292
|
+
<span class="summary_signature">
|
293
|
+
|
294
|
+
<a href="#dialog_title-instance_method" title="#dialog_title (instance method)">- (Object) <strong>dialog_title</strong>(content) </a>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
</span>
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
<span class="summary_desc"><div class='inline'>
|
309
|
+
<p>Set the dialog title from <tt>inside</tt> the dialog itself.</p>
|
310
|
+
</div></span>
|
311
|
+
|
288
312
|
</li>
|
289
313
|
|
290
314
|
|
@@ -506,12 +530,12 @@ using content already on the page.</p>
|
|
506
530
|
<pre class="lines">
|
507
531
|
|
508
532
|
|
509
|
-
|
510
|
-
|
511
|
-
|
533
|
+
319
|
534
|
+
320
|
535
|
+
321</pre>
|
512
536
|
</td>
|
513
537
|
<td>
|
514
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
538
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 319</span>
|
515
539
|
|
516
540
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__random_string'>_random_string</span>
|
517
541
|
<span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_hex'>hex</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span>
|
@@ -621,12 +645,6 @@ button_to, so it can be used inside forms.</p>
|
|
621
645
|
<pre class="lines">
|
622
646
|
|
623
647
|
|
624
|
-
188
|
625
|
-
189
|
626
|
-
190
|
627
|
-
191
|
628
|
-
192
|
629
|
-
193
|
630
648
|
194
|
631
649
|
195
|
632
650
|
196
|
@@ -634,10 +652,16 @@ button_to, so it can be used inside forms.</p>
|
|
634
652
|
198
|
635
653
|
199
|
636
654
|
200
|
637
|
-
201
|
655
|
+
201
|
656
|
+
202
|
657
|
+
203
|
658
|
+
204
|
659
|
+
205
|
660
|
+
206
|
661
|
+
207</pre>
|
638
662
|
</td>
|
639
663
|
<td>
|
640
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
664
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 194</span>
|
641
665
|
|
642
666
|
<span class='kw'>def</span> <span class='id identifier rubyid_button_to_ajax'>button_to_ajax</span><span class='lparen'>(</span><span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
643
667
|
|
@@ -1018,18 +1042,18 @@ then be passed into jQuery's buttonset() method.</p>
|
|
1018
1042
|
<pre class="lines">
|
1019
1043
|
|
1020
1044
|
|
1021
|
-
301
|
1022
|
-
302
|
1023
|
-
303
|
1024
|
-
304
|
1025
|
-
305
|
1026
|
-
306
|
1027
1045
|
307
|
1028
1046
|
308
|
1029
|
-
309
|
1047
|
+
309
|
1048
|
+
310
|
1049
|
+
311
|
1050
|
+
312
|
1051
|
+
313
|
1052
|
+
314
|
1053
|
+
315</pre>
|
1030
1054
|
</td>
|
1031
1055
|
<td>
|
1032
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
1056
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 307</span>
|
1033
1057
|
|
1034
1058
|
<span class='kw'>def</span> <span class='id identifier rubyid_buttonset'>buttonset</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_values'>values</span><span class='comma'>,</span> <span class='id identifier rubyid_selected'>selected</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1035
1059
|
<span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:class</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
@@ -1280,18 +1304,18 @@ the date and the jQuery date format to be the same.</p>
|
|
1280
1304
|
<pre class="lines">
|
1281
1305
|
|
1282
1306
|
|
1283
|
-
284
|
1284
|
-
285
|
1285
|
-
286
|
1286
|
-
287
|
1287
|
-
288
|
1288
|
-
289
|
1289
1307
|
290
|
1290
1308
|
291
|
1291
|
-
292
|
1309
|
+
292
|
1310
|
+
293
|
1311
|
+
294
|
1312
|
+
295
|
1313
|
+
296
|
1314
|
+
297
|
1315
|
+
298</pre>
|
1292
1316
|
</td>
|
1293
1317
|
<td>
|
1294
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
1318
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 290</span>
|
1295
1319
|
|
1296
1320
|
<span class='kw'>def</span> <span class='id identifier rubyid_date_picker_tag'>date_picker_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>=</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1297
1321
|
<span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:format</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>'</span></span>
|
@@ -1305,6 +1329,48 @@ the date and the jQuery date format to be the same.</p>
|
|
1305
1329
|
</td>
|
1306
1330
|
</tr>
|
1307
1331
|
</table>
|
1332
|
+
</div>
|
1333
|
+
|
1334
|
+
<div class="method_details ">
|
1335
|
+
<h3 class="signature " id="dialog_title-instance_method">
|
1336
|
+
|
1337
|
+
- (<tt>Object</tt>) <strong>dialog_title</strong>(content)
|
1338
|
+
|
1339
|
+
|
1340
|
+
|
1341
|
+
|
1342
|
+
|
1343
|
+
</h3><div class="docstring">
|
1344
|
+
<div class="discussion">
|
1345
|
+
|
1346
|
+
<p>Set the dialog title from <tt>inside</tt> the dialog itself. This prints a
|
1347
|
+
hidden div which is read by the UJS callback to set the title.</p>
|
1348
|
+
|
1349
|
+
|
1350
|
+
</div>
|
1351
|
+
</div>
|
1352
|
+
<div class="tags">
|
1353
|
+
|
1354
|
+
|
1355
|
+
</div><table class="source_code">
|
1356
|
+
<tr>
|
1357
|
+
<td>
|
1358
|
+
<pre class="lines">
|
1359
|
+
|
1360
|
+
|
1361
|
+
163
|
1362
|
+
164
|
1363
|
+
165</pre>
|
1364
|
+
</td>
|
1365
|
+
<td>
|
1366
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 163</span>
|
1367
|
+
|
1368
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dialog_title'>dialog_title</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span>
|
1369
|
+
<span class='id identifier rubyid_content_tag'>content_tag</span> <span class='symbol'>:div</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='symbol'>:class</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ujs-dialog-title-hidden</span><span class='tstring_end'>'</span></span>
|
1370
|
+
<span class='kw'>end</span></pre>
|
1371
|
+
</td>
|
1372
|
+
</tr>
|
1373
|
+
</table>
|
1308
1374
|
</div>
|
1309
1375
|
|
1310
1376
|
<div class="method_details ">
|
@@ -1375,20 +1441,20 @@ form_for instead of form_tag.</p>
|
|
1375
1441
|
<pre class="lines">
|
1376
1442
|
|
1377
1443
|
|
1378
|
-
224
|
1379
|
-
225
|
1380
|
-
226
|
1381
|
-
227
|
1382
|
-
228
|
1383
|
-
229
|
1384
1444
|
230
|
1385
1445
|
231
|
1386
1446
|
232
|
1387
1447
|
233
|
1388
|
-
234
|
1448
|
+
234
|
1449
|
+
235
|
1450
|
+
236
|
1451
|
+
237
|
1452
|
+
238
|
1453
|
+
239
|
1454
|
+
240</pre>
|
1389
1455
|
</td>
|
1390
1456
|
<td>
|
1391
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
1457
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 230</span>
|
1392
1458
|
|
1393
1459
|
<span class='kw'>def</span> <span class='id identifier rubyid_form_for_ajax'>form_for_ajax</span><span class='lparen'>(</span><span class='id identifier rubyid_record'>record</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1394
1460
|
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:remote</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -1484,19 +1550,19 @@ form_tag with :remote => true.</p>
|
|
1484
1550
|
<pre class="lines">
|
1485
1551
|
|
1486
1552
|
|
1487
|
-
208
|
1488
|
-
209
|
1489
|
-
210
|
1490
|
-
211
|
1491
|
-
212
|
1492
|
-
213
|
1493
1553
|
214
|
1494
1554
|
215
|
1495
1555
|
216
|
1496
|
-
217
|
1556
|
+
217
|
1557
|
+
218
|
1558
|
+
219
|
1559
|
+
220
|
1560
|
+
221
|
1561
|
+
222
|
1562
|
+
223</pre>
|
1497
1563
|
</td>
|
1498
1564
|
<td>
|
1499
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
1565
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 214</span>
|
1500
1566
|
|
1501
1567
|
<span class='kw'>def</span> <span class='id identifier rubyid_form_tag_ajax'>form_tag_ajax</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1502
1568
|
|
@@ -1609,21 +1675,21 @@ used for the body.</p>
|
|
1609
1675
|
<pre class="lines">
|
1610
1676
|
|
1611
1677
|
|
1612
|
-
169
|
1613
|
-
170
|
1614
|
-
171
|
1615
|
-
172
|
1616
|
-
173
|
1617
|
-
174
|
1618
1678
|
175
|
1619
1679
|
176
|
1620
1680
|
177
|
1621
1681
|
178
|
1622
1682
|
179
|
1623
|
-
180
|
1683
|
+
180
|
1684
|
+
181
|
1685
|
+
182
|
1686
|
+
183
|
1687
|
+
184
|
1688
|
+
185
|
1689
|
+
186</pre>
|
1624
1690
|
</td>
|
1625
1691
|
<td>
|
1626
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
1692
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 175</span>
|
1627
1693
|
|
1628
1694
|
<span class='kw'>def</span> <span class='id identifier rubyid_link_to_ajax'>link_to_ajax</span><span class='lparen'>(</span><span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1629
1695
|
<span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
@@ -2078,12 +2144,6 @@ URL).</p>
|
|
2078
2144
|
<pre class="lines">
|
2079
2145
|
|
2080
2146
|
|
2081
|
-
249
|
2082
|
-
250
|
2083
|
-
251
|
2084
|
-
252
|
2085
|
-
253
|
2086
|
-
254
|
2087
2147
|
255
|
2088
2148
|
256
|
2089
2149
|
257
|
@@ -2102,10 +2162,16 @@ URL).</p>
|
|
2102
2162
|
270
|
2103
2163
|
271
|
2104
2164
|
272
|
2105
|
-
273
|
2165
|
+
273
|
2166
|
+
274
|
2167
|
+
275
|
2168
|
+
276
|
2169
|
+
277
|
2170
|
+
278
|
2171
|
+
279</pre>
|
2106
2172
|
</td>
|
2107
2173
|
<td>
|
2108
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
2174
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 255</span>
|
2109
2175
|
|
2110
2176
|
<span class='kw'>def</span> <span class='id identifier rubyid_tab_container'>tab_container</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
2111
2177
|
<span class='id identifier rubyid_renderer'>renderer</span> <span class='op'>=</span> <span class='const'>PanelRenderer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
@@ -2149,7 +2215,9 @@ URL).</p>
|
|
2149
2215
|
</h3><div class="docstring">
|
2150
2216
|
<div class="discussion">
|
2151
2217
|
|
2152
|
-
<p>Create a will_paginate pagination interface which runs via Ajax
|
2218
|
+
<p>Create a will_paginate pagination interface which runs via Ajax. If
|
2219
|
+
will_paginate is not in the Gemfile or gem environment, this will throw an
|
2220
|
+
error.</p>
|
2153
2221
|
|
2154
2222
|
|
2155
2223
|
</div>
|
@@ -2231,23 +2299,23 @@ selector.</p>
|
|
2231
2299
|
<pre class="lines">
|
2232
2300
|
|
2233
2301
|
|
2234
|
-
383
|
2235
|
-
384
|
2236
|
-
385
|
2237
|
-
386
|
2238
|
-
387
|
2239
|
-
388
|
2240
|
-
389
|
2241
|
-
390
|
2242
2302
|
391
|
2243
2303
|
392
|
2244
2304
|
393
|
2245
2305
|
394
|
2246
2306
|
395
|
2247
|
-
396
|
2307
|
+
396
|
2308
|
+
397
|
2309
|
+
398
|
2310
|
+
399
|
2311
|
+
400
|
2312
|
+
401
|
2313
|
+
402
|
2314
|
+
403
|
2315
|
+
404</pre>
|
2248
2316
|
</td>
|
2249
2317
|
<td>
|
2250
|
-
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line
|
2318
|
+
<pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 391</span>
|
2251
2319
|
|
2252
2320
|
<span class='kw'>def</span> <span class='id identifier rubyid_will_paginate_ajax'>will_paginate_ajax</span><span class='lparen'>(</span><span class='id identifier rubyid_collection'>collection</span><span class='comma'>,</span> <span class='id identifier rubyid_to_update'>to_update</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2253
2321
|
<span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>AjaxLinkRenderer</span><span class='rparen'>)</span>
|
@@ -2273,7 +2341,7 @@ selector.</p>
|
|
2273
2341
|
</div>
|
2274
2342
|
|
2275
2343
|
<div id="footer">
|
2276
|
-
Generated on
|
2344
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
2277
2345
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2278
2346
|
0.8.7.3 (ruby-1.9.3).
|
2279
2347
|
</div>
|
data/doc/JqrHelpers/Rails.html
CHANGED
@@ -92,7 +92,7 @@
|
|
92
92
|
<dt id="VERSION-constant" class="">VERSION =
|
93
93
|
|
94
94
|
</dt>
|
95
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0.
|
95
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0.20</span><span class='tstring_end'>'</span></span></pre></dd>
|
96
96
|
|
97
97
|
</dl>
|
98
98
|
|
@@ -108,7 +108,7 @@
|
|
108
108
|
</div>
|
109
109
|
|
110
110
|
<div id="footer">
|
111
|
-
Generated on
|
111
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
112
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
113
113
|
0.8.7.3 (ruby-1.9.3).
|
114
114
|
</div>
|
data/doc/JqrHelpers/Railtie.html
CHANGED
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.8.7.3 (ruby-1.9.3).
|
120
120
|
</div>
|
data/doc/JqrHelpers.html
CHANGED
@@ -110,7 +110,7 @@
|
|
110
110
|
</div>
|
111
111
|
|
112
112
|
<div id="footer">
|
113
|
-
Generated on
|
113
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
114
114
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
115
115
|
0.8.7.3 (ruby-1.9.3).
|
116
116
|
</div>
|
data/doc/_index.html
CHANGED
@@ -174,7 +174,7 @@
|
|
174
174
|
</div>
|
175
175
|
|
176
176
|
<div id="footer">
|
177
|
-
Generated on
|
177
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
178
178
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
179
179
|
0.8.7.3 (ruby-1.9.3).
|
180
180
|
</div>
|
data/doc/index.html
CHANGED
@@ -174,7 +174,7 @@
|
|
174
174
|
</div>
|
175
175
|
|
176
176
|
<div id="footer">
|
177
|
-
Generated on
|
177
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
178
178
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
179
179
|
0.8.7.3 (ruby-1.9.3).
|
180
180
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -96,60 +96,66 @@
|
|
96
96
|
|
97
97
|
|
98
98
|
<li class="r1 ">
|
99
|
-
<span class='object_link'><a href="JqrHelpers/Helpers.html#
|
99
|
+
<span class='object_link'><a href="JqrHelpers/Helpers.html#dialog_title-instance_method" title="JqrHelpers::Helpers#dialog_title (method)">#dialog_title</a></span>
|
100
100
|
<small>JqrHelpers::Helpers</small>
|
101
101
|
</li>
|
102
102
|
|
103
103
|
|
104
104
|
<li class="r2 ">
|
105
|
-
<span class='object_link'><a href="JqrHelpers/Helpers.html#
|
105
|
+
<span class='object_link'><a href="JqrHelpers/Helpers.html#form_for_ajax-instance_method" title="JqrHelpers::Helpers#form_for_ajax (method)">#form_for_ajax</a></span>
|
106
106
|
<small>JqrHelpers::Helpers</small>
|
107
107
|
</li>
|
108
108
|
|
109
109
|
|
110
110
|
<li class="r1 ">
|
111
|
+
<span class='object_link'><a href="JqrHelpers/Helpers.html#form_tag_ajax-instance_method" title="JqrHelpers::Helpers#form_tag_ajax (method)">#form_tag_ajax</a></span>
|
112
|
+
<small>JqrHelpers::Helpers</small>
|
113
|
+
</li>
|
114
|
+
|
115
|
+
|
116
|
+
<li class="r2 ">
|
111
117
|
<span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#initialize-instance_method" title="JqrHelpers::Helpers::PanelRenderer#initialize (method)">#initialize</a></span>
|
112
118
|
<small>JqrHelpers::Helpers::PanelRenderer</small>
|
113
119
|
</li>
|
114
120
|
|
115
121
|
|
116
|
-
<li class="
|
122
|
+
<li class="r1 ">
|
117
123
|
<span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_ajax-instance_method" title="JqrHelpers::Helpers#link_to_ajax (method)">#link_to_ajax</a></span>
|
118
124
|
<small>JqrHelpers::Helpers</small>
|
119
125
|
</li>
|
120
126
|
|
121
127
|
|
122
|
-
<li class="
|
128
|
+
<li class="r2 ">
|
123
129
|
<span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_dialog-instance_method" title="JqrHelpers::Helpers#link_to_dialog (method)">#link_to_dialog</a></span>
|
124
130
|
<small>JqrHelpers::Helpers</small>
|
125
131
|
</li>
|
126
132
|
|
127
133
|
|
128
|
-
<li class="
|
134
|
+
<li class="r1 ">
|
129
135
|
<span class='object_link'><a href="JqrHelpers/Helpers.html#link_to_remote_dialog-instance_method" title="JqrHelpers::Helpers#link_to_remote_dialog (method)">#link_to_remote_dialog</a></span>
|
130
136
|
<small>JqrHelpers::Helpers</small>
|
131
137
|
</li>
|
132
138
|
|
133
139
|
|
134
|
-
<li class="
|
140
|
+
<li class="r2 ">
|
135
141
|
<span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#panel-instance_method" title="JqrHelpers::Helpers::PanelRenderer#panel (method)">#panel</a></span>
|
136
142
|
<small>JqrHelpers::Helpers::PanelRenderer</small>
|
137
143
|
</li>
|
138
144
|
|
139
145
|
|
140
|
-
<li class="
|
146
|
+
<li class="r1 ">
|
141
147
|
<span class='object_link'><a href="JqrHelpers/Helpers/PanelRenderer.html#panels-instance_method" title="JqrHelpers::Helpers::PanelRenderer#panels (method)">#panels</a></span>
|
142
148
|
<small>JqrHelpers::Helpers::PanelRenderer</small>
|
143
149
|
</li>
|
144
150
|
|
145
151
|
|
146
|
-
<li class="
|
152
|
+
<li class="r2 ">
|
147
153
|
<span class='object_link'><a href="JqrHelpers/Helpers.html#tab_container-instance_method" title="JqrHelpers::Helpers#tab_container (method)">#tab_container</a></span>
|
148
154
|
<small>JqrHelpers::Helpers</small>
|
149
155
|
</li>
|
150
156
|
|
151
157
|
|
152
|
-
<li class="
|
158
|
+
<li class="r1 ">
|
153
159
|
<span class='object_link'><a href="JqrHelpers/Helpers.html#will_paginate_ajax-instance_method" title="JqrHelpers::Helpers#will_paginate_ajax (method)">#will_paginate_ajax</a></span>
|
154
160
|
<small>JqrHelpers::Helpers</small>
|
155
161
|
</li>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Sat Jan 4 18:53:11 2014 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.7.3 (ruby-1.9.3).
|
109
109
|
</div>
|
data/jqr-helpers.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'jqr-helpers'
|
3
3
|
s.require_paths = %w(. lib lib/jqr-helpers)
|
4
|
-
s.version = '1.0.
|
5
|
-
s.date = '2014-01-
|
4
|
+
s.version = '1.0.20'
|
5
|
+
s.date = '2014-01-04'
|
6
6
|
s.summary = 'Helpers to print unobtrusive jQuery-UI tags.'
|
7
7
|
s.description = <<-EOF
|
8
8
|
This gem adds helper methods to create unobtrusive jQuery code. It outputs
|
data/lib/jqr-helpers/helpers.rb
CHANGED
@@ -158,6 +158,12 @@ module JqrHelpers
|
|
158
158
|
html_options.merge(:tag_name => 'button'))
|
159
159
|
end
|
160
160
|
|
161
|
+
# Set the dialog title from +inside+ the dialog itself. This prints a
|
162
|
+
# hidden div which is read by the UJS callback to set the title.
|
163
|
+
def dialog_title(content)
|
164
|
+
content_tag :div, content, :class => 'ujs-dialog-title-hidden'
|
165
|
+
end
|
166
|
+
|
161
167
|
# Create a link that fires off a jQuery Ajax request. This is basically
|
162
168
|
# a wrapper around link_to :remote => true.
|
163
169
|
# If a block is given, url and options will be shifted left by 1 position
|
data/lib/jqr-helpers/version.rb
CHANGED
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: jqr-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.20
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Daniel Orner
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|