jqr-helpers 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1854 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: JqrHelpers::Helpers
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (H)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../JqrHelpers.html" title="JqrHelpers (module)">JqrHelpers</a></span></span>
36
+ &raquo;
37
+ <span class="title">Helpers</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: JqrHelpers::Helpers
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/jqr-helpers/helpers.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Defined Under Namespace</h2>
88
+ <p class="children">
89
+
90
+
91
+
92
+
93
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Helpers/PanelRenderer.html" title="JqrHelpers::Helpers::PanelRenderer (class)">PanelRenderer</a></span>
94
+
95
+
96
+ </p>
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <h2>
106
+ Instance Method Summary
107
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
108
+ </h2>
109
+
110
+ <ul class="summary">
111
+
112
+ <li class="public ">
113
+ <span class="summary_signature">
114
+
115
+ <a href="#button_to_ajax-instance_method" title="#button_to_ajax (instance method)">- (String) <strong>button_to_ajax</strong>(body, url, options = {}) </a>
116
+
117
+
118
+
119
+ </span>
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'>
130
+ <p>Create a button that fires off a jQuery Ajax request.</p>
131
+ </div></span>
132
+
133
+ </li>
134
+
135
+
136
+ <li class="public ">
137
+ <span class="summary_signature">
138
+
139
+ <a href="#button_to_dialog-instance_method" title="#button_to_dialog (instance method)">- (String) <strong>button_to_dialog</strong>(dialog_id, html_content, dialog_options = {}, html_options = {}) </a>
140
+
141
+
142
+
143
+ </span>
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <span class="summary_desc"><div class='inline'>
154
+ <p>Add a button to create a jQuery dialog.</p>
155
+ </div></span>
156
+
157
+ </li>
158
+
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#button_to_remote_dialog-instance_method" title="#button_to_remote_dialog (instance method)">- (String) <strong>button_to_remote_dialog</strong>(url, html_content, dialog_options = {}, html_options = {}) </a>
164
+
165
+
166
+
167
+ </span>
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ <span class="summary_desc"><div class='inline'>
178
+ <p>Same as button_to_dialog, but loads content from a remote URL instead of
179
+ using content already on the page.</p>
180
+ </div></span>
181
+
182
+ </li>
183
+
184
+
185
+ <li class="public ">
186
+ <span class="summary_signature">
187
+
188
+ <a href="#confirm_button-instance_method" title="#confirm_button (instance method)">- (Object) <strong>confirm_button</strong>(html_content, url, message, html_options) </a>
189
+
190
+
191
+
192
+ </span>
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'>
203
+ <p>Create a button that prompts a jQuery confirm dialog, which is
204
+ nicer-looking than the default window.confirm() which is used by Rails.</p>
205
+ </div></span>
206
+
207
+ </li>
208
+
209
+
210
+ <li class="public ">
211
+ <span class="summary_signature">
212
+
213
+ <a href="#date_picker_tag-instance_method" title="#date_picker_tag (instance method)">- (String) <strong>date_picker_tag</strong>(name, value, options = {}, html_options = {}) </a>
214
+
215
+
216
+
217
+ </span>
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+ <span class="summary_desc"><div class='inline'>
228
+ <p>Create a date picker field.</p>
229
+ </div></span>
230
+
231
+ </li>
232
+
233
+
234
+ <li class="public ">
235
+ <span class="summary_signature">
236
+
237
+ <a href="#form_for_ajax-instance_method" title="#form_for_ajax (instance method)">- (String) <strong>form_for_ajax</strong>(record, options = {}, &amp;block) </a>
238
+
239
+
240
+
241
+ </span>
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ <span class="summary_desc"><div class='inline'>
252
+ <p>Identical to form_tag_ajax except that this passes the given model into
253
+ form_for instead of form_tag.</p>
254
+ </div></span>
255
+
256
+ </li>
257
+
258
+
259
+ <li class="public ">
260
+ <span class="summary_signature">
261
+
262
+ <a href="#form_tag_ajax-instance_method" title="#form_tag_ajax (instance method)">- (String) <strong>form_tag_ajax</strong>(url, options = {}, &amp;block) </a>
263
+
264
+
265
+
266
+ </span>
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+ <span class="summary_desc"><div class='inline'>
277
+ <p>Create a form tag that submits to an Ajax request.</p>
278
+ </div></span>
279
+
280
+ </li>
281
+
282
+
283
+ <li class="public ">
284
+ <span class="summary_signature">
285
+
286
+ <a href="#link_to_ajax-instance_method" title="#link_to_ajax (instance method)">- (String) <strong>link_to_ajax</strong>(body, url, options = {}, &amp;block) </a>
287
+
288
+
289
+
290
+ </span>
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+ <span class="summary_desc"><div class='inline'>
301
+ <p>Create a link that fires off a jQuery Ajax request.</p>
302
+ </div></span>
303
+
304
+ </li>
305
+
306
+
307
+ <li class="public ">
308
+ <span class="summary_signature">
309
+
310
+ <a href="#link_to_dialog-instance_method" title="#link_to_dialog (instance method)">- (String) <strong>link_to_dialog</strong>(dialog_id, html_content = '', dialog_options = {}, html_options = {}, &amp;block) </a>
311
+
312
+
313
+
314
+ </span>
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+ <span class="summary_desc"><div class='inline'>
325
+ <p>Add a link to create a jQuery dialog.</p>
326
+ </div></span>
327
+
328
+ </li>
329
+
330
+
331
+ <li class="public ">
332
+ <span class="summary_signature">
333
+
334
+ <a href="#link_to_remote_dialog-instance_method" title="#link_to_remote_dialog (instance method)">- (String) <strong>link_to_remote_dialog</strong>(url, html_content, dialog_options = {}, html_options = {}, &amp;block) </a>
335
+
336
+
337
+
338
+ </span>
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+ <span class="summary_desc"><div class='inline'>
349
+ <p>Same as link_to_dialog, but loads content from a remote URL instead of
350
+ using content already on the page.</p>
351
+ </div></span>
352
+
353
+ </li>
354
+
355
+
356
+ <li class="public ">
357
+ <span class="summary_signature">
358
+
359
+ <a href="#tab_container-instance_method" title="#tab_container (instance method)">- (Object) <strong>tab_container</strong>(options = {}, html_options = {}, &amp;block) </a>
360
+
361
+
362
+
363
+ </span>
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <span class="summary_desc"><div class='inline'>
374
+ <p>Print a tab container.</p>
375
+ </div></span>
376
+
377
+ </li>
378
+
379
+
380
+ </ul>
381
+
382
+
383
+
384
+
385
+ <div id="instance_method_details" class="method_details_list">
386
+ <h2>Instance Method Details</h2>
387
+
388
+
389
+ <div class="method_details first">
390
+ <h3 class="signature first" id="button_to_ajax-instance_method">
391
+
392
+ - (<tt>String</tt>) <strong>button_to_ajax</strong>(body, url, options = {})
393
+
394
+
395
+
396
+
397
+
398
+ </h3><div class="docstring">
399
+ <div class="discussion">
400
+
401
+ <p>Create a button that fires off a jQuery Ajax request. This is basically a
402
+ wrapper around button_to :remote =&gt; true.</p>
403
+
404
+
405
+ </div>
406
+ </div>
407
+ <div class="tags">
408
+ <p class="tag_title">Parameters:</p>
409
+ <ul class="param">
410
+
411
+ <li>
412
+
413
+ <span class='name'>body</span>
414
+
415
+
416
+ <span class='type'>(<tt>String</tt>)</span>
417
+
418
+
419
+
420
+ &mdash;
421
+ <div class='inline'>
422
+ <p>the text/content that goes inside the tag.</p>
423
+ </div>
424
+
425
+ </li>
426
+
427
+ <li>
428
+
429
+ <span class='name'>url</span>
430
+
431
+
432
+ <span class='type'>(<tt>String</tt>)</span>
433
+
434
+
435
+
436
+ &mdash;
437
+ <div class='inline'>
438
+ <p>the URL to connect to.</p>
439
+ </div>
440
+
441
+ </li>
442
+
443
+ <li>
444
+
445
+ <span class='name'>options</span>
446
+
447
+
448
+ <span class='type'>(<tt>Hash</tt>)</span>
449
+
450
+
451
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
452
+
453
+
454
+ &mdash;
455
+ <div class='inline'>
456
+ <p>Ajax options - see above.</p>
457
+ </div>
458
+
459
+ </li>
460
+
461
+ </ul>
462
+
463
+ <p class="tag_title">Returns:</p>
464
+ <ul class="return">
465
+
466
+ <li>
467
+
468
+
469
+ <span class='type'>(<tt>String</tt>)</span>
470
+
471
+
472
+
473
+ </li>
474
+
475
+ </ul>
476
+
477
+ </div><table class="source_code">
478
+ <tr>
479
+ <td>
480
+ <pre class="lines">
481
+
482
+
483
+ 184
484
+ 185
485
+ 186
486
+ 187
487
+ 188
488
+ 189
489
+ 190
490
+ 191</pre>
491
+ </td>
492
+ <td>
493
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 184</span>
494
+
495
+ <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>
496
+
497
+ <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>
498
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:form</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
499
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:form</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid__process_ajax_options'>_process_ajax_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span>
500
+
501
+ <span class='id identifier rubyid_button_to'>button_to</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>
502
+ <span class='kw'>end</span></pre>
503
+ </td>
504
+ </tr>
505
+ </table>
506
+ </div>
507
+
508
+ <div class="method_details ">
509
+ <h3 class="signature " id="button_to_dialog-instance_method">
510
+
511
+ - (<tt>String</tt>) <strong>button_to_dialog</strong>(dialog_id, html_content, dialog_options = {}, html_options = {})
512
+
513
+
514
+
515
+
516
+
517
+ </h3><div class="docstring">
518
+ <div class="discussion">
519
+
520
+ <p>Add a button to create a jQuery dialog.</p>
521
+
522
+
523
+ </div>
524
+ </div>
525
+ <div class="tags">
526
+ <p class="tag_title">Parameters:</p>
527
+ <ul class="param">
528
+
529
+ <li>
530
+
531
+ <span class='name'>dialog_id</span>
532
+
533
+
534
+ <span class='type'>(<tt>String</tt>)</span>
535
+
536
+
537
+
538
+ &mdash;
539
+ <div class='inline'>
540
+ <p>The ID of the element to put in the dialog.</p>
541
+ </div>
542
+
543
+ </li>
544
+
545
+ <li>
546
+
547
+ <span class='name'>html_content</span>
548
+
549
+
550
+ <span class='type'>(<tt>String</tt>)</span>
551
+
552
+
553
+
554
+ &mdash;
555
+ <div class='inline'>
556
+ <p>Text or HTML tags to use as the button body.</p>
557
+ </div>
558
+
559
+ </li>
560
+
561
+ <li>
562
+
563
+ <span class='name'>html_options</span>
564
+
565
+
566
+ <span class='type'>(<tt>Hash</tt>)</span>
567
+
568
+
569
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
570
+
571
+
572
+ &mdash;
573
+ <div class='inline'>
574
+ <p>Attributes to put on the button tag.</p>
575
+ </div>
576
+
577
+ </li>
578
+
579
+ <li>
580
+
581
+ <span class='name'>dialog_options</span>
582
+
583
+
584
+ <span class='type'>(<tt>Hash</tt>)</span>
585
+
586
+
587
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
588
+
589
+
590
+ &mdash;
591
+ <div class='inline'>
592
+ <p>See above.</p>
593
+ </div>
594
+
595
+ </li>
596
+
597
+ </ul>
598
+
599
+ <p class="tag_title">Returns:</p>
600
+ <ul class="return">
601
+
602
+ <li>
603
+
604
+
605
+ <span class='type'>(<tt>String</tt>)</span>
606
+
607
+
608
+
609
+ </li>
610
+
611
+ </ul>
612
+
613
+ </div><table class="source_code">
614
+ <tr>
615
+ <td>
616
+ <pre class="lines">
617
+
618
+
619
+ 100
620
+ 101
621
+ 102
622
+ 103
623
+ 104</pre>
624
+ </td>
625
+ <td>
626
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 100</span>
627
+
628
+ <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>
629
+ <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>
630
+ <span class='id identifier rubyid_link_to_dialog'>link_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='comma'>,</span>
631
+ <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><span class='symbol'>:tag_name</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>button</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
632
+ <span class='kw'>end</span></pre>
633
+ </td>
634
+ </tr>
635
+ </table>
636
+ </div>
637
+
638
+ <div class="method_details ">
639
+ <h3 class="signature " id="button_to_remote_dialog-instance_method">
640
+
641
+ - (<tt>String</tt>) <strong>button_to_remote_dialog</strong>(url, html_content, dialog_options = {}, html_options = {})
642
+
643
+
644
+
645
+
646
+
647
+ </h3><div class="docstring">
648
+ <div class="discussion">
649
+
650
+ <p>Same as button_to_dialog, but loads content from a remote URL instead of
651
+ using content already on the page.</p>
652
+
653
+
654
+ </div>
655
+ </div>
656
+ <div class="tags">
657
+ <p class="tag_title">Parameters:</p>
658
+ <ul class="param">
659
+
660
+ <li>
661
+
662
+ <span class='name'>url</span>
663
+
664
+
665
+ <span class='type'>(<tt>String</tt>)</span>
666
+
667
+
668
+
669
+ &mdash;
670
+ <div class='inline'>
671
+ <p>The URL to load the content from.</p>
672
+ </div>
673
+
674
+ </li>
675
+
676
+ <li>
677
+
678
+ <span class='name'>html_content</span>
679
+
680
+
681
+ <span class='type'>(<tt>String</tt>)</span>
682
+
683
+
684
+
685
+ &mdash;
686
+ <div class='inline'>
687
+ <p>Text or HTML tags to use as the button body.</p>
688
+ </div>
689
+
690
+ </li>
691
+
692
+ <li>
693
+
694
+ <span class='name'>dialog_options</span>
695
+
696
+
697
+ <span class='type'>(<tt>Hash</tt>)</span>
698
+
699
+
700
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
701
+
702
+
703
+ &mdash;
704
+ <div class='inline'>
705
+ <p>See above.</p>
706
+ </div>
707
+
708
+ </li>
709
+
710
+ <li>
711
+
712
+ <span class='name'>html_options</span>
713
+
714
+
715
+ <span class='type'>(<tt>Hash</tt>)</span>
716
+
717
+
718
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
719
+
720
+
721
+ &mdash;
722
+ <div class='inline'>
723
+ <p>Attributes to put on the button tag.</p>
724
+ </div>
725
+
726
+ </li>
727
+
728
+ </ul>
729
+
730
+ <p class="tag_title">Returns:</p>
731
+ <ul class="return">
732
+
733
+ <li>
734
+
735
+
736
+ <span class='type'>(<tt>String</tt>)</span>
737
+
738
+
739
+
740
+ </li>
741
+
742
+ </ul>
743
+
744
+ </div><table class="source_code">
745
+ <tr>
746
+ <td>
747
+ <pre class="lines">
748
+
749
+
750
+ 151
751
+ 152
752
+ 153
753
+ 154
754
+ 155</pre>
755
+ </td>
756
+ <td>
757
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 151</span>
758
+
759
+ <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>
760
+ <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>
761
+ <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='comma'>,</span>
762
+ <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><span class='symbol'>:tag_name</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>button</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
763
+ <span class='kw'>end</span></pre>
764
+ </td>
765
+ </tr>
766
+ </table>
767
+ </div>
768
+
769
+ <div class="method_details ">
770
+ <h3 class="signature " id="confirm_button-instance_method">
771
+
772
+ - (<tt>Object</tt>) <strong>confirm_button</strong>(html_content, url, message, html_options)
773
+
774
+
775
+
776
+
777
+
778
+ </h3><div class="docstring">
779
+ <div class="discussion">
780
+
781
+ <p>Create a button that prompts a jQuery confirm dialog, which is
782
+ nicer-looking than the default window.confirm() which is used by Rails.
783
+ Done using button_to, so note that a form element will be added.</p>
784
+
785
+
786
+ </div>
787
+ </div>
788
+ <div class="tags">
789
+ <p class="tag_title">Parameters:</p>
790
+ <ul class="param">
791
+
792
+ <li>
793
+
794
+ <span class='name'>html_content</span>
795
+
796
+
797
+ <span class='type'>(<tt>String</tt>)</span>
798
+
799
+
800
+
801
+ &mdash;
802
+ <div class='inline'>
803
+ <p>the text or content to go inside the button</p>
804
+ </div>
805
+
806
+ </li>
807
+
808
+ <li>
809
+
810
+ <span class='name'>url</span>
811
+
812
+
813
+ <span class='type'>(<tt>String</tt>)</span>
814
+
815
+
816
+
817
+ &mdash;
818
+ <div class='inline'>
819
+ <p>the URL which the button should go to if confirmed</p>
820
+ </div>
821
+
822
+ </li>
823
+
824
+ <li>
825
+
826
+ <span class='name'>message</span>
827
+
828
+
829
+ <span class='type'>(<tt>String</tt>)</span>
830
+
831
+
832
+
833
+ &mdash;
834
+ <div class='inline'>
835
+ <p>the confirm message to prompt</p>
836
+ </div>
837
+
838
+ </li>
839
+
840
+ <li>
841
+
842
+ <span class='name'>html_options</span>
843
+
844
+
845
+ <span class='type'>(<tt>Hash</tt>)</span>
846
+
847
+
848
+
849
+ &mdash;
850
+ <div class='inline'>
851
+ <p>HTML attributes.</p>
852
+ </div>
853
+
854
+ </li>
855
+
856
+ </ul>
857
+
858
+
859
+ </div><table class="source_code">
860
+ <tr>
861
+ <td>
862
+ <pre class="lines">
863
+
864
+
865
+ 113
866
+ 114
867
+ 115
868
+ 116
869
+ 117
870
+ 118</pre>
871
+ </td>
872
+ <td>
873
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 113</span>
874
+
875
+ <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>
876
+ <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>
877
+ <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
878
+ </span> <span class='symbol'>:data-ujs-confirm</span><span class='tstring_end'>'</span></span> <span class='op'>=&gt;</span> <span class='kw'>true</span>
879
+ <span class='rparen'>)</span>
880
+ <span class='kw'>end</span></pre>
881
+ </td>
882
+ </tr>
883
+ </table>
884
+ </div>
885
+
886
+ <div class="method_details ">
887
+ <h3 class="signature " id="date_picker_tag-instance_method">
888
+
889
+ - (<tt>String</tt>) <strong>date_picker_tag</strong>(name, value, options = {}, html_options = {})
890
+
891
+
892
+
893
+
894
+
895
+ </h3><div class="docstring">
896
+ <div class="discussion">
897
+
898
+ <p>Create a date picker field. The attributes given are passed to
899
+ text_field_tag. Note that Ruby and jQuery date formats are different. You
900
+ will need to format the "value" parameter to match whatever format you are
901
+ passing into the "options" parameter.</p>
902
+
903
+
904
+ </div>
905
+ </div>
906
+ <div class="tags">
907
+ <p class="tag_title">Parameters:</p>
908
+ <ul class="param">
909
+
910
+ <li>
911
+
912
+ <span class='name'>name</span>
913
+
914
+
915
+ <span class='type'>(<tt>String</tt>)</span>
916
+
917
+
918
+
919
+ &mdash;
920
+ <div class='inline'>
921
+ <p>the name of the form element.</p>
922
+ </div>
923
+
924
+ </li>
925
+
926
+ <li>
927
+
928
+ <span class='name'>value</span>
929
+
930
+
931
+ <span class='type'>(<tt>Date</tt>)</span>
932
+
933
+
934
+
935
+ &mdash;
936
+ <div class='inline'>
937
+ <p>the initial value.</p>
938
+ </div>
939
+
940
+ </li>
941
+
942
+ <li>
943
+
944
+ <span class='name'>options</span>
945
+
946
+
947
+ <span class='type'>(<tt>Hash</tt>)</span>
948
+
949
+
950
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
951
+
952
+
953
+ &mdash;
954
+ <div class='inline'>
955
+ <p>options to be passed to datepicker().</p>
956
+ </div>
957
+
958
+ </li>
959
+
960
+ <li>
961
+
962
+ <span class='name'>html_options</span>
963
+
964
+
965
+ <span class='type'>(<tt>Hash</tt>)</span>
966
+
967
+
968
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
969
+
970
+
971
+ &mdash;
972
+ <div class='inline'>
973
+ <p>options to be passed to text_field_tag.</p>
974
+ </div>
975
+
976
+ </li>
977
+
978
+ </ul>
979
+
980
+ <p class="tag_title">Returns:</p>
981
+ <ul class="return">
982
+
983
+ <li>
984
+
985
+
986
+ <span class='type'>(<tt>String</tt>)</span>
987
+
988
+
989
+
990
+ </li>
991
+
992
+ </ul>
993
+
994
+ </div><table class="source_code">
995
+ <tr>
996
+ <td>
997
+ <pre class="lines">
998
+
999
+
1000
+ 274
1001
+ 275
1002
+ 276
1003
+ 277
1004
+ 278
1005
+ 279</pre>
1006
+ </td>
1007
+ <td>
1008
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 274</span>
1009
+
1010
+ <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='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>
1011
+ <span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:data-date-options</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
1012
+ <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>
1013
+ <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'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> ujs-date-picker</span><span class='tstring_end'>'</span></span>
1014
+ <span class='id identifier rubyid_text_field_tag'>text_field_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='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='rparen'>)</span>
1015
+ <span class='kw'>end</span></pre>
1016
+ </td>
1017
+ </tr>
1018
+ </table>
1019
+ </div>
1020
+
1021
+ <div class="method_details ">
1022
+ <h3 class="signature " id="form_for_ajax-instance_method">
1023
+
1024
+ - (<tt>String</tt>) <strong>form_for_ajax</strong>(record, options = {}, &amp;block)
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+ </h3><div class="docstring">
1031
+ <div class="discussion">
1032
+
1033
+ <p>Identical to form_tag_ajax except that this passes the given model into
1034
+ form_for instead of form_tag.</p>
1035
+
1036
+
1037
+ </div>
1038
+ </div>
1039
+ <div class="tags">
1040
+ <p class="tag_title">Parameters:</p>
1041
+ <ul class="param">
1042
+
1043
+ <li>
1044
+
1045
+ <span class='name'>record</span>
1046
+
1047
+
1048
+ <span class='type'>(<tt>ActiveRecord::Base</tt>)</span>
1049
+
1050
+
1051
+
1052
+ </li>
1053
+
1054
+ <li>
1055
+
1056
+ <span class='name'>options</span>
1057
+
1058
+
1059
+ <span class='type'>(<tt>Hash</tt>)</span>
1060
+
1061
+
1062
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1063
+
1064
+
1065
+ </li>
1066
+
1067
+ </ul>
1068
+
1069
+ <p class="tag_title">Returns:</p>
1070
+ <ul class="return">
1071
+
1072
+ <li>
1073
+
1074
+
1075
+ <span class='type'>(<tt>String</tt>)</span>
1076
+
1077
+
1078
+
1079
+ </li>
1080
+
1081
+ </ul>
1082
+
1083
+ </div><table class="source_code">
1084
+ <tr>
1085
+ <td>
1086
+ <pre class="lines">
1087
+
1088
+
1089
+ 214
1090
+ 215
1091
+ 216
1092
+ 217
1093
+ 218
1094
+ 219
1095
+ 220
1096
+ 221
1097
+ 222
1098
+ 223
1099
+ 224</pre>
1100
+ </td>
1101
+ <td>
1102
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 214</span>
1103
+
1104
+ <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>
1105
+ <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>
1106
+ <span class='comment'># note that we only override if nil - not false
1107
+ </span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:close_dialog</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:close_dialog</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1108
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:use_dialog_opener</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:use_dialog_opener</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1109
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:html</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1110
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:html</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid__process_ajax_options'>_process_ajax_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span>
1111
+
1112
+ <span class='id identifier rubyid_form_for'>form_for</span> <span class='id identifier rubyid_record'>record</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1113
+
1114
+ <span class='kw'>end</span></pre>
1115
+ </td>
1116
+ </tr>
1117
+ </table>
1118
+ </div>
1119
+
1120
+ <div class="method_details ">
1121
+ <h3 class="signature " id="form_tag_ajax-instance_method">
1122
+
1123
+ - (<tt>String</tt>) <strong>form_tag_ajax</strong>(url, options = {}, &amp;block)
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+ </h3><div class="docstring">
1130
+ <div class="discussion">
1131
+
1132
+ <p>Create a form tag that submits to an Ajax request. Basically a wrapper for
1133
+ form_tag with :remote =&gt; true.</p>
1134
+
1135
+
1136
+ </div>
1137
+ </div>
1138
+ <div class="tags">
1139
+ <p class="tag_title">Parameters:</p>
1140
+ <ul class="param">
1141
+
1142
+ <li>
1143
+
1144
+ <span class='name'>url</span>
1145
+
1146
+
1147
+ <span class='type'>(<tt>String</tt>)</span>
1148
+
1149
+
1150
+
1151
+ &mdash;
1152
+ <div class='inline'>
1153
+ <p>the URL to connect to.</p>
1154
+ </div>
1155
+
1156
+ </li>
1157
+
1158
+ <li>
1159
+
1160
+ <span class='name'>options</span>
1161
+
1162
+
1163
+ <span class='type'>(<tt>Hash</tt>)</span>
1164
+
1165
+
1166
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1167
+
1168
+
1169
+ &mdash;
1170
+ <div class='inline'>
1171
+ <p>Ajax options - see above.</p>
1172
+ </div>
1173
+
1174
+ </li>
1175
+
1176
+ </ul>
1177
+
1178
+ <p class="tag_title">Returns:</p>
1179
+ <ul class="return">
1180
+
1181
+ <li>
1182
+
1183
+
1184
+ <span class='type'>(<tt>String</tt>)</span>
1185
+
1186
+
1187
+
1188
+ </li>
1189
+
1190
+ </ul>
1191
+
1192
+ </div><table class="source_code">
1193
+ <tr>
1194
+ <td>
1195
+ <pre class="lines">
1196
+
1197
+
1198
+ 198
1199
+ 199
1200
+ 200
1201
+ 201
1202
+ 202
1203
+ 203
1204
+ 204
1205
+ 205
1206
+ 206
1207
+ 207</pre>
1208
+ </td>
1209
+ <td>
1210
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 198</span>
1211
+
1212
+ <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>
1213
+
1214
+ <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>
1215
+ <span class='comment'># note that we only override if nil - not false
1216
+ </span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:close_dialog</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:close_dialog</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1217
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:use_dialog_opener</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:use_dialog_opener</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1218
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid__process_ajax_options'>_process_ajax_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span>
1219
+
1220
+ <span class='id identifier rubyid_form_tag'>form_tag</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1221
+ <span class='kw'>end</span></pre>
1222
+ </td>
1223
+ </tr>
1224
+ </table>
1225
+ </div>
1226
+
1227
+ <div class="method_details ">
1228
+ <h3 class="signature " id="link_to_ajax-instance_method">
1229
+
1230
+ - (<tt>String</tt>) <strong>link_to_ajax</strong>(body, url, options = {}, &amp;block)
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+ </h3><div class="docstring">
1237
+ <div class="discussion">
1238
+
1239
+ <p>Create a link that fires off a jQuery Ajax request. This is basically a
1240
+ wrapper around link_to :remote =&gt; true. If a block is given, url and
1241
+ options will be shifted left by 1 position and the block contents will be
1242
+ used for the body.</p>
1243
+
1244
+
1245
+ </div>
1246
+ </div>
1247
+ <div class="tags">
1248
+ <p class="tag_title">Parameters:</p>
1249
+ <ul class="param">
1250
+
1251
+ <li>
1252
+
1253
+ <span class='name'>body</span>
1254
+
1255
+
1256
+ <span class='type'>(<tt>String</tt>)</span>
1257
+
1258
+
1259
+
1260
+ &mdash;
1261
+ <div class='inline'>
1262
+ <p>the text/content that goes inside the tag.</p>
1263
+ </div>
1264
+
1265
+ </li>
1266
+
1267
+ <li>
1268
+
1269
+ <span class='name'>url</span>
1270
+
1271
+
1272
+ <span class='type'>(<tt>String</tt>)</span>
1273
+
1274
+
1275
+
1276
+ &mdash;
1277
+ <div class='inline'>
1278
+ <p>the URL to connect to.</p>
1279
+ </div>
1280
+
1281
+ </li>
1282
+
1283
+ <li>
1284
+
1285
+ <span class='name'>options</span>
1286
+
1287
+
1288
+ <span class='type'>(<tt>Hash</tt>)</span>
1289
+
1290
+
1291
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1292
+
1293
+
1294
+ &mdash;
1295
+ <div class='inline'>
1296
+ <p>Ajax options - see above.</p>
1297
+ </div>
1298
+
1299
+ </li>
1300
+
1301
+ </ul>
1302
+
1303
+ <p class="tag_title">Returns:</p>
1304
+ <ul class="return">
1305
+
1306
+ <li>
1307
+
1308
+
1309
+ <span class='type'>(<tt>String</tt>)</span>
1310
+
1311
+
1312
+
1313
+ </li>
1314
+
1315
+ </ul>
1316
+
1317
+ </div><table class="source_code">
1318
+ <tr>
1319
+ <td>
1320
+ <pre class="lines">
1321
+
1322
+
1323
+ 165
1324
+ 166
1325
+ 167
1326
+ 168
1327
+ 169
1328
+ 170
1329
+ 171
1330
+ 172
1331
+ 173
1332
+ 174
1333
+ 175
1334
+ 176</pre>
1335
+ </td>
1336
+ <td>
1337
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 165</span>
1338
+
1339
+ <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>
1340
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1341
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span>
1342
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_body'>body</span>
1343
+ <span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_capture'>capture</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1344
+ <span class='kw'>end</span>
1345
+
1346
+ <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>
1347
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid__process_ajax_options'>_process_ajax_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span>
1348
+
1349
+ <span class='id identifier rubyid_link_to'>link_to</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>
1350
+ <span class='kw'>end</span></pre>
1351
+ </td>
1352
+ </tr>
1353
+ </table>
1354
+ </div>
1355
+
1356
+ <div class="method_details ">
1357
+ <h3 class="signature " id="link_to_dialog-instance_method">
1358
+
1359
+ - (<tt>String</tt>) <strong>link_to_dialog</strong>(dialog_id, html_content = '', dialog_options = {}, html_options = {}, &amp;block)
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+ </h3><div class="docstring">
1366
+ <div class="discussion">
1367
+
1368
+ <p>Add a link to create a jQuery dialog. If a block is given, dialog_options
1369
+ and html_options are shifted left by 1 and the block is used as the
1370
+ html_content.</p>
1371
+
1372
+
1373
+ </div>
1374
+ </div>
1375
+ <div class="tags">
1376
+ <p class="tag_title">Parameters:</p>
1377
+ <ul class="param">
1378
+
1379
+ <li>
1380
+
1381
+ <span class='name'>dialog_id</span>
1382
+
1383
+
1384
+ <span class='type'>(<tt>String</tt>)</span>
1385
+
1386
+
1387
+
1388
+ &mdash;
1389
+ <div class='inline'>
1390
+ <p>The ID of the element to put in the dialog.</p>
1391
+ </div>
1392
+
1393
+ </li>
1394
+
1395
+ <li>
1396
+
1397
+ <span class='name'>html_content</span>
1398
+
1399
+
1400
+ <span class='type'>(<tt>String</tt>)</span>
1401
+
1402
+
1403
+ <em class="default">(defaults to: <tt>''</tt>)</em>
1404
+
1405
+
1406
+ &mdash;
1407
+ <div class='inline'>
1408
+ <p>Text or HTML tags to use as the link body.</p>
1409
+ </div>
1410
+
1411
+ </li>
1412
+
1413
+ <li>
1414
+
1415
+ <span class='name'>dialog_options</span>
1416
+
1417
+
1418
+ <span class='type'>(<tt>Hash</tt>)</span>
1419
+
1420
+
1421
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1422
+
1423
+
1424
+ &mdash;
1425
+ <div class='inline'>
1426
+ <p>See above.</p>
1427
+ </div>
1428
+
1429
+ </li>
1430
+
1431
+ <li>
1432
+
1433
+ <span class='name'>html_options</span>
1434
+
1435
+
1436
+ <span class='type'>(<tt>Hash</tt>)</span>
1437
+
1438
+
1439
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1440
+
1441
+
1442
+ &mdash;
1443
+ <div class='inline'>
1444
+ <p>Attributes to put on the link tag. There is a special :tag_name option that
1445
+ can be used to change the tag being created. Default is :a, but you can
1446
+ pass :div, :span, etc.</p>
1447
+ </div>
1448
+
1449
+ </li>
1450
+
1451
+ </ul>
1452
+
1453
+ <p class="tag_title">Returns:</p>
1454
+ <ul class="return">
1455
+
1456
+ <li>
1457
+
1458
+
1459
+ <span class='type'>(<tt>String</tt>)</span>
1460
+
1461
+
1462
+
1463
+ </li>
1464
+
1465
+ </ul>
1466
+
1467
+ </div><table class="source_code">
1468
+ <tr>
1469
+ <td>
1470
+ <pre class="lines">
1471
+
1472
+
1473
+ 57
1474
+ 58
1475
+ 59
1476
+ 60
1477
+ 61
1478
+ 62
1479
+ 63
1480
+ 64
1481
+ 65
1482
+ 66
1483
+ 67
1484
+ 68
1485
+ 69
1486
+ 70
1487
+ 71
1488
+ 72
1489
+ 73
1490
+ 74
1491
+ 75
1492
+ 76
1493
+ 77
1494
+ 78
1495
+ 79
1496
+ 80
1497
+ 81
1498
+ 82
1499
+ 83
1500
+ 84
1501
+ 85
1502
+ 86
1503
+ 87
1504
+ 88
1505
+ 89
1506
+ 90
1507
+ 91
1508
+ 92</pre>
1509
+ </td>
1510
+ <td>
1511
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 57</span>
1512
+
1513
+ <span class='kw'>def</span> <span class='id identifier rubyid_link_to_dialog'>link_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='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></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>
1514
+ <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>
1515
+
1516
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1517
+ <span class='id identifier rubyid_html_options'>html_options</span> <span class='op'>=</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span>
1518
+ <span class='id identifier rubyid_dialog_options'>dialog_options</span> <span class='op'>=</span> <span class='id identifier rubyid_html_content'>html_content</span><span class='period'>.</span><span class='id identifier rubyid_presence'>presence</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1519
+ <span class='id identifier rubyid_html_content'>html_content</span> <span class='op'>=</span> <span class='id identifier rubyid_capture'>capture</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1520
+ <span class='kw'>end</span>
1521
+
1522
+ <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>
1523
+ <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'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> ujs-dialog</span><span class='tstring_end'>'</span></span>
1524
+ <span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:data-dialog-id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_dialog_id'>dialog_id</span>
1525
+ <span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:data-close-x</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:close_x</span><span class='rbracket'>]</span>
1526
+
1527
+ <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>
1528
+ <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>
1529
+
1530
+ <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
1531
+ </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>
1532
+ <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>
1533
+ <span class='kw'>else</span>
1534
+ <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>
1535
+ <span class='kw'>end</span>
1536
+ <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>
1537
+ <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>
1538
+ <span class='kw'>if</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:default_buttons</span><span class='rparen'>)</span>
1539
+ <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='lbracket'>[</span><span class='symbol'>:buttons</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1540
+ <span class='symbol'>:OK</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>submit</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
1541
+ <span class='symbol'>:Cancel</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>close</span><span class='tstring_end'>'</span></span>
1542
+ <span class='rbrace'>}</span>
1543
+ <span class='kw'>end</span>
1544
+
1545
+ <span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:data-dialog-options</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
1546
+
1547
+ <span class='id identifier rubyid_content_tag'>content_tag</span> <span class='id identifier rubyid_tag_name'>tag_name</span><span class='comma'>,</span> <span class='id identifier rubyid_html_content'>html_content</span><span class='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span>
1548
+ <span class='kw'>end</span></pre>
1549
+ </td>
1550
+ </tr>
1551
+ </table>
1552
+ </div>
1553
+
1554
+ <div class="method_details ">
1555
+ <h3 class="signature " id="link_to_remote_dialog-instance_method">
1556
+
1557
+ - (<tt>String</tt>) <strong>link_to_remote_dialog</strong>(url, html_content, dialog_options = {}, html_options = {}, &amp;block)
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+ </h3><div class="docstring">
1564
+ <div class="discussion">
1565
+
1566
+ <p>Same as link_to_dialog, but loads content from a remote URL instead of
1567
+ using content already on the page. If a block is given, dialog_options and
1568
+ html_options are shifted left by 1 and the block is used as the
1569
+ html_content.</p>
1570
+
1571
+
1572
+ </div>
1573
+ </div>
1574
+ <div class="tags">
1575
+ <p class="tag_title">Parameters:</p>
1576
+ <ul class="param">
1577
+
1578
+ <li>
1579
+
1580
+ <span class='name'>url</span>
1581
+
1582
+
1583
+ <span class='type'>(<tt>String</tt>)</span>
1584
+
1585
+
1586
+
1587
+ &mdash;
1588
+ <div class='inline'>
1589
+ <p>The URL to load the content from.</p>
1590
+ </div>
1591
+
1592
+ </li>
1593
+
1594
+ <li>
1595
+
1596
+ <span class='name'>html_content</span>
1597
+
1598
+
1599
+ <span class='type'>(<tt>String</tt>)</span>
1600
+
1601
+
1602
+
1603
+ &mdash;
1604
+ <div class='inline'>
1605
+ <p>Text or HTML tags to use as the link body.</p>
1606
+ </div>
1607
+
1608
+ </li>
1609
+
1610
+ <li>
1611
+
1612
+ <span class='name'>dialog_options</span>
1613
+
1614
+
1615
+ <span class='type'>(<tt>Hash</tt>)</span>
1616
+
1617
+
1618
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1619
+
1620
+
1621
+ &mdash;
1622
+ <div class='inline'>
1623
+ <p>See above.</p>
1624
+ </div>
1625
+
1626
+ </li>
1627
+
1628
+ <li>
1629
+
1630
+ <span class='name'>html_options</span>
1631
+
1632
+
1633
+ <span class='type'>(<tt>Hash</tt>)</span>
1634
+
1635
+
1636
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1637
+
1638
+
1639
+ &mdash;
1640
+ <div class='inline'>
1641
+ <p>Attributes to put on the link tag. There is a special :tag_name option that
1642
+ can be used to change the tag being created. Default is :a, but you can
1643
+ pass :div, :span, etc.</p>
1644
+ </div>
1645
+
1646
+ </li>
1647
+
1648
+ </ul>
1649
+
1650
+ <p class="tag_title">Returns:</p>
1651
+ <ul class="return">
1652
+
1653
+ <li>
1654
+
1655
+
1656
+ <span class='type'>(<tt>String</tt>)</span>
1657
+
1658
+
1659
+
1660
+ </li>
1661
+
1662
+ </ul>
1663
+
1664
+ </div><table class="source_code">
1665
+ <tr>
1666
+ <td>
1667
+ <pre class="lines">
1668
+
1669
+
1670
+ 131
1671
+ 132
1672
+ 133
1673
+ 134
1674
+ 135
1675
+ 136
1676
+ 137
1677
+ 138
1678
+ 139
1679
+ 140
1680
+ 141
1681
+ 142</pre>
1682
+ </td>
1683
+ <td>
1684
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 131</span>
1685
+
1686
+ <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>
1687
+ <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>
1688
+
1689
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1690
+ <span class='id identifier rubyid_html_options'>html_options</span> <span class='op'>=</span> <span class='id identifier rubyid_dialog_options'>dialog_options</span>
1691
+ <span class='id identifier rubyid_dialog_options'>dialog_options</span> <span class='op'>=</span> <span class='id identifier rubyid_html_content'>html_content</span>
1692
+ <span class='id identifier rubyid_html_content'>html_content</span> <span class='op'>=</span> <span class='id identifier rubyid_capture'>capture</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1693
+ <span class='kw'>end</span>
1694
+
1695
+ <span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:data-dialog-url</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span>
1696
+ <span class='id identifier rubyid_link_to_dialog'>link_to_dialog</span><span class='lparen'>(</span><span class='id identifier rubyid__random_string'>_random_string</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='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='rparen'>)</span>
1697
+ <span class='kw'>end</span></pre>
1698
+ </td>
1699
+ </tr>
1700
+ </table>
1701
+ </div>
1702
+
1703
+ <div class="method_details ">
1704
+ <h3 class="signature " id="tab_container-instance_method">
1705
+
1706
+ - (<tt>Object</tt>) <strong>tab_container</strong>(options = {}, html_options = {}, &amp;block)
1707
+
1708
+
1709
+
1710
+
1711
+
1712
+ </h3><div class="docstring">
1713
+ <div class="discussion">
1714
+
1715
+ <p>Print a tab container. This expects a block, which will be passed a
1716
+ PanelRenderer object. Panels can be local (with content) or remote (with a
1717
+ URL).</p>
1718
+
1719
+
1720
+ </div>
1721
+ </div>
1722
+ <div class="tags">
1723
+
1724
+ <div class="examples">
1725
+ <p class="tag_title">Examples:</p>
1726
+
1727
+
1728
+ <pre class="example code"><code>&lt;%= tab_container {:collapsible =&gt; true}, {:class =&gt; 'my-tabs}' do |r| %&gt;
1729
+ &lt;%= r.panel 'Tab 1', do %&gt;
1730
+ My tab content here
1731
+ &lt;% end %&gt;
1732
+ &lt;%= r.panel 'Tab 2', 'http://www.foobar.com/' %&gt;
1733
+ &lt;% end %&gt;</code></pre>
1734
+
1735
+ </div>
1736
+ <p class="tag_title">Parameters:</p>
1737
+ <ul class="param">
1738
+
1739
+ <li>
1740
+
1741
+ <span class='name'>options</span>
1742
+
1743
+
1744
+ <span class='type'>(<tt>Hash</tt>)</span>
1745
+
1746
+
1747
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1748
+
1749
+
1750
+ &mdash;
1751
+ <div class='inline'>
1752
+ <p>options to pass to the jQuery tabs() method.</p>
1753
+ </div>
1754
+
1755
+ </li>
1756
+
1757
+ <li>
1758
+
1759
+ <span class='name'>html_options</span>
1760
+
1761
+
1762
+ <span class='type'>(<tt>Hash</tt>)</span>
1763
+
1764
+
1765
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1766
+
1767
+
1768
+ &mdash;
1769
+ <div class='inline'>
1770
+ <p>options to pass to the tab container element itself.</p>
1771
+ </div>
1772
+
1773
+ </li>
1774
+
1775
+ </ul>
1776
+
1777
+
1778
+ </div><table class="source_code">
1779
+ <tr>
1780
+ <td>
1781
+ <pre class="lines">
1782
+
1783
+
1784
+ 239
1785
+ 240
1786
+ 241
1787
+ 242
1788
+ 243
1789
+ 244
1790
+ 245
1791
+ 246
1792
+ 247
1793
+ 248
1794
+ 249
1795
+ 250
1796
+ 251
1797
+ 252
1798
+ 253
1799
+ 254
1800
+ 255
1801
+ 256
1802
+ 257
1803
+ 258
1804
+ 259
1805
+ 260
1806
+ 261
1807
+ 262
1808
+ 263</pre>
1809
+ </td>
1810
+ <td>
1811
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 239</span>
1812
+
1813
+ <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>
1814
+ <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>
1815
+ <span class='id identifier rubyid_capture'>capture</span><span class='lparen'>(</span><span class='id identifier rubyid_renderer'>renderer</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1816
+ <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>
1817
+ <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'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> ujs-tab-container</span><span class='tstring_end'>'</span></span>
1818
+ <span class='id identifier rubyid_html_options'>html_options</span><span class='lbracket'>[</span><span class='symbol'>:data-tab-options</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
1819
+ <span class='id identifier rubyid_content_tag'>content_tag</span><span class='lparen'>(</span><span class='symbol'>:div</span><span class='comma'>,</span> <span class='id identifier rubyid_html_options'>html_options</span><span class='rparen'>)</span> <span class='kw'>do</span>
1820
+ <span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='id identifier rubyid_content_tag'>content_tag</span> <span class='symbol'>:ul</span> <span class='kw'>do</span>
1821
+ <span class='id identifier rubyid_s2'>s2</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1822
+ <span class='id identifier rubyid_renderer'>renderer</span><span class='period'>.</span><span class='id identifier rubyid_panels'>panels</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_panel'>panel</span><span class='op'>|</span>
1823
+ <span class='id identifier rubyid_s2'>s2</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_content_tag'>content_tag</span><span class='lparen'>(</span><span class='symbol'>:li</span><span class='rparen'>)</span> <span class='kw'>do</span>
1824
+ <span class='id identifier rubyid_link_to'>link_to</span> <span class='id identifier rubyid_panel'>panel</span><span class='lbracket'>[</span><span class='symbol'>:title</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_panel'>panel</span><span class='lbracket'>[</span><span class='symbol'>:url</span><span class='rbracket'>]</span>
1825
+ <span class='kw'>end</span>
1826
+ <span class='kw'>end</span>
1827
+ <span class='id identifier rubyid_raw'>raw</span> <span class='id identifier rubyid_s2'>s2</span>
1828
+ <span class='kw'>end</span>
1829
+ <span class='id identifier rubyid_s3'>s3</span> <span class='op'>=</span> <span class='id identifier rubyid_renderer'>renderer</span><span class='period'>.</span><span class='id identifier rubyid_panels'>panels</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_sum'>sum</span><span class='comma'>,</span> <span class='id identifier rubyid_panel'>panel</span><span class='op'>|</span>
1830
+ <span class='kw'>if</span> <span class='id identifier rubyid_panel'>panel</span><span class='lbracket'>[</span><span class='symbol'>:options</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span>
1831
+ <span class='id identifier rubyid_sum'>sum</span> <span class='op'>=</span> <span class='id identifier rubyid_sum'>sum</span> <span class='op'>+</span> <span class='id identifier rubyid_content_tag'>content_tag</span><span class='lparen'>(</span><span class='symbol'>:div</span><span class='comma'>,</span> <span class='id identifier rubyid_panel'>panel</span><span class='lbracket'>[</span><span class='symbol'>:content</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_panel'>panel</span><span class='lbracket'>[</span><span class='symbol'>:options</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1832
+ <span class='kw'>end</span>
1833
+ <span class='id identifier rubyid_sum'>sum</span>
1834
+ <span class='kw'>end</span>
1835
+ <span class='id identifier rubyid_s'>s</span> <span class='op'>+</span> <span class='id identifier rubyid_raw'>raw</span><span class='lparen'>(</span><span class='id identifier rubyid_s3'>s3</span><span class='rparen'>)</span>
1836
+ <span class='kw'>end</span>
1837
+ <span class='kw'>end</span></pre>
1838
+ </td>
1839
+ </tr>
1840
+ </table>
1841
+ </div>
1842
+
1843
+ </div>
1844
+
1845
+ </div>
1846
+
1847
+ <div id="footer">
1848
+ Generated on Thu Nov 28 11:14:00 2013 by
1849
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1850
+ 0.8.7.3 (ruby-1.9.3).
1851
+ </div>
1852
+
1853
+ </body>
1854
+ </html>