jqr-helpers 1.0.17 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -115,6 +115,8 @@ Other Ajax options:
115
115
  * `:callback` (String) - the name of a JS function to call on completion.
116
116
  The function will be in the scope of the original element, and
117
117
  will be passed the result data of the Ajax request.
118
+ * `:refresh` (Boolean) - refresh the current page when the call is completed.
119
+ This will cause `:update, :append, :delete,` and `:callback` to be ignored.
118
120
  * `:use_dialog_opener` (Boolean) - if the Ajax request is sent from inside
119
121
  a dialog, this indicates that the update/append/delete options should
120
122
  look at the element that opened the dialog rather than the element that
@@ -24,6 +24,7 @@
24
24
  }
25
25
 
26
26
  function ujsDialogOpen() {
27
+ $(this).css('maxHeight', ($(window).height() * 0.8) + 'px');
27
28
  if ($(this).parent().height() > $(window).height()) {
28
29
  $(this).height($(window).height() * 0.8);
29
30
  $(this).parent().css('top',
@@ -184,6 +185,10 @@
184
185
  if (element.data('close-dialog'))
185
186
  ujsDialogClose();
186
187
  }
188
+ if (element.data('refresh')) {
189
+ window.location.reload();
190
+ return;
191
+ }
187
192
  if (element.data('callback')) {
188
193
  var callback = eval(element.data('callback'));
189
194
  callback.call(targetElement, data);
@@ -201,7 +201,7 @@
201
201
  </div>
202
202
 
203
203
  <div id="footer">
204
- Generated on Wed Dec 18 14:32:39 2013 by
204
+ Generated on Tue Dec 31 12:22:37 2013 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 Wed Dec 18 14:32:39 2013 by
109
+ Generated on Tue Dec 31 12:22:36 2013 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 &lt;li&gt; tag.</p>
452
452
  </div>
453
453
 
454
454
  <div id="footer">
455
- Generated on Wed Dec 18 14:32:39 2013 by
455
+ Generated on Tue Dec 31 12:22:36 2013 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>
@@ -242,7 +242,7 @@ using content already on the page.</p>
242
242
  <li class="public ">
243
243
  <span class="summary_signature">
244
244
 
245
- <a href="#confirm_button-instance_method" title="#confirm_button (instance method)">- (Object) <strong>confirm_button</strong>(html_content, url, message, html_options) </a>
245
+ <a href="#confirm_button-instance_method" title="#confirm_button (instance method)">- (Object) <strong>confirm_button</strong>(html_content, url, message, html_options = {}) </a>
246
246
 
247
247
 
248
248
 
@@ -482,12 +482,12 @@ using content already on the page.</p>
482
482
  <pre class="lines">
483
483
 
484
484
 
485
- 310
486
485
  311
487
- 312</pre>
486
+ 312
487
+ 313</pre>
488
488
  </td>
489
489
  <td>
490
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 310</span>
490
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 311</span>
491
491
 
492
492
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid__random_string'>_random_string</span>
493
493
  <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>
@@ -597,7 +597,6 @@ button_to, so it can be used inside forms.</p>
597
597
  <pre class="lines">
598
598
 
599
599
 
600
- 185
601
600
  186
602
601
  187
603
602
  188
@@ -610,10 +609,11 @@ button_to, so it can be used inside forms.</p>
610
609
  195
611
610
  196
612
611
  197
613
- 198</pre>
612
+ 198
613
+ 199</pre>
614
614
  </td>
615
615
  <td>
616
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 185</span>
616
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 186</span>
617
617
 
618
618
  <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>
619
619
 
@@ -745,14 +745,14 @@ button_to, so it can be used inside forms.</p>
745
745
  <pre class="lines">
746
746
 
747
747
 
748
- 100
749
748
  101
750
749
  102
751
750
  103
752
- 104</pre>
751
+ 104
752
+ 105</pre>
753
753
  </td>
754
754
  <td>
755
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 100</span>
755
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 101</span>
756
756
 
757
757
  <span class='kw'>def</span> <span class='id identifier rubyid_button_to_dialog'>button_to_dialog</span><span class='lparen'>(</span><span class='id identifier rubyid_dialog_id'>dialog_id</span><span class='comma'>,</span> <span class='id identifier rubyid_html_content'>html_content</span><span class='comma'>,</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span>
758
758
  <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>
@@ -876,14 +876,14 @@ using content already on the page.</p>
876
876
  <pre class="lines">
877
877
 
878
878
 
879
- 152
880
879
  153
881
880
  154
882
881
  155
883
- 156</pre>
882
+ 156
883
+ 157</pre>
884
884
  </td>
885
885
  <td>
886
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 152</span>
886
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 153</span>
887
887
 
888
888
  <span class='kw'>def</span> <span class='id identifier rubyid_button_to_remote_dialog'>button_to_remote_dialog</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_html_content'>html_content</span><span class='comma'>,</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span>
889
889
  <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>
@@ -994,7 +994,6 @@ then be passed into jQuery's buttonset() method.</p>
994
994
  <pre class="lines">
995
995
 
996
996
 
997
- 298
998
997
  299
999
998
  300
1000
999
  301
@@ -1002,10 +1001,11 @@ then be passed into jQuery's buttonset() method.</p>
1002
1001
  303
1003
1002
  304
1004
1003
  305
1005
- 306</pre>
1004
+ 306
1005
+ 307</pre>
1006
1006
  </td>
1007
1007
  <td>
1008
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 298</span>
1008
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 299</span>
1009
1009
 
1010
1010
  <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>
1011
1011
  <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>
@@ -1024,7 +1024,7 @@ then be passed into jQuery's buttonset() method.</p>
1024
1024
  <div class="method_details ">
1025
1025
  <h3 class="signature " id="confirm_button-instance_method">
1026
1026
 
1027
- - (<tt>Object</tt>) <strong>confirm_button</strong>(html_content, url, message, html_options)
1027
+ - (<tt>Object</tt>) <strong>confirm_button</strong>(html_content, url, message, html_options = {})
1028
1028
 
1029
1029
 
1030
1030
 
@@ -1100,6 +1100,8 @@ Done using button_to, so note that a form element will be added.</p>
1100
1100
  <span class='type'>(<tt>Hash</tt>)</span>
1101
1101
 
1102
1102
 
1103
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1104
+
1103
1105
 
1104
1106
  &mdash;
1105
1107
  <div class='inline'>
@@ -1117,17 +1119,17 @@ Done using button_to, so note that a form element will be added.</p>
1117
1119
  <pre class="lines">
1118
1120
 
1119
1121
 
1120
- 113
1121
1122
  114
1122
1123
  115
1123
1124
  116
1124
1125
  117
1125
- 118</pre>
1126
+ 118
1127
+ 119</pre>
1126
1128
  </td>
1127
1129
  <td>
1128
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 113</span>
1130
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 114</span>
1129
1131
 
1130
- <span class='kw'>def</span> <span class='id identifier rubyid_confirm_button'>confirm_button</span><span class='lparen'>(</span><span class='id identifier rubyid_html_content'>html_content</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='rparen'>)</span>
1132
+ <span class='kw'>def</span> <span class='id identifier rubyid_confirm_button'>confirm_button</span><span class='lparen'>(</span><span class='id identifier rubyid_html_content'>html_content</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</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>
1131
1133
  <span class='id identifier rubyid_button_to'>button_to</span> <span class='id identifier rubyid_html_content'>html_content</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span>
1132
1134
  <span class='symbol'>:data-message</span><span class='tstring_end'>'</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_simple_format'>simple_format</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='comment'># turn text into HTML
1133
1135
  </span> <span class='symbol'>:data-ujs-confirm</span><span class='tstring_end'>'</span></span> <span class='op'>=&gt;</span> <span class='kw'>true</span>
@@ -1254,7 +1256,6 @@ the date and the jQuery date format to be the same.</p>
1254
1256
  <pre class="lines">
1255
1257
 
1256
1258
 
1257
- 281
1258
1259
  282
1259
1260
  283
1260
1261
  284
@@ -1262,10 +1263,11 @@ the date and the jQuery date format to be the same.</p>
1262
1263
  286
1263
1264
  287
1264
1265
  288
1265
- 289</pre>
1266
+ 289
1267
+ 290</pre>
1266
1268
  </td>
1267
1269
  <td>
1268
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 281</span>
1270
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 282</span>
1269
1271
 
1270
1272
  <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>
1271
1273
  <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>
@@ -1349,7 +1351,6 @@ form_for instead of form_tag.</p>
1349
1351
  <pre class="lines">
1350
1352
 
1351
1353
 
1352
- 221
1353
1354
  222
1354
1355
  223
1355
1356
  224
@@ -1359,10 +1360,11 @@ form_for instead of form_tag.</p>
1359
1360
  228
1360
1361
  229
1361
1362
  230
1362
- 231</pre>
1363
+ 231
1364
+ 232</pre>
1363
1365
  </td>
1364
1366
  <td>
1365
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 221</span>
1367
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 222</span>
1366
1368
 
1367
1369
  <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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1368
1370
  <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>
@@ -1458,7 +1460,6 @@ form_tag with :remote =&gt; true.</p>
1458
1460
  <pre class="lines">
1459
1461
 
1460
1462
 
1461
- 205
1462
1463
  206
1463
1464
  207
1464
1465
  208
@@ -1467,10 +1468,11 @@ form_tag with :remote =&gt; true.</p>
1467
1468
  211
1468
1469
  212
1469
1470
  213
1470
- 214</pre>
1471
+ 214
1472
+ 215</pre>
1471
1473
  </td>
1472
1474
  <td>
1473
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 205</span>
1475
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 206</span>
1474
1476
 
1475
1477
  <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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1476
1478
 
@@ -1583,7 +1585,6 @@ used for the body.</p>
1583
1585
  <pre class="lines">
1584
1586
 
1585
1587
 
1586
- 166
1587
1588
  167
1588
1589
  168
1589
1590
  169
@@ -1594,10 +1595,11 @@ used for the body.</p>
1594
1595
  174
1595
1596
  175
1596
1597
  176
1597
- 177</pre>
1598
+ 177
1599
+ 178</pre>
1598
1600
  </td>
1599
1601
  <td>
1600
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 166</span>
1602
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 167</span>
1601
1603
 
1602
1604
  <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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1603
1605
  <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
@@ -1768,7 +1770,8 @@ pass :div, :span, etc.</p>
1768
1770
  89
1769
1771
  90
1770
1772
  91
1771
- 92</pre>
1773
+ 92
1774
+ 93</pre>
1772
1775
  </td>
1773
1776
  <td>
1774
1777
  <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 57</span>
@@ -1790,11 +1793,12 @@ pass :div, :span, etc.</p>
1790
1793
  <span class='id identifier rubyid_tag_name'>tag_name</span> <span class='op'>=</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:tag_name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='symbol'>:a</span>
1791
1794
  <span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:href</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_tag_name'>tag_name</span> <span class='op'>==</span> <span class='symbol'>:a</span>
1792
1795
 
1796
+ <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:dialogClass</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1793
1797
  <span class='kw'>if</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:title</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='kw'>false</span> <span class='comment'># not nil or blank
1794
- </span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:dialogClass</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1795
- <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:dialogClass</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> ujs-dialog-modal no-title</span><span class='tstring_end'>'</span></span>
1798
+ </span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:dialogClass</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> ujs-dialog-modal no-title</span><span class='tstring_end'>'</span></span>
1796
1799
  <span class='kw'>else</span>
1797
1800
  <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:title</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Dialog</span><span class='tstring_end'>'</span></span>
1801
+ <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:dialogClass</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> ujs-dialog-modal</span><span class='tstring_end'>'</span></span>
1798
1802
  <span class='kw'>end</span>
1799
1803
  <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:modal</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
1800
1804
  <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:width</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>auto</span><span class='tstring_end'>'</span></span>
@@ -1930,7 +1934,6 @@ pass :div, :span, etc.</p>
1930
1934
  <pre class="lines">
1931
1935
 
1932
1936
 
1933
- 131
1934
1937
  132
1935
1938
  133
1936
1939
  134
@@ -1942,10 +1945,11 @@ pass :div, :span, etc.</p>
1942
1945
  140
1943
1946
  141
1944
1947
  142
1945
- 143</pre>
1948
+ 143
1949
+ 144</pre>
1946
1950
  </td>
1947
1951
  <td>
1948
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 131</span>
1952
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 132</span>
1949
1953
 
1950
1954
  <span class='kw'>def</span> <span class='id identifier rubyid_link_to_remote_dialog'>link_to_remote_dialog</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_html_content'>html_content</span><span class='comma'>,</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span>
1951
1955
  <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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
@@ -2046,7 +2050,6 @@ URL).</p>
2046
2050
  <pre class="lines">
2047
2051
 
2048
2052
 
2049
- 246
2050
2053
  247
2051
2054
  248
2052
2055
  249
@@ -2070,10 +2073,11 @@ URL).</p>
2070
2073
  267
2071
2074
  268
2072
2075
  269
2073
- 270</pre>
2076
+ 270
2077
+ 271</pre>
2074
2078
  </td>
2075
2079
  <td>
2076
- <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 246</span>
2080
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 247</span>
2077
2081
 
2078
2082
  <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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2079
2083
  <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>
@@ -2110,7 +2114,7 @@ URL).</p>
2110
2114
  </div>
2111
2115
 
2112
2116
  <div id="footer">
2113
- Generated on Wed Dec 18 14:32:39 2013 by
2117
+ Generated on Tue Dec 31 12:22:36 2013 by
2114
2118
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2115
2119
  0.8.7.3 (ruby-1.9.3).
2116
2120
  </div>
@@ -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.15</span><span class='tstring_end'>'</span></span></pre></dd>
95
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0.18</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 Wed Dec 18 14:32:39 2013 by
111
+ Generated on Tue Dec 31 12:22:36 2013 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>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Wed Dec 18 14:32:39 2013 by
117
+ Generated on Tue Dec 31 12:22:36 2013 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 Wed Dec 18 14:32:39 2013 by
113
+ Generated on Tue Dec 31 12:22:36 2013 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 Wed Dec 18 14:32:39 2013 by
177
+ Generated on Tue Dec 31 12:22:36 2013 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 Wed Dec 18 14:32:39 2013 by
177
+ Generated on Tue Dec 31 12:22:36 2013 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>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Wed Dec 18 14:32:39 2013 by
106
+ Generated on Tue Dec 31 12:22:36 2013 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.17'
5
- s.date = '2013-12-23'
4
+ s.version = '1.0.18'
5
+ s.date = '2013-12-31'
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
@@ -111,7 +111,7 @@ module JqrHelpers
111
111
  # @param url [String] the URL which the button should go to if confirmed
112
112
  # @param message [String] the confirm message to prompt
113
113
  # @param html_options [Hash] HTML attributes.
114
- def confirm_button(html_content, url, message, html_options)
114
+ def confirm_button(html_content, url, message, html_options={})
115
115
  button_to html_content, url, html_options.merge(
116
116
  :'data-message' => simple_format(message), # turn text into HTML
117
117
  :'data-ujs-confirm' => true
@@ -367,6 +367,7 @@ module JqrHelpers
367
367
  new_options[:'data-callback'] = options.delete(:callback)
368
368
  new_options[:'data-close-dialog'] = options.delete(:close_dialog)
369
369
  new_options[:'data-use-dialog-opener'] = options.delete(:use_dialog_opener)
370
+ new_options[:'data-refresh'] = true if options.delete(:refresh)
370
371
 
371
372
  [:update, :append, :delete].each do |result_method|
372
373
  selector = options.delete(result_method)
@@ -1,5 +1,5 @@
1
1
  module JqrHelpers
2
2
  module Rails
3
- VERSION = '1.0.17'
3
+ VERSION = '1.0.18'
4
4
  end
5
5
  end
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.17
5
+ version: 1.0.18
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Orner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-23 00:00:00.000000000 Z
12
+ date: 2013-12-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails