widget_list 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,870 +1,945 @@
1
- <style type="text/css">
2
- input[type="text"] {
3
- font-size:25px;
4
- height:33px;
5
- left:0;
6
- line-height:33px;
7
- padding:8px 8px 7px;
8
- top:0;
9
- width:600px;
10
- }
11
- select {
12
- font-size:25px;
13
- height:50px;
14
- left:0;
15
- line-height:33px;
16
- top:0;
17
- width:600px;
18
- }
19
-
20
- .buttons_drill_down_name_button {
21
- margin-right: 70px;
22
- }
23
-
24
- .buttons_data_to_pass_from_view_button {
25
- margin-right: 120px;
26
- }
27
- </style>
28
-
29
- <script type="text/javascript">
30
- var all = '.start,.fields,.rows,.search,.footer,.misc_submit';
31
- var all_btns = '#start,#fields,#rows,#search,#footer,#misc_submit';
32
- jQuery(document).ready(function () {
33
- if (jQuery('#view').val() != '') {
34
- jQuery(all_btns).removeClass('disabled');
35
- }
36
- if (jQuery('#preview').attr('src') == '') {
37
- jQuery('#preview').hide();
38
- } else {
39
- jQuery('#preview').show();
40
- }
41
-
42
- });
43
-
44
- function VerifyOK(func_name) {
45
- var ok = true;
46
- if (jQuery('#view').val() == '') {
47
- ok = false;
48
- alert('Please select a Model to use as your base widget_list');
49
- }
50
- else if (jQuery('#rowLimit').val() != '10' && jQuery('#rowLimit').val() != '20' && jQuery('#rowLimit').val() != '50' && jQuery('#rowLimit').val() != '100' && jQuery('#rowLimit').val() != '500' && jQuery('#rowLimit').val() != '1000') {
51
- ok = false;
52
- alert('Invalid Row Limit, please see help button.');
53
- }
54
- return ok;
55
- }
56
-
57
- function ClickTab(which_class,func_name) {
58
- if (VerifyOK(func_name)) {
59
- jQuery('.search_dependent').hide(0,function() {
60
- jQuery(all).hide(0,function() {
61
- jQuery(which_class).fadeIn(0,function() {
62
- if (func_name == 'ShowSearch') {
63
- ShowSearchOptions(function() {
64
- ShowGroupingOptions();
65
- ShowExportOptions();
66
-
67
- });
68
- }
69
- if (func_name == 'ShowFields') {
70
- ShowHiddenOptions();
71
- ShowFunctionOptions();
72
- }
73
- if (func_name == 'ShowSubmit') {
74
- ShowCheckboxOptions();
75
- }
76
- if (func_name == 'ShowRows') {
77
- ShowButtonOptions();
78
- ShowDrillDownOptions();
79
- }
80
- if (func_name == 'ShowFooter') {
81
- ShowFooterOptions();
82
- }
83
- });
84
- });
85
- });
86
- SaveChanges();
87
- }
88
- }
89
-
90
- function ShowStart() {
91
- ClickTab('.start',arguments.callee.name);
92
- }
93
-
94
- function ShowFields() {
95
- ClickTab('.fields',arguments.callee.name);
96
- }
97
-
98
- function ShowRows() {
99
- ClickTab('.rows',arguments.callee.name);
100
- }
101
-
102
- function ShowSearch() {
103
- ClickTab('.search',arguments.callee.name);
104
- }
105
-
106
- function ShowFooter() {
107
- ClickTab('.footer',arguments.callee.name);
108
- }
109
-
110
- function ShowSubmit() {
111
- ClickTab('.misc_submit',arguments.callee.name);
112
- }
113
-
114
- function ReplaceColumnsToLinked(obj) {
115
- found = false;
116
- var className = obj.className;
117
- jQuery(obj).css('background-color','white');
118
- jQuery('.fields_keys, .fields_hidden_keys, .fields_function_keys').each(
119
- function(key, value) {
120
- if(jQuery(value).val() == jQuery(obj).val().trim() && jQuery(obj).val().search(/_linked/i) == -1) {
121
- found = true;
122
- var id_original = jQuery(obj).val().trim();
123
- jQuery(value).val(jQuery(obj).val().trim() + '_linked');
124
- jQuery(obj).val(jQuery(obj).val().trim() + '_linked');
125
- jQuery(obj).attr('value',jQuery(this).val().trim());
126
- if (className == 'drill_downs_data_to_pass_from_view') {
127
- jQuery('.drill_downs_column_to_show[value="col_name"]').each(
128
- function(key1, value1) {
129
- jQuery(value1).val(jQuery(obj).val().trim());
130
- jQuery(value1).attr('value',jQuery(value1).val().trim());
131
- return false;
132
- }
133
- )
134
- } else {
135
- jQuery('.drill_downs_data_to_pass_from_view[value="col_name"]').each(
136
- function(key1, value1) {
137
- jQuery(value1).val(jQuery(obj).val().trim());
138
- jQuery(value1).attr('value',jQuery(value1).val().trim());
139
- return false;
140
- }
141
- )
142
- }
143
-
144
- jQuery('.drill_downs_drill_down_name[value="filter_col_name"]').each(
145
- function(key1, value1) {
146
- jQuery(value1).val('filter_by_' + id_original);
147
- jQuery(value1).attr('value','filter_by_' + id_original);
148
- return false;
149
- }
150
- )
151
-
152
-
153
- jQuery('#showHidden').attr('checked',true);
154
- AddHiddenField();
155
- jQuery('.fields_hidden_keys[value=""]').each(
156
- function(key1, value1) {
157
- jQuery(value1).val(id_original);
158
- jQuery(value1).attr('value',id_original);
159
- return false;
160
- }
161
- );
162
- }
163
- }
164
- );
165
-
166
- if (!found && jQuery(obj).val().search(/_linked/i) == -1) {
167
- alert('Invalid Field Name defined. Please change the value');
168
- jQuery(obj).css('background-color','red');
169
- }
170
- }
171
-
172
- function InvalidField(obj) {
173
- found = false;
174
- jQuery(obj).css('background-color','white');
175
- jQuery('.fields_keys, .fields_hidden_keys, .fields_function_keys').each(
176
- function(key, value) {
177
- if(jQuery(value).val() == jQuery(obj).val().trim()) {
178
- found = true;
179
- }
180
- }
181
- );
182
-
183
- if (!found) {
184
- alert('Invalid Field Name defined. Please change the value');
185
- jQuery(obj).css('background-color','red');
186
- }
187
- }
188
-
189
- function GoodClass(obj) {
190
- found = false;
191
- jQuery(obj).css('background-color','white');
192
- if (jQuery(obj).val() == 'primary' || jQuery(obj).val() == 'info' || jQuery(obj).val() == 'success' || jQuery(obj).val() == 'danger' || jQuery(obj).val() == 'disabled' || jQuery(obj).val() == 'default') {
193
- found = true;
194
- }
195
- if (!found) {
196
- alert('Invalid Class Name. Click Help icon for more information.');
197
- jQuery(obj).css('background-color','red');
198
- }
199
- }
200
-
201
-
202
- function ShowSearchOptions(callback) {
203
- if (jQuery('#showSearch').is(':checked')) {
204
- jQuery('.search_dependent').show();
205
- } else {
206
- jQuery('.search_dependent').hide();
207
- }
208
- if (typeof(callback) == 'function') {
209
- (callback)();
210
- }
211
- }
212
-
213
- function ShowGroupingOptions() {
214
- if (jQuery('#useGrouping').is(':checked') && jQuery('#showSearch').is(':checked')) {
215
- jQuery('.grouping_dependent').show();
216
- } else {
217
- jQuery('.grouping_dependent').hide();
218
- }
219
- }
220
-
221
- function ShowRansackOptions() {
222
- if (jQuery('#useRansack').is(':checked') && jQuery('#showSearch').is(':checked')) {
223
- jQuery('.ransack_dependent').show();
224
- } else {
225
- jQuery('.ransack_dependent').hide();
226
- }
227
- }
228
-
229
- function ShowFooterOptions() {
230
- if (jQuery('#footerOn').is(':checked')) {
231
- jQuery('.footer_dependent').show();
232
- } else {
233
- jQuery('.footer_dependent').hide();
234
- }
235
- }
236
-
237
- function ShowExportOptions() {
238
- if (jQuery('#showExport').is(':checked') && jQuery('#showSearch').is(':checked')) {
239
- jQuery('.export_dependent').show();
240
- } else {
241
- jQuery('.export_dependent').hide();
242
- }
243
- }
244
-
245
- function ShowHiddenOptions() {
246
- if (jQuery('#showHidden').is(':checked')) {
247
- if (jQuery('.fields_hidden_keys').length == 0) {
248
- AddHiddenField();
249
- }
250
- jQuery('.hidden_fields_dependent').show();
251
- } else {
252
- jQuery('.hidden_fields_dependent').hide();
253
- }
254
- }
255
-
256
- function ShowButtonOptions() {
257
- if (jQuery('#rowButtonsOn').is(':checked')) {
258
- jQuery('.button_dependent').show();
259
- } else {
260
- jQuery('.button_dependent').hide();
261
- }
262
- }
263
- function ShowDrillDownOptions() {
264
- if (jQuery('#drillDownsOn').is(':checked')) {
265
- if (jQuery('.drill_downs_data_to_pass_from_view').length == 0) {
266
- AddDrillDown();
267
- }
268
- jQuery('.drill_down_dependent').show();
269
- } else {
270
- jQuery('.drill_down_dependent').hide();
271
- }
272
- }
273
-
274
- function ShowFunctionOptions() {
275
- if (jQuery('#fieldFunctionOn').is(':checked')) {
276
- if (jQuery('.fields_function_keys').length == 0) {
277
- AddFieldFunction();
278
- }
279
- jQuery('.function_dependent').show();
280
- } else {
281
- jQuery('.function_dependent').hide();
282
- }
283
- }
284
-
285
- function ShowCheckboxOptions() {
286
- if (jQuery('#checkboxEnabled').is(':checked')) {
287
- jQuery('.checkbox_dependent').show();
288
- } else {
289
- jQuery('.checkbox_dependent').hide();
290
- }
291
- }
292
-
293
- function AddGroupingItem() {
294
- jQuery('#grouping_items').html(jQuery('#grouping_items').html() + jQuery('#grouping_items_default').html());
295
- }
296
-
297
- function AddField() {
298
- jQuery('#field_table').html(jQuery('#field_table').html() + jQuery('#default_field_template').html());
299
- }
300
-
301
- function AddGroupBy() {
302
- jQuery('#grouping_table').html(jQuery('#grouping_table').html() + jQuery('#default_grouping_template').html());
303
- }
304
-
305
- function AddButton() {
306
- jQuery('#button_table').html(jQuery('#button_table').html() + jQuery('#default_button_template').html());
307
- }
308
-
309
- function AddDrillDown() {
310
- jQuery('#drill_down_table').html(jQuery('#drill_down_table').html() + jQuery('#default_drill_down_template').html());
311
- }
312
-
313
- function AddFooterButton() {
314
- jQuery('#footer_table').html(jQuery('#footer_table').html() + jQuery('#default_footer_template').html());
315
- }
316
-
317
- function AddHiddenField() {
318
- jQuery('#hidden_field_table').html(jQuery('#hidden_field_table').html() + jQuery('#default_hidden_field_template').html());
319
- }
320
-
321
- function AddFieldFunction() {
322
- jQuery('#field_function_table').html(jQuery('#field_function_table').html() + jQuery('#default_field_function_template').html());
323
- }
324
-
325
- function RemoveField(obj) {
326
- jQuery(obj).closest('tr').remove();
327
- }
328
-
329
- function ChangeViewModel(obj) {
330
- jQuery(all_btns).addClass('disabled');
331
- if(jQuery(obj).val() != '') {
332
- jQuery.post(jQuery('#widget_list_administration').attr('action'), 'ajax=1&model=' + jQuery(obj).val(), function(response)
333
- {
334
- jQuery('#name').val(jQuery(obj).val().toLowerCase() + '_listing');
335
- jQuery('#field_table').html(response['fields']);
336
- jQuery('#hidden_field_table').html(response['fields_hidden']);
337
- jQuery('#checkboxField').html(response['checked_fields']);
338
- jQuery('#footer_table').html(response['footer_buttons']);
339
- jQuery('#grouping_table').html(response['group_by']);
340
- SaveChanges();
341
- if (jQuery(obj).val() != '') {
342
- jQuery(all_btns).removeClass('disabled');
343
- }
344
-
345
-
346
- jQuery(all_btns).removeClass('disabled');
347
- jQuery('#title').val(jQuery(obj).val() + 's');
348
- jQuery('#listDescription').val('Showing All ' + jQuery(obj).val() + 's');
349
-
350
- if (jQuery(obj).val() != '') {
351
- jQuery('#noDataMessage').val('No ' + jQuery(obj).val() + 's Found Within Your Criteria');
352
- }
353
-
354
- if (jQuery(obj).val() != '' && jQuery('#showExport').is(':checked')) {
355
- jQuery('#exportButtonTitle').val('Export All ' + jQuery(obj).val() + 's');
356
- }
357
- }, "json").error(function(response) {
358
- alert('An error occurred instantiating this model. Check the response for errors.');
359
- });
360
- }
361
- }
362
-
363
- function SaveChanges() {
364
- jQuery(all_btns).addClass('disabled');
365
- jQuery.post(jQuery('#widget_list_administration').attr('action'), 'ajax=1&save=1&' + jQuery('#widget_list_administration').serialize(), function(response)
366
- {
367
- jQuery(all_btns).removeClass('disabled');
368
- jQuery('#preview').show();
369
- jQuery('#preview').attr('src',jQuery('#widget_list_administration').attr('action') + '?iframe=1');
370
- jQuery('#preview').css('width','100%');
371
- jQuery('#preview').css('height','500px');
372
- }, "json");
373
- }
374
-
375
- function Submit() {
376
- if (VerifyOK('')) {
377
- jQuery('#widget_list_administration').submit();
378
- }
379
- }
380
- </script>
381
- <form action="<!--POST_URL-->" method="post" id="widget_list_administration">
382
- <h1 style="font-size:24;"><!--TITLE--></h1><div class="horizontal_rule"></div>
383
- <h3>Get started quickly by selecting the features you need for this list</h3>
384
- <table>
385
- <!--BUTTON SECTION-->
386
- <tr id="sections">
387
- <td colspan="3">
388
- <h3><!--BUTTONS--></h3>
389
- </td>
390
- </tr>
391
-
392
- <!--START SECTION-->
393
- <tr class="start">
394
- <td>
395
- <h3>Primary Connection?:</h3>
396
- </td>
397
- <td>
398
- <input type="checkbox" name="primaryDatabase" id="primaryDatabase" value="1" <!--PRIMARY_CHECKED-->/>
399
- </td>
400
- <td>
401
- &#160;
402
- </td>
403
- </tr>
404
- <tr class="start">
405
- <td>
406
- <h3>Internal Name:</h3>
407
- </td>
408
- <td>
409
- <input type="text" name="name" id="name" value="<!--NAME_VALUE-->"/>
410
- </td>
411
- <td>
412
- &#160;
413
- </td>
414
- </tr>
415
- <tr class="start">
416
- <td>
417
- <h3>Model:</h3>
418
- </td>
419
- <td>
420
- <select name="view" id="view" onchange="ChangeViewModel(this)">
421
- <!--VIEW_OPTIONS-->
422
- </select>
423
- </td>
424
- <td>
425
- &#160;
426
- </td>
427
- </tr>
428
- <tr class="start">
429
- <td>
430
- <h3>Title:</h3>
431
- </td>
432
- <td>
433
- <input type="text" name="title" id="title" value="<!--TITLE_VALUE-->"/>
434
- </td>
435
- <td>
436
- <!--TITLE_HELP_BUTTON-->
437
- </td>
438
- </tr>
439
-
440
- <tr class="start">
441
- <td>
442
- <h3>Initial Description:</h3>
443
- </td>
444
- <td>
445
- <input type="text" name="listDescription" id="listDescription" value="<!--DESC_VALUE-->"/>
446
- </td>
447
- <td>
448
- <!--DESC_HELP_BUTTON-->
449
- </td>
450
- </tr>
451
-
452
- <!--FIELDS SECTION-->
453
- <tr class="fields" style="display:none;">
454
- <td>
455
- <h3>Allow Sorting?:</h3>
456
- </td>
457
- <td>
458
- <input type="checkbox" name="useSort" id="useSort" value="1" <!--SORTING_CHECKED-->/>
459
- </td>
460
- <td>
461
- &#160;
462
- </td>
463
- </tr>
464
-
465
- <tr class="fields" style="display:none;">
466
- <td>
467
- <h3>No Data Message:</h3>
468
- </td>
469
- <td>
470
- <input type="text" name="noDataMessage" id="noDataMessage" value="<!--NO_DATA_VALUE-->"/>
471
- </td>
472
- <td>
473
- &#160;
474
- </td>
475
- </tr>
476
-
477
- <tr class="fields" style="display:none;">
478
- <td colspan="3">
479
- <h1>Field Selection:</h1>
480
- <script type="text/plain" id="default_field_template">
481
- <!--FIELD_TEMPLATE-->
482
- </script>
483
- <table style="margin-left:150px;" id="field_table">
484
- <!--ALL_FIELDS-->
485
- </table>
486
- <table style="margin-left:150px;">
487
- <tr>
488
- <td colspan="3">
489
- <!--ADD_FIELD_BUTTON-->
490
- </td>
491
- </tr>
492
- </table>
493
- </td>
494
- </tr>
495
-
496
- <tr class="fields" style="display:none;">
497
- <td style="width:300px;">
498
- <h3>Hidden Fields?:</h3>
499
- </td>
500
- <td>
501
- <input type="checkbox" name="showHidden" onchange="ShowHiddenOptions();" id="showHidden" value="1" <!--SHOW_HIDDEN_CHECKED-->/>
502
- </td>
503
- <td>
504
- <!--HIDDEN_HELP_BUTTON-->
505
- </td>
506
- </tr>
507
-
508
- <tr class="fields hidden_fields_dependent" style="display:none;">
509
-
510
- <td colspan="3">
511
- <h1 style="margin-left: 75px;">Hidden Field Selection:</h1>
512
- <script type="text/plain" id="default_hidden_field_template">
513
- <!--HIDDEN_FIELD_TEMPLATE-->
514
- </script>
515
- <table style="margin-left:150px;" id="hidden_field_table">
516
- <!--ALL_HIDDEN_FIELDS-->
517
- </table>
518
- <table style="margin-left:150px;">
519
- <tr>
520
- <td colspan="3">
521
- <!--ADD_HIDDEN_FIELD_BUTTON-->
522
- </td>
523
- </tr>
524
- </table>
525
- </td>
526
- </tr>
527
-
528
- <tr class="fields" style="display:none;">
529
- <td style="width:300px;">
530
- <h3>Field Function?:</h3>
531
- </td>
532
- <td>
533
- <input type="checkbox" name="fieldFunctionOn" onchange="ShowFunctionOptions();" id="fieldFunctionOn" value="1" <!--SHOW_FUNCTION_CHECKED-->/>
534
- </td>
535
- <td>
536
- <!--FUNC_HELP_BUTTON-->
537
- </td>
538
- </tr>
539
-
540
- <tr class="fields function_dependent" style="display:none;">
541
- <td colspan="3">
542
- <h1 style="margin-left: 75px;">Field Functions To Wrap Around Fields:</h1>
543
- <script type="text/plain" id="default_field_function_template">
544
- <!--FIELD_FUNCTION_TEMPLATE-->
545
- </script>
546
- <table style="margin-left:150px;" id="field_function_table">
547
- <!--ALL_FIELD_FUNCTIONS-->
548
- </table>
549
- <table style="margin-left:150px;">
550
- <tr>
551
- <td colspan="3">
552
- <!--ADD_FIELD_FUNCTION_BUTTON-->
553
- </td>
554
- </tr>
555
- </table>
556
- </td>
557
- </tr>
558
-
559
- <!--ROWS SECTION-->
560
- <tr class="rows" style="display:none;">
561
- <td>
562
- <h3>Row Limit</h3>
563
- </td>
564
- <td>
565
- <input type="text" name="rowLimit" id="rowLimit" value="<!--ROW_LIMIT_VALUE-->"/>
566
- </td>
567
- <td>
568
- <!--ROW_HELP_BUTTON-->
569
- </td>
570
- </tr>
571
-
572
-
573
-
574
- <tr class="rows" style="display:none;">
575
- <td style="width:300px;">
576
- <h3>Row Buttons?:</h3>
577
- </td>
578
- <td>
579
- <input type="checkbox" name="rowButtonsOn" onchange="ShowButtonOptions();" id="rowButtonsOn" value="1" <!--BUTTONS_ON_CHECKED-->/>
580
- </td>
581
- <td>
582
- <!--BUTTON_HELP_BUTTON-->
583
- </td>
584
- </tr>
585
-
586
- <tr class="rows button_dependent" style="display:none;">
587
- <td colspan="3">
588
- <table style="margin-left:75px;">
589
- <tr>
590
- <td>
591
- <h3>Row Button Column Name</h3>
592
- </td>
593
- <td>
594
- <input type="text" name="rowButtonsName" id="rowButtonsName" value="<!--BUTTON_NAME_VALUE-->"/>
595
- </td>
596
- <td>
597
- &#160;
598
- </td>
599
- </tr>
600
- </table>
601
- </td>
602
- </tr>
603
-
604
- <tr class="rows button_dependent" style="display:none;">
605
- <td colspan="3">
606
- <h1 style="margin-left:75px;">Buttons:</h1>
607
- <script type="text/plain" id="default_button_template">
608
- <!--THE_BUTTON_TEMPLATE-->
609
- </script>
610
- <table style="margin-left:150px;" id="button_table">
611
- <!--ALL_BUTTONS-->
612
- </table>
613
- <table style="margin-left:150px;">
614
- <tr>
615
- <td colspan="3">
616
- <!--ADD_THE_BUTTON_BUTTON-->
617
- </td>
618
- </tr>
619
- </table>
620
- </td>
621
- </tr>
622
-
623
-
624
-
625
-
626
- <tr class="rows" style="display:none;">
627
- <td style="width:300px;">
628
- <h3>Drill Down Columns?:</h3>
629
- </td>
630
- <td>
631
- <input type="checkbox" name="drillDownsOn" onchange="ShowDrillDownOptions();" id="drillDownsOn" value="1" <!--DRILL_DOWN_CHECKED-->/>
632
- </td>
633
- <td>
634
- <!--DRILL_DOWN_HELP_BUTTON-->
635
- </td>
636
- </tr>
637
-
638
- <tr class="rows drill_down_dependent" style="display:none;">
639
- <td colspan="3">
640
- <script type="text/plain" id="default_drill_down_template">
641
- <!--THE_DRILL_DOWN_TEMPLATE-->
642
- </script>
643
- <table style="margin-left:150px;" id="drill_down_table">
644
- <!--ALL_DRILL_DOWNS-->
645
- </table>
646
- <table style="margin-left:150px;">
647
- <tr>
648
- <td colspan="3">
649
- <!--ADD_DRILL_DOWN_BUTTON-->
650
- </td>
651
- </tr>
652
- </table>
653
- </td>
654
- </tr>
655
-
656
-
657
- <!--SEARCH SECTION-->
658
- <tr class="search" style="display:none;">
659
- <td style="width:300px;">
660
- <h3>Show Search?:</h3>
661
- </td>
662
- <td>
663
- <input type="checkbox" name="showSearch" onchange="ShowSearchOptions(function() {ShowGroupingOptions();})" id="showSearch" value="1" <!--SHOW_SEARCH_CHECKED-->/>
664
- </td>
665
- <td>
666
- &#160;
667
- </td>
668
- </tr>
669
-
670
- <tr class="search search_dependent" style="display:none;">
671
- <td style="width:300px;">
672
- <h3>Show Export Button?:</h3>
673
- </td>
674
- <td>
675
- <input type="checkbox" name="showExport" onchange="ShowExportOptions();" id="showExport" value="1" <!--SHOW_EXPORT_CHECKED-->/>
676
- </td>
677
- <td>
678
- &#160;
679
- </td>
680
- </tr>
681
-
682
- <tr class="search search_dependent export_dependent" style="display:none;">
683
- <td colspan="3">
684
- <table style="margin-left:75px;">
685
- <tr>
686
- <td>
687
- <h3>Export Button Title:</h3>
688
- </td>
689
- <td>
690
- <input type="text" name="exportButtonTitle" id="exportButtonTitle" value="<!--EXPORT_VALUE-->"/>
691
- </td>
692
- <td>
693
- &#160;
694
- </td>
695
- </tr>
696
- </table>
697
- </td>
698
- </tr>
699
-
700
- <tr class="search search_dependent" style="display:none;">
701
- <td>
702
- <h3>Search Description/Title:</h3>
703
- </td>
704
- <td>
705
- <input type="text" name="searchTitle" id="searchTitle" value="<!--SEARCH_TITLE-->"/>
706
- </td>
707
- <td>
708
- <!--SEARCH_TITLE_BUTTON-->
709
- </td>
710
- </tr>
711
-
712
- <tr class="search search_dependent" style="display:none;">
713
- <td>
714
- <h3>Use Ransack Advanced Search?:</h3>
715
- </td>
716
- <td>
717
- <input type="checkbox" name="useRansack" onchange="ShowRansackOptions()" id="useRansack" value="1" <!--USE_RANSACK-->/>
718
- </td>
719
- <td>
720
- <!--RANSACK_HELP_BUTTON-->
721
- </td>
722
- </tr>
723
-
724
- <tr class="search search_dependent ransack_dependent" style="display:none;">
725
- <td colspan="3">
726
- <table style="margin-left:75px;">
727
- <tr>
728
- <td>
729
- <h3>Customized Ransack Form?:</h3>
730
- </td>
731
- <td>
732
- <input type="checkbox" name="ransackAdvancedForm" id="ransackAdvancedForm" value="1" <!--USE_RANSACK_ADV-->/>
733
- </td>
734
- <td>
735
- <!--ADV_RANSACK_HELP_BUTTON-->
736
- </td>
737
- </tr>
738
- </table>
739
- </td>
740
- </tr>
741
-
742
- <tr class="search search_dependent" style="display:none;">
743
- <td>
744
- <h3>Use Grouping?:</h3>
745
- </td>
746
- <td>
747
- <input type="checkbox" name="useGrouping" onchange="ShowGroupingOptions()" id="useGrouping" value="1" <!--USE_GROUPING-->/>
748
- </td>
749
- <td>
750
- <!--GROUP_BY_HELP_BUTTON-->
751
- </td>
752
- </tr>
753
-
754
- <tr class="search search_dependent grouping_dependent" style="display:none;">
755
- <td colspan="3">
756
- <h1 style="margin-left: 75px;">Custom Items To Group By:</h1>
757
- <table>
758
- <tr>
759
- <td>
760
- <script type="text/plain" id="default_grouping_template">
761
- <!--DEFAULT_GROUPING-->
762
- </script>
763
- <table style="margin-left:150px;" id="grouping_table">
764
- <!--GROUPING_ITEMS-->
765
- </table>
766
- <table style="margin-left:150px;">
767
- <tr>
768
- <td colspan="3">
769
- <!--ADD_GROUP_BY_BUTTON-->
770
- </td>
771
- </tr>
772
- </table>
773
- </td>
774
- </tr>
775
- </table>
776
-
777
- <table style="margin-left:150px;">
778
- <tr>
779
- <td colspan="3">
780
- <!--ADD_GROUPING_BUTTON-->
781
- </td>
782
- </tr>
783
- </table>
784
- </td>
785
- </tr>
786
-
787
- <!--FOOTER SECTION-->
788
- <tr class="footer" style="display:none;">
789
- <td style="width:300px;">
790
- <h3>Build Customized Footer?:</h3>
791
- </td>
792
- <td>
793
- <input type="checkbox" name="footerOn" onchange="ShowFooterOptions();" id="footerOn" value="1" <!--FOOTER_CHECKED-->/>
794
- </td>
795
- <td>
796
-
797
- </td>
798
- </tr>
799
- <tr class="footer footer_dependent" style="display:none;">
800
- <td colspan="3">
801
- <h1 style="margin-left:75px;">Footer Buttons:</h1>
802
- <script type="text/plain" id="default_footer_template">
803
- <!--FOOTER_BUTTON_TEMPLATE-->
804
- </script>
805
- <table style="margin-left:150px;" id="footer_table">
806
- <!--ALL_FOOTER_BUTTONS-->
807
- </table>
808
- <table style="margin-left:150px;">
809
- <tr>
810
- <td colspan="3">
811
- <!--ADD_THE_FOOTER_BUTTON-->
812
- </td>
813
- </tr>
814
- </table>
815
- </td>
816
- </tr>
817
-
818
- <!--MISC & SUBMIT SECTION-->
819
-
820
- <tr class="misc_submit" style="display:none;">
821
- <td style="width:300px;">
822
- <h3>Add Row Checkbox?:</h3>
823
- </td>
824
- <td>
825
- <input type="checkbox" name="checkboxEnabled" onchange="ShowCheckboxOptions();" id="checkboxEnabled" value="1" <!--SHOW_CHECKBOX_CHECKED-->/>
826
- </td>
827
- <td>
828
- &#160;
829
- </td>
830
- </tr>
831
-
832
- <tr class="misc_submit checkbox_dependent" style="display:none;">
833
- <td colspan="3">
834
- <table style="margin-left:75px;">
835
- <tr>
836
- <td>
837
- <h3>Checkbox Value:</h3>
838
- </td>
839
- <td>
840
- <select name="checkboxField" id="checkboxField">
841
- <!--CHECKBOX_SELECTED_FIELDS-->
842
- </select>
843
- </td>
844
- <td>
845
- <!--CHECK_HELP_BUTTON-->
846
- </td>
847
- </tr>
848
- </table>
849
- </td>
850
- </tr>
851
- <tr class="misc_submit" style="display:none;" >
852
- <td>
853
- <h3>Submit:</h3>
854
- </td>
855
- <td>
856
- <!--SUBMIT_WIDGET_LIST-->
857
- </td>
858
- <td>
859
- &#160;
860
- </td>
861
- </tr>
862
-
863
- <tr>
864
- <td colspan="3">
865
- <iframe src="" id="preview"></iframe>
866
- </td>
867
- </tr>
868
-
869
- </table>
1
+ <style type="text/css">
2
+ input[type="text"] {
3
+ font-size:25px;
4
+ height:33px;
5
+ left:0;
6
+ line-height:33px;
7
+ padding:8px 8px 7px;
8
+ top:0;
9
+ width:600px;
10
+ }
11
+ select {
12
+ font-size:25px;
13
+ height:50px;
14
+ left:0;
15
+ line-height:33px;
16
+ top:0;
17
+ width:600px;
18
+ }
19
+
20
+ .buttons_drill_down_name_button {
21
+ margin-right: 70px;
22
+ }
23
+
24
+ .buttons_data_to_pass_from_view_button {
25
+ margin-right: 120px;
26
+ }
27
+ </style>
28
+
29
+ <script type="text/javascript">
30
+ var all = '.init,.start,.fields,.rows,.search,.footer,.misc_submit';
31
+ var all_btns = '#start,#fields,#rows,#search,#footer,#misc_submit';
32
+ jQuery(document).ready(function () {
33
+ if (jQuery('#view').val() != '') {
34
+ jQuery(all_btns).removeClass('disabled');
35
+ }
36
+ if (jQuery('#preview').attr('src') == '') {
37
+ jQuery('#preview').hide();
38
+ } else {
39
+ jQuery('#preview').show();
40
+ }
41
+
42
+ window.onbeforeunload = function (evt) {
43
+ var message = 'Are you sure you want to abandon this widget_list implementation? Doing so will lose all your work?';
44
+ if (typeof evt == 'undefined') {
45
+ evt = window.event;
46
+ }
47
+
48
+ if (evt) {
49
+ evt.returnValue = message;
50
+ }
51
+ if (!isSubmitting) {
52
+ return message;
53
+ }
54
+ }
55
+
56
+ });
57
+
58
+ function VerifyOK(func_name) {
59
+ var ok = true;
60
+ if (jQuery('#view').val() == '') {
61
+ ok = false;
62
+ alert('Please select a Model to use as your base widget_list');
63
+ }
64
+ else if (jQuery('#rowLimit').val() != '10' && jQuery('#rowLimit').val() != '20' && jQuery('#rowLimit').val() != '50' && jQuery('#rowLimit').val() != '100' && jQuery('#rowLimit').val() != '500' && jQuery('#rowLimit').val() != '1000') {
65
+ ok = false;
66
+ alert('Invalid Row Limit, please see help button.');
67
+ }
68
+ return ok;
69
+ }
70
+
71
+ function ClickTab(which_class,func_name,by_pass) {
72
+ if (typeof by_pass == 'undefined') {
73
+ var by_pass = false;
74
+ }
75
+ if (by_pass || VerifyOK(func_name)) {
76
+ jQuery('.search_dependent').hide(0,function() {
77
+ jQuery(all).hide(0,function() {
78
+ jQuery(which_class).fadeIn(0,function() {
79
+ if (func_name == 'ShowSearch') {
80
+ ShowSearchOptions(function() {
81
+ ShowGroupingOptions();
82
+ ShowExportOptions();
83
+
84
+ });
85
+ }
86
+ if (func_name == 'ShowFields') {
87
+ ShowHiddenOptions();
88
+ ShowFunctionOptions();
89
+ }
90
+ if (func_name == 'ShowSubmit') {
91
+ ShowCheckboxOptions();
92
+ }
93
+ if (func_name == 'ShowRows') {
94
+ ShowButtonOptions();
95
+ ShowDrillDownOptions();
96
+ }
97
+ if (func_name == 'ShowFooter') {
98
+ ShowFooterOptions();
99
+ }
100
+ });
101
+ });
102
+ });
103
+
104
+ if (!by_pass) {
105
+ SaveChanges();
106
+ }
107
+
108
+ }
109
+ }
110
+
111
+ function ShowStart() {
112
+ ClickTab('.start',arguments.callee.name);
113
+ }
114
+
115
+ function ShowFields() {
116
+ ClickTab('.fields',arguments.callee.name);
117
+ }
118
+
119
+ function ShowRows() {
120
+ ClickTab('.rows',arguments.callee.name);
121
+ }
122
+
123
+ function ShowSearch() {
124
+ ClickTab('.search',arguments.callee.name);
125
+ }
126
+
127
+ function ShowFooter() {
128
+ ClickTab('.footer',arguments.callee.name);
129
+ }
130
+
131
+ function ShowSubmit() {
132
+ ClickTab('.misc_submit',arguments.callee.name);
133
+ }
134
+
135
+ function ReplaceColumnsToLinked(obj) {
136
+ found = false;
137
+ var className = obj.className;
138
+ jQuery(obj).css('background-color','white');
139
+ jQuery('.fields_keys, .fields_hidden_keys, .fields_function_keys').each(
140
+ function(key, value) {
141
+ if(jQuery(value).val() == jQuery(obj).val().trim() && jQuery(obj).val().search(/_linked/i) == -1) {
142
+ found = true;
143
+ var id_original = jQuery(obj).val().trim();
144
+ jQuery(value).val(jQuery(obj).val().trim() + '_linked');
145
+ jQuery(obj).val(jQuery(obj).val().trim() + '_linked');
146
+ jQuery(obj).attr('value',jQuery(this).val().trim());
147
+ if (className == 'drill_downs_data_to_pass_from_view') {
148
+ jQuery('.drill_downs_column_to_show[value="col_name"]').each(
149
+ function(key1, value1) {
150
+ jQuery(value1).val(jQuery(obj).val().trim());
151
+ jQuery(value1).attr('value',jQuery(value1).val().trim());
152
+ return false;
153
+ }
154
+ )
155
+ } else {
156
+ jQuery('.drill_downs_data_to_pass_from_view[value="col_name"]').each(
157
+ function(key1, value1) {
158
+ jQuery(value1).val(jQuery(obj).val().trim());
159
+ jQuery(value1).attr('value',jQuery(value1).val().trim());
160
+ return false;
161
+ }
162
+ )
163
+ }
164
+
165
+ jQuery('.drill_downs_drill_down_name[value="filter_col_name"]').each(
166
+ function(key1, value1) {
167
+ jQuery(value1).val('filter_by_' + id_original);
168
+ jQuery(value1).attr('value','filter_by_' + id_original);
169
+ return false;
170
+ }
171
+ )
172
+
173
+
174
+ jQuery('#showHidden').attr('checked',true);
175
+ AddHiddenField();
176
+ jQuery('.fields_hidden_keys[value=""]').each(
177
+ function(key1, value1) {
178
+ jQuery(value1).val(id_original);
179
+ jQuery(value1).attr('value',id_original);
180
+ return false;
181
+ }
182
+ );
183
+ }
184
+ }
185
+ );
186
+
187
+ if (!found && jQuery(obj).val().search(/_linked/i) == -1) {
188
+ alert('Invalid Field Name defined. Please change the value');
189
+ jQuery(obj).css('background-color','red');
190
+ }
191
+ }
192
+
193
+ function InvalidField(obj) {
194
+ found = false;
195
+ jQuery(obj).css('background-color','white');
196
+ jQuery('.fields_keys, .fields_hidden_keys, .fields_function_keys').each(
197
+ function(key, value) {
198
+ if(jQuery(value).val() == jQuery(obj).val().trim()) {
199
+ found = true;
200
+ }
201
+ }
202
+ );
203
+
204
+ if (!found) {
205
+ alert('Invalid Field Name defined. Please change the value');
206
+ jQuery(obj).css('background-color','red');
207
+ }
208
+ }
209
+
210
+ function GoodClass(obj) {
211
+ found = false;
212
+ jQuery(obj).css('background-color','white');
213
+ if (jQuery(obj).val() == 'primary' || jQuery(obj).val() == 'info' || jQuery(obj).val() == 'success' || jQuery(obj).val() == 'danger' || jQuery(obj).val() == 'disabled' || jQuery(obj).val() == 'default') {
214
+ found = true;
215
+ }
216
+ if (!found) {
217
+ alert('Invalid Class Name. Click Help icon for more information.');
218
+ jQuery(obj).css('background-color','red');
219
+ }
220
+ }
221
+
222
+
223
+ function ShowSearchOptions(callback) {
224
+ if (jQuery('#showSearch').is(':checked')) {
225
+ jQuery('.search_dependent').show();
226
+ } else {
227
+ jQuery('.search_dependent').hide();
228
+ }
229
+ if (typeof(callback) == 'function') {
230
+ (callback)();
231
+ }
232
+ }
233
+
234
+ function ShowGroupingOptions() {
235
+ if (jQuery('#useGrouping').is(':checked') && jQuery('#showSearch').is(':checked')) {
236
+ jQuery('.grouping_dependent').show();
237
+ } else {
238
+ jQuery('.grouping_dependent').hide();
239
+ }
240
+ }
241
+
242
+ function ShowRansackOptions() {
243
+ if (jQuery('#useRansack').is(':checked') && jQuery('#showSearch').is(':checked')) {
244
+ jQuery('.ransack_dependent').show();
245
+ } else {
246
+ jQuery('.ransack_dependent').hide();
247
+ }
248
+ }
249
+
250
+ function ShowFooterOptions() {
251
+ if (jQuery('#footerOn').is(':checked')) {
252
+ jQuery('.footer_dependent').show();
253
+ } else {
254
+ jQuery('.footer_dependent').hide();
255
+ }
256
+ }
257
+
258
+ function ShowExportOptions() {
259
+ if (jQuery('#showExport').is(':checked') && jQuery('#showSearch').is(':checked')) {
260
+ jQuery('.export_dependent').show();
261
+ } else {
262
+ jQuery('.export_dependent').hide();
263
+ }
264
+ }
265
+
266
+ function ShowHiddenOptions() {
267
+ if (jQuery('#showHidden').is(':checked')) {
268
+ if (jQuery('.fields_hidden_keys').length == 0) {
269
+ AddHiddenField();
270
+ }
271
+ jQuery('.hidden_fields_dependent').show();
272
+ } else {
273
+ jQuery('.hidden_fields_dependent').hide();
274
+ }
275
+ }
276
+
277
+ function ShowButtonOptions() {
278
+ if (jQuery('#rowButtonsOn').is(':checked')) {
279
+ jQuery('.button_dependent').show();
280
+ } else {
281
+ jQuery('.button_dependent').hide();
282
+ }
283
+ }
284
+ function ShowDrillDownOptions() {
285
+ if (jQuery('#drillDownsOn').is(':checked')) {
286
+ if (jQuery('.drill_downs_data_to_pass_from_view').length == 0) {
287
+ AddDrillDown();
288
+ }
289
+ jQuery('.drill_down_dependent').show();
290
+ } else {
291
+ jQuery('.drill_down_dependent').hide();
292
+ }
293
+ }
294
+
295
+ function ShowFunctionOptions() {
296
+ if (jQuery('#fieldFunctionOn').is(':checked')) {
297
+ if (jQuery('.fields_function_keys').length == 0) {
298
+ AddFieldFunction();
299
+ }
300
+ jQuery('.function_dependent').show();
301
+ } else {
302
+ jQuery('.function_dependent').hide();
303
+ }
304
+ }
305
+
306
+ function ShowCheckboxOptions() {
307
+ if (jQuery('#checkboxEnabled').is(':checked')) {
308
+ jQuery('.checkbox_dependent').show();
309
+ } else {
310
+ jQuery('.checkbox_dependent').hide();
311
+ }
312
+ }
313
+
314
+ function AddGroupingItem() {
315
+ jQuery('#grouping_items').html(jQuery('#grouping_items').html() + jQuery('#grouping_items_default').html());
316
+ }
317
+
318
+ function AddField() {
319
+ jQuery('#field_table').html(jQuery('#field_table').html() + jQuery('#default_field_template').html());
320
+ }
321
+
322
+ function AddGroupBy() {
323
+ jQuery('#grouping_table').html(jQuery('#grouping_table').html() + jQuery('#default_grouping_template').html());
324
+ }
325
+
326
+ function AddButton() {
327
+ jQuery('#button_table').html(jQuery('#button_table').html() + jQuery('#default_button_template').html());
328
+ jQuery('.buttons_url').last().val('/' + jQuery('#desiredController').val());
329
+ }
330
+
331
+ function AddDrillDown() {
332
+ jQuery('#drill_down_table').html(jQuery('#drill_down_table').html() + jQuery('#default_drill_down_template').html());
333
+ }
334
+
335
+ function AddFooterButton() {
336
+ jQuery('#footer_table').html(jQuery('#footer_table').html() + jQuery('#default_footer_template').html());
337
+ jQuery('.footer_buttons_url').last().val('/' + jQuery('#desiredController').val());
338
+ }
339
+
340
+ function AddHiddenField() {
341
+ jQuery('#hidden_field_table').html(jQuery('#hidden_field_table').html() + jQuery('#default_hidden_field_template').html());
342
+ }
343
+
344
+ function AddFieldFunction() {
345
+ jQuery('#field_function_table').html(jQuery('#field_function_table').html() + jQuery('#default_field_function_template').html());
346
+ }
347
+
348
+ function RemoveField(obj) {
349
+ jQuery(obj).closest('tr').remove();
350
+ }
351
+
352
+ function ChangeViewModel(obj) {
353
+ jQuery(all_btns).addClass('disabled');
354
+ if(jQuery(obj).val() != '') {
355
+ jQuery.post(jQuery('#widget_list_administration').attr('action'), 'ajax=1&model=' + jQuery(obj).val(), function(response)
356
+ {
357
+ jQuery('#name').val(jQuery(obj).val().toLowerCase() + '_listing');
358
+ jQuery('#field_table').html(response['fields']);
359
+ jQuery('#hidden_field_table').html(response['fields_hidden']);
360
+ jQuery('#checkboxField').html(response['checked_fields']);
361
+ jQuery('#footer_table').html(response['footer_buttons']);
362
+ jQuery('#grouping_table').html(response['group_by']);
363
+ SaveChanges();
364
+ if (jQuery(obj).val() != '') {
365
+ jQuery(all_btns).removeClass('disabled');
366
+ }
367
+
368
+
369
+ jQuery(all_btns).removeClass('disabled');
370
+ jQuery('#title').val(jQuery(obj).val() + 's');
371
+ jQuery('#listDescription').val('Showing All ' + jQuery(obj).val() + 's');
372
+
373
+ if (jQuery(obj).val() != '') {
374
+ jQuery('#noDataMessage').val('No ' + jQuery(obj).val() + 's Found Within Your Criteria');
375
+ }
376
+
377
+ if (jQuery(obj).val() != '' && jQuery('#showExport').is(':checked')) {
378
+ jQuery('#exportButtonTitle').val('Export All ' + jQuery(obj).val() + 's');
379
+ }
380
+ }, "json").error(function(response) {
381
+ alert('An error occurred instantiating this model. Check the response for errors.');
382
+ });
383
+ }
384
+ }
385
+
386
+ function SaveChanges() {
387
+ jQuery(all_btns).addClass('disabled');
388
+ jQuery.post(jQuery('#widget_list_administration').attr('action'), 'ajax=1&save=1&' + jQuery('#widget_list_administration').serialize(), function(response)
389
+ {
390
+ jQuery(all_btns).removeClass('disabled');
391
+ jQuery('#preview').show();
392
+ jQuery('#preview').attr('src',jQuery('#widget_list_administration').attr('action') + '?iframe=1&desiredController=' + jQuery('#desiredController').val() + '&desiredAction=' + jQuery('#desiredAction').val() );
393
+ jQuery('#preview').css('width','100%');
394
+ jQuery('#preview').css('height','500px');
395
+ }, "json");
396
+ }
397
+
398
+ var isSubmitting = false;
399
+ function Submit() {
400
+ if (VerifyOK('')) {
401
+ isSubmitting = true;
402
+ jQuery('#widget_list_administration').submit();
403
+ }
404
+ }
405
+
406
+ function ChangeController(obj) {
407
+ jQuery('.footer_buttons_url').each(function (key,value) {
408
+ if (jQuery(value).val() == '/' + jQuery('#desiredControllerOriginal').val() + '/add/') {
409
+ jQuery(value).val('/' + jQuery(obj).val() + '/add/');
410
+ jQuery(value).attr('value','/' + jQuery(obj).val() + '/add/');
411
+ }
412
+ });
413
+ jQuery('.buttons_url').each(function (key,value) {
414
+ if (jQuery(value).val() == '/' + jQuery('#desiredControllerOriginal').val() + '/edit/id/') {
415
+ jQuery(value).val('/' + jQuery(obj).val() + '/edit/id/');
416
+ jQuery(value).attr('value','/' + jQuery(obj).val() + '/edit/id/');
417
+ }
418
+ if (jQuery(value).val() == '/' + jQuery('#desiredControllerOriginal').val() + '/delete/id/') {
419
+ jQuery(value).val('/' + jQuery(obj).val() + '/delete/id/');
420
+ jQuery(value).attr('value','/' + jQuery(obj).val() + '/delete/id/');
421
+ }
422
+ });
423
+ }
424
+
425
+ </script>
426
+ <form action="<!--POST_URL-->" method="post" id="widget_list_administration">
427
+ <h1 style="font-size:24;"><!--TITLE--></h1><div class="horizontal_rule"></div>
428
+ <h3>Get started quickly by selecting the features you need for this list</h3>
429
+ <table>
430
+ <!--BUTTON SECTION-->
431
+ <tr id="sections" <!--BUTTON_CSS-->>
432
+ <td colspan="3">
433
+ <h3><!--BUTTONS--></h3>
434
+ </td>
435
+ </tr>
436
+
437
+ <!--START SECTION-->
438
+
439
+ <!--EDIT_OR_ADD_NEW-->
440
+
441
+ <tr class="start" <!--START_CSS-->>
442
+ <td>
443
+ <h3>Primary Connection?:</h3>
444
+ </td>
445
+ <td>
446
+ <input type="checkbox" name="primaryDatabase" id="primaryDatabase" value="1" <!--PRIMARY_CHECKED-->/>
447
+ </td>
448
+ <td>
449
+ &#160;
450
+ </td>
451
+ </tr>
452
+
453
+ <tr class="start" <!--START_CSS-->>
454
+ <td>
455
+ <h3>Desired Controller Location:</h3>
456
+ </td>
457
+ <td>
458
+ <input type="text" onblur="ChangeController(this);" name="desiredController" id="desiredController" value="<!--CONTROLLER_VALUE-->"/>
459
+ <input type="hidden" name="desiredControllerOriginal" id="desiredControllerOriginal" value="<!--CONTROLLER_VALUE-->"/>
460
+ </td>
461
+ <td>
462
+ <!--CONTROLLER_HELP_BUTTON-->
463
+ </td>
464
+ </tr>
465
+
466
+ <tr class="start" <!--START_CSS-->>
467
+ <td>
468
+ <h3>Desired Action:</h3>
469
+ </td>
470
+ <td>
471
+ <input type="text" name="desiredAction" id="desiredAction" value="<!--ACTION_VALUE-->"/>
472
+ </td>
473
+ <td>
474
+ <!--ACTION_HELP_BUTTON-->
475
+ </td>
476
+ </tr>
477
+
478
+ <tr class="start" <!--START_CSS-->>
479
+ <td>
480
+ <h3>Internal Name:</h3>
481
+ </td>
482
+ <td>
483
+ <input type="text" name="name" id="name" value="<!--NAME_VALUE-->"/>
484
+ </td>
485
+ <td>
486
+ <!--NAME_HELP_BUTTON-->
487
+ </td>
488
+ </tr>
489
+
490
+ <tr class="start" <!--START_CSS-->>
491
+ <td>
492
+ <h3>Model:</h3>
493
+ </td>
494
+ <td>
495
+ <select name="view" id="view" onchange="ChangeViewModel(this)">
496
+ <!--VIEW_OPTIONS-->
497
+ </select>
498
+ </td>
499
+ <td>
500
+ &#160;
501
+ </td>
502
+ </tr>
503
+ <tr class="start" <!--START_CSS-->>
504
+ <td>
505
+ <h3>Title:</h3>
506
+ </td>
507
+ <td>
508
+ <input type="text" name="title" id="title" value="<!--TITLE_VALUE-->"/>
509
+ </td>
510
+ <td>
511
+ <!--TITLE_HELP_BUTTON-->
512
+ </td>
513
+ </tr>
514
+
515
+ <tr class="start" <!--START_CSS-->>
516
+ <td>
517
+ <h3>Initial Description:</h3>
518
+ </td>
519
+ <td>
520
+ <input type="text" name="listDescription" id="listDescription" value="<!--DESC_VALUE-->"/>
521
+ </td>
522
+ <td>
523
+ <!--DESC_HELP_BUTTON-->
524
+ </td>
525
+ </tr>
526
+
527
+ <!--FIELDS SECTION-->
528
+ <tr class="fields" style="display:none;">
529
+ <td>
530
+ <h3>Allow Sorting?:</h3>
531
+ </td>
532
+ <td>
533
+ <input type="checkbox" name="useSort" id="useSort" value="1" <!--SORTING_CHECKED-->/>
534
+ </td>
535
+ <td>
536
+ &#160;
537
+ </td>
538
+ </tr>
539
+
540
+ <tr class="fields" style="display:none;">
541
+ <td>
542
+ <h3>No Data Message:</h3>
543
+ </td>
544
+ <td>
545
+ <input type="text" name="noDataMessage" id="noDataMessage" value="<!--NO_DATA_VALUE-->"/>
546
+ </td>
547
+ <td>
548
+ &#160;
549
+ </td>
550
+ </tr>
551
+
552
+ <tr class="fields" style="display:none;">
553
+ <td colspan="3">
554
+ <h1>Field Selection:</h1>
555
+ <script type="text/plain" id="default_field_template">
556
+ <!--FIELD_TEMPLATE-->
557
+ </script>
558
+ <table style="margin-left:150px;" id="field_table">
559
+ <!--ALL_FIELDS-->
560
+ </table>
561
+ <table style="margin-left:150px;">
562
+ <tr>
563
+ <td colspan="3">
564
+ <!--ADD_FIELD_BUTTON-->
565
+ </td>
566
+ </tr>
567
+ </table>
568
+ </td>
569
+ </tr>
570
+
571
+ <tr class="fields" style="display:none;">
572
+ <td style="width:300px;">
573
+ <h3>Hidden Fields?:</h3>
574
+ </td>
575
+ <td>
576
+ <input type="checkbox" name="showHidden" onchange="ShowHiddenOptions();" id="showHidden" value="1" <!--SHOW_HIDDEN_CHECKED-->/>
577
+ </td>
578
+ <td>
579
+ <!--HIDDEN_HELP_BUTTON-->
580
+ </td>
581
+ </tr>
582
+
583
+ <tr class="fields hidden_fields_dependent" style="display:none;">
584
+
585
+ <td colspan="3">
586
+ <h1 style="margin-left: 75px;">Hidden Field Selection:</h1>
587
+ <script type="text/plain" id="default_hidden_field_template">
588
+ <!--HIDDEN_FIELD_TEMPLATE-->
589
+ </script>
590
+ <table style="margin-left:150px;" id="hidden_field_table">
591
+ <!--ALL_HIDDEN_FIELDS-->
592
+ </table>
593
+ <table style="margin-left:150px;">
594
+ <tr>
595
+ <td colspan="3">
596
+ <!--ADD_HIDDEN_FIELD_BUTTON-->
597
+ </td>
598
+ </tr>
599
+ </table>
600
+ </td>
601
+ </tr>
602
+
603
+ <tr class="fields" style="display:none;">
604
+ <td style="width:300px;">
605
+ <h3>Field Function?:</h3>
606
+ </td>
607
+ <td>
608
+ <input type="checkbox" name="fieldFunctionOn" onchange="ShowFunctionOptions();" id="fieldFunctionOn" value="1" <!--SHOW_FUNCTION_CHECKED-->/>
609
+ </td>
610
+ <td>
611
+ <!--FUNC_HELP_BUTTON-->
612
+ </td>
613
+ </tr>
614
+
615
+ <tr class="fields function_dependent" style="display:none;">
616
+ <td colspan="3">
617
+ <h1 style="margin-left: 75px;">Field Functions To Wrap Around Fields:</h1>
618
+ <script type="text/plain" id="default_field_function_template">
619
+ <!--FIELD_FUNCTION_TEMPLATE-->
620
+ </script>
621
+ <table style="margin-left:150px;" id="field_function_table">
622
+ <!--ALL_FIELD_FUNCTIONS-->
623
+ </table>
624
+ <table style="margin-left:150px;">
625
+ <tr>
626
+ <td colspan="3">
627
+ <!--ADD_FIELD_FUNCTION_BUTTON-->
628
+ </td>
629
+ </tr>
630
+ </table>
631
+ </td>
632
+ </tr>
633
+
634
+ <!--ROWS SECTION-->
635
+ <tr class="rows" style="display:none;">
636
+ <td>
637
+ <h3>Row Limit</h3>
638
+ </td>
639
+ <td>
640
+ <input type="text" name="rowLimit" id="rowLimit" value="<!--ROW_LIMIT_VALUE-->"/>
641
+ </td>
642
+ <td>
643
+ <!--ROW_HELP_BUTTON-->
644
+ </td>
645
+ </tr>
646
+
647
+
648
+
649
+ <tr class="rows" style="display:none;">
650
+ <td style="width:300px;">
651
+ <h3>Row Buttons?:</h3>
652
+ </td>
653
+ <td>
654
+ <input type="checkbox" name="rowButtonsOn" onchange="ShowButtonOptions();" id="rowButtonsOn" value="1" <!--BUTTONS_ON_CHECKED-->/>
655
+ </td>
656
+ <td>
657
+ <!--BUTTON_HELP_BUTTON-->
658
+ </td>
659
+ </tr>
660
+
661
+ <tr class="rows button_dependent" style="display:none;">
662
+ <td colspan="3">
663
+ <table style="margin-left:75px;">
664
+ <tr>
665
+ <td>
666
+ <h3>Row Button Column Name</h3>
667
+ </td>
668
+ <td>
669
+ <input type="text" name="rowButtonsName" id="rowButtonsName" value="<!--BUTTON_NAME_VALUE-->"/>
670
+ </td>
671
+ <td>
672
+ &#160;
673
+ </td>
674
+ </tr>
675
+ </table>
676
+ </td>
677
+ </tr>
678
+
679
+ <tr class="rows button_dependent" style="display:none;">
680
+ <td colspan="3">
681
+ <h1 style="margin-left:75px;">Buttons:</h1>
682
+ <script type="text/plain" id="default_button_template">
683
+ <!--THE_BUTTON_TEMPLATE-->
684
+ </script>
685
+ <table style="margin-left:150px;" id="button_table">
686
+ <!--ALL_BUTTONS-->
687
+ </table>
688
+ <table style="margin-left:150px;">
689
+ <tr>
690
+ <td colspan="3">
691
+ <!--ADD_THE_BUTTON_BUTTON-->
692
+ </td>
693
+ </tr>
694
+ </table>
695
+ </td>
696
+ </tr>
697
+
698
+
699
+
700
+
701
+ <tr class="rows" style="display:none;">
702
+ <td style="width:300px;">
703
+ <h3>Drill Down Columns?:</h3>
704
+ </td>
705
+ <td>
706
+ <input type="checkbox" name="drillDownsOn" onchange="ShowDrillDownOptions();" id="drillDownsOn" value="1" <!--DRILL_DOWN_CHECKED-->/>
707
+ </td>
708
+ <td>
709
+ <!--DRILL_DOWN_HELP_BUTTON-->
710
+ </td>
711
+ </tr>
712
+
713
+ <tr class="rows drill_down_dependent" style="display:none;">
714
+ <td colspan="3">
715
+ <script type="text/plain" id="default_drill_down_template">
716
+ <!--THE_DRILL_DOWN_TEMPLATE-->
717
+ </script>
718
+ <table style="margin-left:150px;" id="drill_down_table">
719
+ <!--ALL_DRILL_DOWNS-->
720
+ </table>
721
+ <table style="margin-left:150px;">
722
+ <tr>
723
+ <td colspan="3">
724
+ <!--ADD_DRILL_DOWN_BUTTON-->
725
+ </td>
726
+ </tr>
727
+ </table>
728
+ </td>
729
+ </tr>
730
+
731
+
732
+ <!--SEARCH SECTION-->
733
+ <tr class="search" style="display:none;">
734
+ <td style="width:300px;">
735
+ <h3>Show Search?:</h3>
736
+ </td>
737
+ <td>
738
+ <input type="checkbox" name="showSearch" onchange="ShowSearchOptions(function() {ShowGroupingOptions();})" id="showSearch" value="1" <!--SHOW_SEARCH_CHECKED-->/>
739
+ </td>
740
+ <td>
741
+ &#160;
742
+ </td>
743
+ </tr>
744
+
745
+ <tr class="search search_dependent" style="display:none;">
746
+ <td style="width:300px;">
747
+ <h3>Show Export Button?:</h3>
748
+ </td>
749
+ <td>
750
+ <input type="checkbox" name="showExport" onchange="ShowExportOptions();" id="showExport" value="1" <!--SHOW_EXPORT_CHECKED-->/>
751
+ </td>
752
+ <td>
753
+ &#160;
754
+ </td>
755
+ </tr>
756
+
757
+ <tr class="search search_dependent export_dependent" style="display:none;">
758
+ <td colspan="3">
759
+ <table style="margin-left:75px;">
760
+ <tr>
761
+ <td>
762
+ <h3>Export Button Title:</h3>
763
+ </td>
764
+ <td>
765
+ <input type="text" name="exportButtonTitle" id="exportButtonTitle" value="<!--EXPORT_VALUE-->"/>
766
+ </td>
767
+ <td>
768
+ &#160;
769
+ </td>
770
+ </tr>
771
+ </table>
772
+ </td>
773
+ </tr>
774
+
775
+ <tr class="search search_dependent" style="display:none;">
776
+ <td>
777
+ <h3>Search Description/Title:</h3>
778
+ </td>
779
+ <td>
780
+ <input type="text" name="searchTitle" id="searchTitle" value="<!--SEARCH_TITLE-->"/>
781
+ </td>
782
+ <td>
783
+ <!--SEARCH_TITLE_BUTTON-->
784
+ </td>
785
+ </tr>
786
+
787
+ <tr class="search search_dependent" style="display:none;">
788
+ <td>
789
+ <h3>Use Ransack Advanced Search?:</h3>
790
+ </td>
791
+ <td>
792
+ <input type="checkbox" name="useRansack" onchange="ShowRansackOptions()" id="useRansack" value="1" <!--USE_RANSACK-->/>
793
+ </td>
794
+ <td>
795
+ <!--RANSACK_HELP_BUTTON-->
796
+ </td>
797
+ </tr>
798
+
799
+ <tr class="search search_dependent ransack_dependent" style="display:none;">
800
+ <td colspan="3">
801
+ <table style="margin-left:75px;">
802
+ <tr>
803
+ <td>
804
+ <h3>Customized Ransack Form?:</h3>
805
+ </td>
806
+ <td>
807
+ <input type="checkbox" name="ransackAdvancedForm" id="ransackAdvancedForm" value="1" <!--USE_RANSACK_ADV-->/>
808
+ </td>
809
+ <td>
810
+ <!--ADV_RANSACK_HELP_BUTTON-->
811
+ </td>
812
+ </tr>
813
+ </table>
814
+ </td>
815
+ </tr>
816
+
817
+ <tr class="search search_dependent" style="display:none;">
818
+ <td>
819
+ <h3>Use Grouping?:</h3>
820
+ </td>
821
+ <td>
822
+ <input type="checkbox" name="useGrouping" onchange="ShowGroupingOptions()" id="useGrouping" value="1" <!--USE_GROUPING-->/>
823
+ </td>
824
+ <td>
825
+ <!--GROUP_BY_HELP_BUTTON-->
826
+ </td>
827
+ </tr>
828
+
829
+ <tr class="search search_dependent grouping_dependent" style="display:none;">
830
+ <td colspan="3">
831
+ <h1 style="margin-left: 75px;">Custom Items To Group By:</h1>
832
+ <table>
833
+ <tr>
834
+ <td>
835
+ <script type="text/plain" id="default_grouping_template">
836
+ <!--DEFAULT_GROUPING-->
837
+ </script>
838
+ <table style="margin-left:150px;" id="grouping_table">
839
+ <!--GROUPING_ITEMS-->
840
+ </table>
841
+ <table style="margin-left:150px;">
842
+ <tr>
843
+ <td colspan="3">
844
+ <!--ADD_GROUP_BY_BUTTON-->
845
+ </td>
846
+ </tr>
847
+ </table>
848
+ </td>
849
+ </tr>
850
+ </table>
851
+
852
+ <table style="margin-left:150px;">
853
+ <tr>
854
+ <td colspan="3">
855
+ <!--ADD_GROUPING_BUTTON-->
856
+ </td>
857
+ </tr>
858
+ </table>
859
+ </td>
860
+ </tr>
861
+
862
+ <!--FOOTER SECTION-->
863
+ <tr class="footer" style="display:none;">
864
+ <td style="width:300px;">
865
+ <h3>Build Customized Footer?:</h3>
866
+ </td>
867
+ <td>
868
+ <input type="checkbox" name="footerOn" onchange="ShowFooterOptions();" id="footerOn" value="1" <!--FOOTER_CHECKED-->/>
869
+ </td>
870
+ <td>
871
+
872
+ </td>
873
+ </tr>
874
+ <tr class="footer footer_dependent" style="display:none;">
875
+ <td colspan="3">
876
+ <h1 style="margin-left:75px;">Footer Buttons:</h1>
877
+ <script type="text/plain" id="default_footer_template">
878
+ <!--FOOTER_BUTTON_TEMPLATE-->
879
+ </script>
880
+ <table style="margin-left:150px;" id="footer_table">
881
+ <!--ALL_FOOTER_BUTTONS-->
882
+ </table>
883
+ <table style="margin-left:150px;">
884
+ <tr>
885
+ <td colspan="3">
886
+ <!--ADD_THE_FOOTER_BUTTON-->
887
+ </td>
888
+ </tr>
889
+ </table>
890
+ </td>
891
+ </tr>
892
+
893
+ <!--MISC & SUBMIT SECTION-->
894
+
895
+ <tr class="misc_submit" style="display:none;">
896
+ <td style="width:300px;">
897
+ <h3>Add Row Checkbox?:</h3>
898
+ </td>
899
+ <td>
900
+ <input type="checkbox" name="checkboxEnabled" onchange="ShowCheckboxOptions();" id="checkboxEnabled" value="1" <!--SHOW_CHECKBOX_CHECKED-->/>
901
+ </td>
902
+ <td>
903
+ &#160;
904
+ </td>
905
+ </tr>
906
+
907
+ <tr class="misc_submit checkbox_dependent" style="display:none;">
908
+ <td colspan="3">
909
+ <table style="margin-left:75px;">
910
+ <tr>
911
+ <td>
912
+ <h3>Checkbox Value:</h3>
913
+ </td>
914
+ <td>
915
+ <select name="checkboxField" id="checkboxField">
916
+ <!--CHECKBOX_SELECTED_FIELDS-->
917
+ </select>
918
+ </td>
919
+ <td>
920
+ <!--CHECK_HELP_BUTTON-->
921
+ </td>
922
+ </tr>
923
+ </table>
924
+ </td>
925
+ </tr>
926
+ <tr class="misc_submit" style="display:none;" >
927
+ <td>
928
+ <h3>Submit:</h3>
929
+ </td>
930
+ <td>
931
+ <!--SUBMIT_WIDGET_LIST-->
932
+ </td>
933
+ <td>
934
+ &#160;
935
+ </td>
936
+ </tr>
937
+
938
+ <tr>
939
+ <td colspan="3">
940
+ <iframe src="" id="preview"></iframe>
941
+ </td>
942
+ </tr>
943
+
944
+ </table>
870
945
  </form>