widget_list 1.3.2 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -164,9 +164,9 @@ widget_list features and configurations primarily work by a single large hash pa
164
164
 
165
165
  `data` - A "sequel" formatted resultset like would be returned from _select() method. Instead of running a SQL query, you can pass an array to populate the list `default={}`
166
166
 
167
- `collClass` - Your custom td class for all td's `default=''`
167
+ `colClass` - Your custom td class for all td's `default=''`
168
168
 
169
- `align` - td align attribute for all td's `default=''`
169
+ `colAlign` - td align attribute for all td's `default=''`
170
170
 
171
171
  `fields` - The visible fields shown in the current list. KEY=column name VALUE= displayed column header `default={}`
172
172
 
@@ -320,6 +320,22 @@ Style a row based on the value of the column.
320
320
 
321
321
  `storeSessionChecks` - See http://stackoverflow.com/questions/1928204/marshal-data-too-short for configuring larger session storage which checkboxes would eat up if you had this set to true `default=false`
322
322
 
323
+ `totalRow` - Add in your numeric or dollar amount fields you want to sum or average for the bottom record list_parms['totalRow']['my_field'] = true `default={}`
324
+
325
+ `totalRowFirstCol` - A string to display what the row is showing `default='<strong>Total:</strong>'`
326
+
327
+ `totalRowMethod` - Allows you to pass 'average' to define which columns should average the sum list_parms['totalRowPrefix']['my_field'] = 'average'. There is only support for average right now `default={}`
328
+
329
+ `totalRowPrefix` - The prefix will be automatically generated based off the value such as $ for a dollar amount would be injected without this configuration. But this allows you to pass whatever you want displayed for the bottom summary row list_parms['totalRowPrefix']['my_field'] = true `default={}`
330
+
331
+ `totalRowSuffix` - The suffix will be automatically generated based off the value at the end of the last row. But this allows you to pass whatever you want displayed for the bottom summary row list_parms['totalRowSuffix']['my_field'] = true `default={}`
332
+
333
+ `totalRowSeparator` - Your decimal for the formatted number (if any is shown) `default='.'`
334
+
335
+ `totalRowDelimiter` - Your "comma" for the formatted number (if any is shown) `default=','`
336
+
337
+ `totalRowDefault` - For any columns such as strings which cannot be summed or added into a summary this value will be the place holder for that TD. `default='N/A'`
338
+
323
339
  `columnHooks` - Todo `default={}`
324
340
 
325
341
  `rowHooks` - Todo `default={}`
@@ -3,7 +3,7 @@
3
3
  <!--TEXT_DESC-->:&#160;<input type="text" class="<!--SUBJECT-->_<!--TEXT_KEY-->" style="width:170px" onblur="jQuery(this).attr('value',jQuery(this).val().trim());<!--ONBLUR1-->" name="<!--SUBJECT-->[<!--TEXT_KEY-->][]" id="<!--SUBJECT-->[<!--TEXT_KEY-->][]" value="<!--BUTTON_TEXT-->"/><%= raw WidgetList::Widgets::widget_button('?', {'onclick' => "alert('<!--TEXT_HELP-->')", 'innerClass' => "default <!--SUBJECT-->_<!--TEXT_KEY-->_button" }, true ) %>
4
4
  </td>
5
5
  <td>
6
- <!--URL_DESC-->:&#160;<input type="text" class="<!--SUBJECT-->_<!--URL_KEY-->" style="width:170px" onblur="jQuery(this).attr('value',jQuery(this).val().trim());<!--ONBLUR2-->" name="<!--SUBJECT-->[<!--URL_KEY-->][]" id="<!--SUBJECT-->[<!--URL_KEY-->][]" value="<!--BUTTON_URL-->"/><%= raw WidgetList::Widgets::widget_button('?', {'onclick' => "alert('<!--URL_HELP->')", 'innerClass' => "default <!--SUBJECT-->_<!--URL_KEY-->_button" }, true ) %>
6
+ <!--URL_DESC-->:&#160;<input type="text" class="<!--SUBJECT-->_<!--URL_KEY-->" style="width:170px" onblur="jQuery(this).attr('value',jQuery(this).val().trim());<!--ONBLUR2-->" name="<!--SUBJECT-->[<!--URL_KEY-->][]" id="<!--SUBJECT-->[<!--URL_KEY-->][]" value="<!--BUTTON_URL-->"/><%= raw WidgetList::Widgets::widget_button('?', {'onclick' => "alert('<!--2_HELP->')", 'innerClass' => "default <!--SUBJECT-->_<!--URL_KEY-->_button" }, true ) %>
7
7
  </td>
8
8
  <td>
9
9
  <!--COLOR_DESC-->:&#160;<input type="text" class="<!--SUBJECT-->_<!--COLOR_KEY-->" style="width:170px" onblur="jQuery(this).attr('value',jQuery(this).val().trim());<!--ONBLUR3-->" name="<!--SUBJECT-->[<!--COLOR_KEY-->][]" id="<!--SUBJECT-->[<!--COLOR_KEY-->][]" value="<!--BUTTON_CLASS-->"/><%= raw WidgetList::Widgets::widget_button('?', {'onclick' => "alert('<!--COLOR_HELP-->')", 'innerClass' => "default <!--SUBJECT-->_<!--COLOR_KEY-->_button" }, true ) %>
@@ -0,0 +1,18 @@
1
+ <tr style="<!--CHECKBOX_STYLE-->">
2
+ <td style="padding-left:100px">
3
+ <!--1_DESC-->:&#160;
4
+ <input type="hidden" name="<!--SUBJECT-->[<!--1_KEY-->][]" id="<!--SUBJECT-->[<!--1_KEY-->][]" value="<!--1_VALUE-->"/>
5
+ <input type="checkbox" class="<!--SUBJECT-->_<!--1_KEY-->" onchange="FakeCheck(this);" name="<!--SUBJECT-->_fake[<!--1_KEY-->][]" id="<!--SUBJECT-->_fake[<!--1_KEY-->][]" <!--1_VALUE-->/>
6
+
7
+ </td>
8
+ <td>
9
+ <!--2_DESC-->:&#160;<input type="hidden" name="<!--SUBJECT-->[<!--2_KEY-->][]" id="<!--SUBJECT-->[<!--2_KEY-->][]" value="<!--2_VALUE-->"/>
10
+ <input type="checkbox" class="<!--SUBJECT-->_<!--2_KEY-->" onchange="FakeCheck(this);" name="<!--SUBJECT-->_fake[<!--2_KEY-->][]" id="<!--SUBJECT-->_fake[<!--2_KEY-->][]" <!--2_VALUE-->/>
11
+ <%= raw WidgetList::Widgets::widget_button('?', {'onclick' => "alert('<!--2_HELP-->')", 'innerClass' => "default" }, true ) %>
12
+ </td>
13
+ <td>
14
+ <!--3_DESC-->:&#160;
15
+ <input type="hidden" name="<!--SUBJECT-->[<!--3_KEY-->][]" id="<!--SUBJECT-->[<!--3_KEY-->][]" value="<!--3_VALUE-->"/>
16
+ <input type="checkbox" class="<!--SUBJECT-->_<!--3_KEY-->" onchange="FakeCheck(this);" name="<!--SUBJECT-->_fake[<!--3_KEY-->][]" id="<!--SUBJECT-->_fake[<!--3_KEY-->][]" <!--3_VALUE-->/>
17
+ </td>
18
+ </tr>
@@ -1,5 +1,5 @@
1
- <tr>
2
- <td>
1
+ <tr style="<!--TR_STYLE-->">
2
+ <td style="<!--TR1_STYLE-->">
3
3
  <!--FIELD-->:&#160;<input type="text" style="width:350px" class="<!--SUBJECT-->_keys" onblur="jQuery(this).attr('value',jQuery(this).val().trim());<!--ONBLUR1-->" name="<!--SUBJECT-->[key][]" id="<!--SUBJECT-->[key][]" value="<!--FIELD_VALUE-->"/>
4
4
  </td>
5
5
  <td>
@@ -8,4 +8,5 @@
8
8
  <td>
9
9
  <!--REMOVE_FIELD_BUTTON-->
10
10
  </td>
11
- </tr>
11
+ </tr>
12
+ <!--EXTRA-->
@@ -1,945 +1,1101 @@
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>
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
+
12
+ select {
13
+ font-size:25px;
14
+ height:50px;
15
+ left:0;
16
+ line-height:33px;
17
+ top:0;
18
+ width:600px;
19
+ }
20
+
21
+ .misc_keys, .misc_descriptions, .misc_links {
22
+ font-size:14px !important;
23
+ height:15px !important;
24
+ left:0 !important;
25
+ line-height:14px !important;
26
+ width:200px !important;
27
+ }
28
+
29
+ .buttons_drill_down_name_button {
30
+ margin-right: 70px;
31
+ }
32
+
33
+ .buttons_data_to_pass_from_view_button {
34
+ margin-right: 120px;
35
+ }
36
+ </style>
37
+
38
+ <script type="text/javascript">
39
+ var all = '.init,.start,.fields,.rows,.search,.footer,.misc_submit';
40
+ var all_btns = '#start,#fields,#rows,#search,#footer,#misc_submit';
41
+ jQuery(document).ready(function () {
42
+ if (jQuery('#view').val() != '') {
43
+ jQuery(all_btns).removeClass('disabled');
44
+ }
45
+ if (jQuery('#preview').attr('src') == '') {
46
+ jQuery('#preview').hide();
47
+ } else {
48
+ jQuery('#preview').show();
49
+ }
50
+
51
+ window.onbeforeunload = function (evt) {
52
+ var message = 'Are you sure you want to abandon this widget_list implementation? Doing so will lose all your work?';
53
+ if (typeof evt == 'undefined') {
54
+ evt = window.event;
55
+ }
56
+
57
+ if (evt) {
58
+ evt.returnValue = message;
59
+ }
60
+ if (!isSubmitting) {
61
+ return message;
62
+ }
63
+ }
64
+
65
+ });
66
+
67
+ function VerifyOK(func_name) {
68
+ var ok = true;
69
+ if (jQuery('#view').val() == '') {
70
+ ok = false;
71
+ alert('Please select a Model to use as your base widget_list');
72
+ }
73
+ 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') {
74
+ ok = false;
75
+ alert('Invalid Row Limit, please see help button.');
76
+ }
77
+ return ok;
78
+ }
79
+
80
+ function ClickTab(which_class,func_name,by_pass) {
81
+ if (typeof by_pass == 'undefined') {
82
+ var by_pass = false;
83
+ }
84
+ if (by_pass || VerifyOK(func_name)) {
85
+ jQuery('.search_dependent').hide(0,function() {
86
+ jQuery(all).hide(0,function() {
87
+ jQuery(which_class).fadeIn(0,function() {
88
+ if (func_name == 'ShowSearch') {
89
+ ShowSearchOptions(function() {
90
+ ShowGroupingOptions();
91
+ ShowExportOptions();
92
+
93
+ });
94
+ }
95
+ if (func_name == 'ShowFields') {
96
+ ShowHiddenOptions();
97
+ ShowFunctionOptions();
98
+ }
99
+ if (func_name == 'ShowSubmit') {
100
+ ShowCheckboxOptions();
101
+ }
102
+ if (func_name == 'ShowRows') {
103
+ ShowButtonOptions();
104
+ ShowDrillDownOptions();
105
+ }
106
+ if (func_name == 'ShowFooter') {
107
+ ShowFooterOptions();
108
+ }
109
+ });
110
+ });
111
+ });
112
+
113
+ if (!by_pass) {
114
+ SaveChanges();
115
+ }
116
+
117
+ }
118
+ }
119
+
120
+ function ShowStart() {
121
+ ClickTab('.start',arguments.callee.name);
122
+ }
123
+
124
+ function ShowFields() {
125
+ ClickTab('.fields',arguments.callee.name);
126
+ }
127
+
128
+ function ShowRows() {
129
+ ClickTab('.rows',arguments.callee.name);
130
+ }
131
+
132
+ function ShowSearch() {
133
+ ClickTab('.search',arguments.callee.name);
134
+ }
135
+
136
+ function ShowFooter() {
137
+ ClickTab('.footer',arguments.callee.name);
138
+ }
139
+
140
+ function ShowSubmit() {
141
+ ClickTab('.misc_submit',arguments.callee.name);
142
+ }
143
+
144
+ function ReplaceColumnsToLinked(obj) {
145
+ found = false;
146
+ var className = obj.className;
147
+ jQuery(obj).css('background-color','white');
148
+ jQuery('.fields_keys, .fields_hidden_keys, .fields_function_keys').each(
149
+ function(key, value) {
150
+ if(jQuery(value).val() == jQuery(obj).val().trim() && jQuery(obj).val().search(/_linked/i) == -1) {
151
+ found = true;
152
+ var id_original = jQuery(obj).val().trim();
153
+ jQuery(value).val(jQuery(obj).val().trim() + '_linked');
154
+ jQuery(obj).val(jQuery(obj).val().trim() + '_linked');
155
+ jQuery(obj).attr('value',jQuery(this).val().trim());
156
+ if (className == 'drill_downs_data_to_pass_from_view') {
157
+ jQuery('.drill_downs_column_to_show[value="col_name"]').each(
158
+ function(key1, value1) {
159
+ jQuery(value1).val(jQuery(obj).val().trim());
160
+ jQuery(value1).attr('value',jQuery(value1).val().trim());
161
+ return false;
162
+ }
163
+ )
164
+ } else {
165
+ jQuery('.drill_downs_data_to_pass_from_view[value="col_name"]').each(
166
+ function(key1, value1) {
167
+ jQuery(value1).val(jQuery(obj).val().trim());
168
+ jQuery(value1).attr('value',jQuery(value1).val().trim());
169
+ return false;
170
+ }
171
+ )
172
+ }
173
+
174
+ jQuery('.drill_downs_drill_down_name[value="filter_col_name"]').each(
175
+ function(key1, value1) {
176
+ jQuery(value1).val('filter_by_' + id_original);
177
+ jQuery(value1).attr('value','filter_by_' + id_original);
178
+ return false;
179
+ }
180
+ )
181
+
182
+
183
+ jQuery('#showHidden').attr('checked',true);
184
+ AddHiddenField();
185
+ jQuery('.fields_hidden_keys[value=""]').each(
186
+ function(key1, value1) {
187
+ jQuery(value1).val(id_original);
188
+ jQuery(value1).attr('value',id_original);
189
+ return false;
190
+ }
191
+ );
192
+ }
193
+ }
194
+ );
195
+
196
+ if (!found && jQuery(obj).val().search(/_linked/i) == -1) {
197
+ alert('Invalid Field Name defined. Please change the value');
198
+ jQuery(obj).css('background-color','red');
199
+ }
200
+ }
201
+
202
+ function InvalidField(obj) {
203
+ found = false;
204
+ jQuery(obj).css('background-color','white');
205
+ jQuery('.fields_keys, .fields_hidden_keys, .fields_function_keys').each(
206
+ function(key, value) {
207
+ if(jQuery(value).val() == jQuery(obj).val().trim()) {
208
+ found = true;
209
+ }
210
+ }
211
+ );
212
+
213
+ if (!found) {
214
+ alert('Invalid Field Name defined. Please change the value');
215
+ jQuery(obj).css('background-color','red');
216
+ }
217
+ }
218
+
219
+ function GoodClass(obj) {
220
+ found = false;
221
+ jQuery(obj).css('background-color','white');
222
+ 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') {
223
+ found = true;
224
+ }
225
+ if (!found) {
226
+ alert('Invalid Class Name. Click Help icon for more information.');
227
+ jQuery(obj).css('background-color','red');
228
+ }
229
+ }
230
+
231
+
232
+ function ShowSearchOptions(callback) {
233
+ if (jQuery('#showSearch').is(':checked')) {
234
+ jQuery('.search_dependent').show();
235
+ } else {
236
+ jQuery('.search_dependent').hide();
237
+ }
238
+ if (typeof(callback) == 'function') {
239
+ (callback)();
240
+ }
241
+ }
242
+
243
+ function ShowGroupingOptions() {
244
+ if (jQuery('#useGrouping').is(':checked') && jQuery('#showSearch').is(':checked')) {
245
+ jQuery('.grouping_dependent').show();
246
+ } else {
247
+ jQuery('.grouping_dependent').hide();
248
+ }
249
+ }
250
+
251
+ function ShowRansackOptions() {
252
+ if (jQuery('#useRansack').is(':checked') && jQuery('#showSearch').is(':checked')) {
253
+ jQuery('.ransack_dependent').show();
254
+ } else {
255
+ jQuery('.ransack_dependent').hide();
256
+ }
257
+ }
258
+
259
+ function ShowFooterOptions() {
260
+ if (jQuery('#footerOn').is(':checked')) {
261
+ jQuery('.footer_dependent').show();
262
+ } else {
263
+ jQuery('.footer_dependent').hide();
264
+ }
265
+ }
266
+
267
+ function ShowExportOptions() {
268
+ if (jQuery('#showExport').is(':checked') && jQuery('#showSearch').is(':checked')) {
269
+ jQuery('.export_dependent').show();
270
+ } else {
271
+ jQuery('.export_dependent').hide();
272
+ }
273
+ }
274
+
275
+ function ShowHiddenOptions() {
276
+ if (jQuery('#showHidden').is(':checked')) {
277
+ if (jQuery('.fields_hidden_keys').length == 0) {
278
+ AddHiddenField();
279
+ }
280
+ jQuery('.hidden_fields_dependent').show();
281
+ } else {
282
+ jQuery('.hidden_fields_dependent').hide();
283
+ }
284
+ }
285
+
286
+ function ShowButtonOptions() {
287
+ if (jQuery('#rowButtonsOn').is(':checked')) {
288
+ jQuery('.button_dependent').show();
289
+ } else {
290
+ jQuery('.button_dependent').hide();
291
+ }
292
+ }
293
+ function ShowDrillDownOptions() {
294
+ if (jQuery('#drillDownsOn').is(':checked')) {
295
+ if (jQuery('.drill_downs_data_to_pass_from_view').length == 0) {
296
+ AddDrillDown();
297
+ }
298
+ jQuery('.drill_down_dependent').show();
299
+ } else {
300
+ jQuery('.drill_down_dependent').hide();
301
+ }
302
+ }
303
+
304
+ function ShowFunctionOptions() {
305
+ if (jQuery('#fieldFunctionOn').is(':checked')) {
306
+ if (jQuery('.fields_function_keys').length == 0) {
307
+ AddFieldFunction();
308
+ }
309
+ jQuery('.function_dependent').show();
310
+ } else {
311
+ jQuery('.function_dependent').hide();
312
+ }
313
+ }
314
+
315
+ function ShowCheckboxOptions() {
316
+ if (jQuery('#checkboxEnabled').is(':checked')) {
317
+ jQuery('.checkbox_dependent').show();
318
+ } else {
319
+ jQuery('.checkbox_dependent').hide();
320
+ }
321
+ }
322
+
323
+ function AddGroupingItem() {
324
+ jQuery('#grouping_items').html(jQuery('#grouping_items').html() + jQuery('#grouping_items_default').html());
325
+ }
326
+
327
+ function AddField() {
328
+ jQuery('#field_table').html(jQuery('#field_table').html() + jQuery('#default_field_template').html());
329
+ }
330
+
331
+ function AddGroupBy() {
332
+ jQuery('#grouping_table').html(jQuery('#grouping_table').html() + jQuery('#default_grouping_template').html());
333
+ }
334
+
335
+ function AddButton() {
336
+ jQuery('#button_table').html(jQuery('#button_table').html() + jQuery('#default_button_template').html());
337
+ jQuery('.buttons_url').last().val('/' + jQuery('#desiredController').val());
338
+ }
339
+
340
+ function AddDrillDown() {
341
+ jQuery('#drill_down_table').html(jQuery('#drill_down_table').html() + jQuery('#default_drill_down_template').html());
342
+ }
343
+
344
+ function AddFooterButton() {
345
+ jQuery('#footer_table').html(jQuery('#footer_table').html() + jQuery('#default_footer_template').html());
346
+ jQuery('.footer_buttons_url').last().val('/' + jQuery('#desiredController').val());
347
+ }
348
+
349
+ function AddHiddenField() {
350
+ jQuery('#hidden_field_table').html(jQuery('#hidden_field_table').html() + jQuery('#default_hidden_field_template').html());
351
+ }
352
+
353
+ function AddFieldFunction() {
354
+ jQuery('#field_function_table').html(jQuery('#field_function_table').html() + jQuery('#default_field_function_template').html());
355
+ }
356
+
357
+ function FakeCheck(obj) {
358
+ jQuery(obj).siblings('input[type="hidden"]').val(jQuery(obj).is(':checked') ? 'checked' : '')
359
+ }
360
+
361
+ function RemoveField(obj) {
362
+ var isHiddenRemoval = false;
363
+ if (jQuery(obj).parent().parent().find('input.fields_hidden_keys').length > 0) {
364
+ isHiddenRemoval = true;
365
+ }
366
+ var isFunctionRemoval = false;
367
+ if (jQuery(obj).parent().parent().find('input.fields_function_keys').length > 0) {
368
+ isFunctionRemoval = true;
369
+ }
370
+
371
+ var tr1 = jQuery(obj).closest('tr');
372
+
373
+
374
+
375
+ var tr2 = tr1.next();
376
+ var tr3 = tr2.next();
377
+
378
+ tr1.remove();
379
+
380
+ if (tr1.find('.fields_keys').length == 1) {
381
+ // Remove options TR's
382
+ tr2.remove();
383
+ tr3.remove();
384
+ }
385
+
386
+ if (isHiddenRemoval && jQuery('.fields_hidden_keys').length == 0) {
387
+ if (jQuery('#showHidden').is(':checked')) {
388
+ jQuery('#showHidden').attr('checked',false);
389
+ }
390
+ jQuery('.hidden_fields_dependent').hide();
391
+ }
392
+ if (isFunctionRemoval && jQuery('.fields_function_keys').length == 0) {
393
+ if (jQuery('#fieldFunctionOn').is(':checked')) {
394
+ jQuery('#fieldFunctionOn').attr('checked',false);
395
+ }
396
+ jQuery('.function_dependent').hide();
397
+ }
398
+ }
399
+
400
+ function MoveField(obj) {
401
+
402
+ var field_name = jQuery(obj).parent().parent().find('input.fields_keys').val();
403
+ RemoveField(obj);
404
+ if (jQuery('#showHidden').not(':checked')) {
405
+ jQuery('#showHidden').attr('checked',true);
406
+ }
407
+ AddHiddenField();
408
+ jQuery('.hidden_fields_dependent').show();
409
+ jQuery('.fields_hidden_keys[value=""]').each(
410
+ function(key1, value1) {
411
+ jQuery(value1).val(field_name);
412
+ jQuery(value1).attr('value',field_name);
413
+ return false;
414
+ }
415
+ );
416
+ }
417
+
418
+ function ShowOptions(obj) {
419
+ var tr = jQuery(obj).closest('tr').next();
420
+ var tr2 = tr.next();
421
+ if (tr2.not(':visible') && tr.is(':visible')) {
422
+ tr2.show();
423
+ tr.show();
424
+ }
425
+ if (tr.not(':visible') && tr2.is(':visible')) {
426
+ tr.show();
427
+ tr2.show();
428
+ }
429
+ if (tr.not(':visible') && tr2.not(':visible')) {
430
+ tr.toggle();
431
+ tr2.toggle();
432
+ }
433
+ }
434
+
435
+ function AddFunction(obj) {
436
+
437
+ var field_name = jQuery(obj).parent().parent().find('input.fields_keys').val();
438
+
439
+ if (jQuery('#fieldFunctionOn').not(':checked')) {
440
+ jQuery('#fieldFunctionOn').attr('checked',true);
441
+ }
442
+ var objExists = '.fields_function_keys[value="' + field_name + '"]';
443
+ if (jQuery(objExists).length > 0) {
444
+ alert('Field Function for ' + field_name + ' already exists, please modify');
445
+ jQuery(objExists).css('background-color','pink');
446
+ } else {
447
+ AddFieldFunction();
448
+ jQuery('.function_dependent').show();
449
+ jQuery('.fields_function_keys[value=""]').each(
450
+ function(key1, value1) {
451
+ jQuery(value1).val(field_name);
452
+ jQuery(value1).attr('value',field_name);
453
+ return false;
454
+ }
455
+ );
456
+ jQuery('.fields_function_descriptions[value=""]').each(
457
+ function(key1, value1) {
458
+ var out = 'DB_FUNC(' + field_name + ')';
459
+ jQuery(value1).val(out);
460
+ jQuery(value1).attr('value',out);
461
+ return false;
462
+ }
463
+ );
464
+ }
465
+ }
466
+
467
+ function ShowField(obj) {
468
+
469
+ var field_name = jQuery(obj).parent().parent().find('input.fields_hidden_keys').val();
470
+ RemoveField(obj);
471
+ AddField();
472
+ jQuery('.fields_keys[value=""]').each(
473
+ function(key1, value1) {
474
+ jQuery(value1).val(field_name);
475
+ jQuery(value1).attr('value',field_name);
476
+ return false;
477
+ }
478
+ );
479
+ jQuery('.fields_descriptions[value=""]').each(
480
+ function(key1, value1) {
481
+ jQuery(value1).val(field_name);
482
+ jQuery(value1).attr('value',field_name);
483
+ return false;
484
+ }
485
+ );
486
+
487
+
488
+ if (jQuery('#showHidden').is(':checked') && jQuery('.fields_hidden_keys').length == 0) {
489
+ jQuery('#showHidden').attr('checked',false);
490
+ }
491
+ if (jQuery('.fields_hidden_keys').length == 0) {
492
+ jQuery('.hidden_fields_dependent').hide();
493
+ }
494
+ }
495
+
496
+ function ChangeViewModel(obj) {
497
+ jQuery(all_btns).addClass('disabled');
498
+ if(jQuery(obj).val() != '') {
499
+ jQuery.post(jQuery('#widget_list_administration').attr('action'), 'ajax=1&model=' + jQuery(obj).val(), function(response)
500
+ {
501
+ jQuery('#name').val(jQuery(obj).val().toLowerCase() + '_listing');
502
+ jQuery('#field_table').html(response['fields']);
503
+ jQuery('#hidden_field_table').html(response['fields_hidden']);
504
+ jQuery('#checkboxField').html(response['checked_fields']);
505
+ jQuery('#footer_table').html(response['footer_buttons']);
506
+ jQuery('#grouping_table').html(response['group_by']);
507
+ SaveChanges();
508
+ if (jQuery(obj).val() != '') {
509
+ jQuery(all_btns).removeClass('disabled');
510
+ }
511
+
512
+
513
+ jQuery(all_btns).removeClass('disabled');
514
+ jQuery('#title').val(jQuery(obj).val() + 's');
515
+ jQuery('#listDescription').val('Showing All ' + jQuery(obj).val() + 's');
516
+
517
+ if (jQuery(obj).val() != '') {
518
+ jQuery('#noDataMessage').val('No ' + jQuery(obj).val() + 's Found Within Your Criteria');
519
+ }
520
+
521
+ if (jQuery(obj).val() != '' && jQuery('#showExport').is(':checked')) {
522
+ jQuery('#exportButtonTitle').val('Export All ' + jQuery(obj).val() + 's');
523
+ }
524
+ }, "json").error(function(response) {
525
+ alert('An error occurred instantiating this model. Check the response for errors.');
526
+ });
527
+ }
528
+ }
529
+
530
+ function SaveChanges() {
531
+ jQuery(all_btns).addClass('disabled');
532
+ jQuery.post(jQuery('#widget_list_administration').attr('action'), 'ajax=1&save=1&' + jQuery('#widget_list_administration').serialize(), function(response)
533
+ {
534
+ jQuery(all_btns).removeClass('disabled');
535
+ jQuery('#preview').show();
536
+ jQuery('#preview').attr('src',jQuery('#widget_list_administration').attr('action') + '?iframe=1&desiredController=' + jQuery('#desiredController').val() + '&desiredAction=' + jQuery('#desiredAction').val() );
537
+ jQuery('#preview').css('width','100%');
538
+ jQuery('#preview').css('height','500px');
539
+ }, "json");
540
+ }
541
+
542
+ var isSubmitting = false;
543
+ function Submit() {
544
+ if (VerifyOK('')) {
545
+ isSubmitting = true;
546
+ jQuery('#widget_list_administration').submit();
547
+ }
548
+ }
549
+
550
+ function ChangeController(obj) {
551
+ jQuery('.footer_buttons_url').each(function (key,value) {
552
+ if (jQuery(value).val() == '/' + jQuery('#desiredControllerOriginal').val() + '/add/') {
553
+ jQuery(value).val('/' + jQuery(obj).val() + '/add/');
554
+ jQuery(value).attr('value','/' + jQuery(obj).val() + '/add/');
555
+ }
556
+ });
557
+ jQuery('.buttons_url').each(function (key,value) {
558
+ if (jQuery(value).val() == '/' + jQuery('#desiredControllerOriginal').val() + '/edit/id/') {
559
+ jQuery(value).val('/' + jQuery(obj).val() + '/edit/id/');
560
+ jQuery(value).attr('value','/' + jQuery(obj).val() + '/edit/id/');
561
+ }
562
+ if (jQuery(value).val() == '/' + jQuery('#desiredControllerOriginal').val() + '/delete/id/') {
563
+ jQuery(value).val('/' + jQuery(obj).val() + '/delete/id/');
564
+ jQuery(value).attr('value','/' + jQuery(obj).val() + '/delete/id/');
565
+ }
566
+ });
567
+ }
568
+
569
+ </script>
570
+ <form action="<!--POST_URL-->" method="post" id="widget_list_administration">
571
+ <h1 style="font-size:24;"><!--TITLE--></h1><div class="horizontal_rule"></div>
572
+ <h3>Get started quickly by selecting the features you need for this list</h3>
573
+ <table>
574
+ <!--BUTTON SECTION-->
575
+ <tr id="sections" <!--BUTTON_CSS-->>
576
+ <td colspan="3">
577
+ <h3><!--BUTTONS--></h3>
578
+ </td>
579
+ </tr>
580
+
581
+ <!--START SECTION-->
582
+
583
+ <!--EDIT_OR_ADD_NEW-->
584
+
585
+ <tr class="start" <!--START_CSS-->>
586
+ <td>
587
+ <h3>Primary Connection?:</h3>
588
+ </td>
589
+ <td>
590
+ <input type="checkbox" name="primaryDatabase" id="primaryDatabase" value="1" <!--PRIMARY_CHECKED-->/>
591
+ </td>
592
+ <td>
593
+ &#160;
594
+ </td>
595
+ </tr>
596
+
597
+ <tr class="start" <!--START_CSS-->>
598
+ <td>
599
+ <h3>Desired Controller Location:</h3>
600
+ </td>
601
+ <td>
602
+ <input type="text" onblur="ChangeController(this);" name="desiredController" id="desiredController" value="<!--CONTROLLER_VALUE-->"/>
603
+ <input type="hidden" name="desiredControllerOriginal" id="desiredControllerOriginal" value="<!--CONTROLLER_VALUE-->"/>
604
+ </td>
605
+ <td>
606
+ <!--CONTROLLER_HELP_BUTTON-->
607
+ </td>
608
+ </tr>
609
+
610
+ <tr class="start" <!--START_CSS-->>
611
+ <td>
612
+ <h3>Desired Action:</h3>
613
+ </td>
614
+ <td>
615
+ <input type="text" name="desiredAction" id="desiredAction" value="<!--ACTION_VALUE-->"/>
616
+ </td>
617
+ <td>
618
+ <!--ACTION_HELP_BUTTON-->
619
+ </td>
620
+ </tr>
621
+
622
+ <tr class="start" <!--START_CSS-->>
623
+ <td>
624
+ <h3>Internal Name:</h3>
625
+ </td>
626
+ <td>
627
+ <input type="text" name="name" id="name" value="<!--NAME_VALUE-->"/>
628
+ </td>
629
+ <td>
630
+ <!--NAME_HELP_BUTTON-->
631
+ </td>
632
+ </tr>
633
+
634
+ <tr class="start" <!--START_CSS-->>
635
+ <td>
636
+ <h3>Model:</h3>
637
+ </td>
638
+ <td>
639
+ <select name="view" id="view" onchange="ChangeViewModel(this)">
640
+ <!--VIEW_OPTIONS-->
641
+ </select>
642
+ </td>
643
+ <td>
644
+ &#160;
645
+ </td>
646
+ </tr>
647
+ <tr class="start" <!--START_CSS-->>
648
+ <td>
649
+ <h3>Title:</h3>
650
+ </td>
651
+ <td>
652
+ <input type="text" name="title" id="title" value="<!--TITLE_VALUE-->"/>
653
+ </td>
654
+ <td>
655
+ <!--TITLE_HELP_BUTTON-->
656
+ </td>
657
+ </tr>
658
+
659
+ <tr class="start" <!--START_CSS-->>
660
+ <td>
661
+ <h3>Initial Description:</h3>
662
+ </td>
663
+ <td>
664
+ <input type="text" name="listDescription" id="listDescription" value="<!--DESC_VALUE-->"/>
665
+ </td>
666
+ <td>
667
+ <!--DESC_HELP_BUTTON-->
668
+ </td>
669
+ </tr>
670
+
671
+ <!--FIELDS SECTION-->
672
+ <tr class="fields" style="display:none;">
673
+ <td>
674
+ <h3>Allow Sorting?:</h3>
675
+ </td>
676
+ <td>
677
+ <input type="checkbox" name="useSort" id="useSort" value="1" <!--SORTING_CHECKED-->/>
678
+ </td>
679
+ <td>
680
+ &#160;
681
+ </td>
682
+ </tr>
683
+
684
+ <tr class="fields" style="display:none;">
685
+ <td>
686
+ <h3>No Data Message:</h3>
687
+ </td>
688
+ <td>
689
+ <input type="text" name="noDataMessage" id="noDataMessage" value="<!--NO_DATA_VALUE-->"/>
690
+ </td>
691
+ <td>
692
+ &#160;
693
+ </td>
694
+ </tr>
695
+
696
+ <tr class="fields" style="display:none;">
697
+ <td colspan="3">
698
+ <h1>Field Selection:</h1>
699
+ <script type="text/plain" id="default_field_template">
700
+ <!--FIELD_TEMPLATE-->
701
+ </script>
702
+ <table style="margin-left:75px;" id="field_table">
703
+ <!--ALL_FIELDS-->
704
+ </table>
705
+ <table style="margin-left:75px;">
706
+ <tr>
707
+ <td colspan="3">
708
+ <!--ADD_FIELD_BUTTON-->
709
+ </td>
710
+ </tr>
711
+ </table>
712
+ </td>
713
+ </tr>
714
+
715
+ <tr class="fields" style="display:none;">
716
+ <td style="width:300px;">
717
+ <h3>Hidden Fields?:</h3>
718
+ </td>
719
+ <td>
720
+ <input type="checkbox" name="showHidden" onchange="ShowHiddenOptions();" id="showHidden" value="1" <!--SHOW_HIDDEN_CHECKED-->/>
721
+ </td>
722
+ <td>
723
+ <!--HIDDEN_HELP_BUTTON-->
724
+ </td>
725
+ </tr>
726
+
727
+ <tr class="fields hidden_fields_dependent" style="display:none;">
728
+
729
+ <td colspan="3">
730
+ <h1 style="margin-left: 75px;">Hidden Field Selection:</h1>
731
+ <script type="text/plain" id="default_hidden_field_template">
732
+ <!--HIDDEN_FIELD_TEMPLATE-->
733
+ </script>
734
+ <table style="margin-left:150px;" id="hidden_field_table">
735
+ <!--ALL_HIDDEN_FIELDS-->
736
+ </table>
737
+ <table style="margin-left:150px;">
738
+ <tr>
739
+ <td colspan="3">
740
+ <!--ADD_HIDDEN_FIELD_BUTTON-->
741
+ </td>
742
+ </tr>
743
+ </table>
744
+ </td>
745
+ </tr>
746
+
747
+ <tr class="fields" style="display:none;">
748
+ <td style="width:300px;">
749
+ <h3>Field Function?:</h3>
750
+ </td>
751
+ <td>
752
+ <input type="checkbox" name="fieldFunctionOn" onchange="ShowFunctionOptions();" id="fieldFunctionOn" value="1" <!--SHOW_FUNCTION_CHECKED-->/>
753
+ </td>
754
+ <td>
755
+ <!--FUNC_HELP_BUTTON-->
756
+ </td>
757
+ </tr>
758
+
759
+ <tr class="fields function_dependent" style="display:none;">
760
+ <td colspan="3">
761
+ <h1 style="margin-left: 75px;">Field Functions To Wrap Around Fields:</h1>
762
+ <script type="text/plain" id="default_field_function_template">
763
+ <!--FIELD_FUNCTION_TEMPLATE-->
764
+ </script>
765
+ <table style="margin-left:150px;" id="field_function_table">
766
+ <!--ALL_FIELD_FUNCTIONS-->
767
+ </table>
768
+ <table style="margin-left:150px;">
769
+ <tr>
770
+ <td colspan="3">
771
+ <!--ADD_FIELD_FUNCTION_BUTTON-->
772
+ </td>
773
+ </tr>
774
+ </table>
775
+ </td>
776
+ </tr>
777
+
778
+ <!--ROWS SECTION-->
779
+ <tr class="rows" style="display:none;">
780
+ <td>
781
+ <h3>Row Limit</h3>
782
+ </td>
783
+ <td>
784
+ <input type="text" name="rowLimit" id="rowLimit" value="<!--ROW_LIMIT_VALUE-->"/>
785
+ </td>
786
+ <td>
787
+ <!--ROW_HELP_BUTTON-->
788
+ </td>
789
+ </tr>
790
+
791
+
792
+
793
+ <tr class="rows" style="display:none;">
794
+ <td style="width:300px;">
795
+ <h3>Row Buttons?:</h3>
796
+ </td>
797
+ <td>
798
+ <input type="checkbox" name="rowButtonsOn" onchange="ShowButtonOptions();" id="rowButtonsOn" value="1" <!--BUTTONS_ON_CHECKED-->/>
799
+ </td>
800
+ <td>
801
+ <!--BUTTON_HELP_BUTTON-->
802
+ </td>
803
+ </tr>
804
+
805
+ <tr class="rows button_dependent" style="display:none;">
806
+ <td colspan="3">
807
+ <table style="margin-left:75px;">
808
+ <tr>
809
+ <td>
810
+ <h3>Row Button Column Name</h3>
811
+ </td>
812
+ <td>
813
+ <input type="text" name="rowButtonsName" id="rowButtonsName" value="<!--BUTTON_NAME_VALUE-->"/>
814
+ </td>
815
+ <td>
816
+ &#160;
817
+ </td>
818
+ </tr>
819
+ </table>
820
+ </td>
821
+ </tr>
822
+
823
+ <tr class="rows button_dependent" style="display:none;">
824
+ <td colspan="3">
825
+ <h1 style="margin-left:75px;">Buttons:</h1>
826
+ <script type="text/plain" id="default_button_template">
827
+ <!--THE_BUTTON_TEMPLATE-->
828
+ </script>
829
+ <table style="margin-left:150px;" id="button_table">
830
+ <!--ALL_BUTTONS-->
831
+ </table>
832
+ <table style="margin-left:150px;">
833
+ <tr>
834
+ <td colspan="3">
835
+ <!--ADD_THE_BUTTON_BUTTON-->
836
+ </td>
837
+ </tr>
838
+ </table>
839
+ </td>
840
+ </tr>
841
+
842
+
843
+
844
+
845
+ <tr class="rows" style="display:none;">
846
+ <td style="width:300px;">
847
+ <h3>Drill Down Columns?:</h3>
848
+ </td>
849
+ <td>
850
+ <input type="checkbox" name="drillDownsOn" onchange="ShowDrillDownOptions();" id="drillDownsOn" value="1" <!--DRILL_DOWN_CHECKED-->/>
851
+ </td>
852
+ <td>
853
+ <!--DRILL_DOWN_HELP_BUTTON-->
854
+ </td>
855
+ </tr>
856
+
857
+ <tr class="rows drill_down_dependent" style="display:none;">
858
+ <td colspan="3">
859
+ <script type="text/plain" id="default_drill_down_template">
860
+ <!--THE_DRILL_DOWN_TEMPLATE-->
861
+ </script>
862
+ <table style="margin-left:150px;" id="drill_down_table">
863
+ <!--ALL_DRILL_DOWNS-->
864
+ </table>
865
+ <table style="margin-left:150px;">
866
+ <tr>
867
+ <td colspan="3">
868
+ <!--ADD_DRILL_DOWN_BUTTON-->
869
+ </td>
870
+ </tr>
871
+ </table>
872
+ </td>
873
+ </tr>
874
+
875
+
876
+ <!--SEARCH SECTION-->
877
+ <tr class="search" style="display:none;">
878
+ <td style="width:300px;">
879
+ <h3>Show Search?:</h3>
880
+ </td>
881
+ <td>
882
+ <input type="checkbox" name="showSearch" onchange="ShowSearchOptions(function() {ShowGroupingOptions();})" id="showSearch" value="1" <!--SHOW_SEARCH_CHECKED-->/>
883
+ </td>
884
+ <td>
885
+ &#160;
886
+ </td>
887
+ </tr>
888
+
889
+ <tr class="search search_dependent" style="display:none;">
890
+ <td style="width:300px;">
891
+ <h3>Show Export Button?:</h3>
892
+ </td>
893
+ <td>
894
+ <input type="checkbox" name="showExport" onchange="ShowExportOptions();" id="showExport" value="1" <!--SHOW_EXPORT_CHECKED-->/>
895
+ </td>
896
+ <td>
897
+ &#160;
898
+ </td>
899
+ </tr>
900
+
901
+ <tr class="search search_dependent export_dependent" style="display:none;">
902
+ <td colspan="3">
903
+ <table style="margin-left:75px;">
904
+ <tr>
905
+ <td>
906
+ <h3>Export Button Title:</h3>
907
+ </td>
908
+ <td>
909
+ <input type="text" name="exportButtonTitle" id="exportButtonTitle" value="<!--EXPORT_VALUE-->"/>
910
+ </td>
911
+ <td>
912
+ &#160;
913
+ </td>
914
+ </tr>
915
+ </table>
916
+ </td>
917
+ </tr>
918
+
919
+ <tr class="search search_dependent" style="display:none;">
920
+ <td>
921
+ <h3>Search Description/Title:</h3>
922
+ </td>
923
+ <td>
924
+ <input type="text" name="searchTitle" id="searchTitle" value="<!--SEARCH_TITLE-->"/>
925
+ </td>
926
+ <td>
927
+ <!--SEARCH_TITLE_BUTTON-->
928
+ </td>
929
+ </tr>
930
+
931
+ <tr class="search search_dependent" style="display:none;">
932
+ <td>
933
+ <h3>Use Ransack Advanced Search?:</h3>
934
+ </td>
935
+ <td>
936
+ <input type="checkbox" name="useRansack" onchange="ShowRansackOptions()" id="useRansack" value="1" <!--USE_RANSACK-->/>
937
+ </td>
938
+ <td>
939
+ <!--RANSACK_HELP_BUTTON-->
940
+ </td>
941
+ </tr>
942
+
943
+ <tr class="search search_dependent ransack_dependent" style="display:none;">
944
+ <td colspan="3">
945
+ <table style="margin-left:75px;">
946
+ <tr>
947
+ <td>
948
+ <h3>Customized Ransack Form?:</h3>
949
+ </td>
950
+ <td>
951
+ <input type="checkbox" name="ransackAdvancedForm" id="ransackAdvancedForm" value="1" <!--USE_RANSACK_ADV-->/>
952
+ </td>
953
+ <td>
954
+ <!--ADV_RANSACK_HELP_BUTTON-->
955
+ </td>
956
+ </tr>
957
+ </table>
958
+ </td>
959
+ </tr>
960
+
961
+ <tr class="search search_dependent" style="display:none;">
962
+ <td>
963
+ <h3>Use Grouping?:</h3>
964
+ </td>
965
+ <td>
966
+ <input type="checkbox" name="useGrouping" onchange="ShowGroupingOptions()" id="useGrouping" value="1" <!--USE_GROUPING-->/>
967
+ </td>
968
+ <td>
969
+ <!--GROUP_BY_HELP_BUTTON-->
970
+ </td>
971
+ </tr>
972
+
973
+ <tr class="search search_dependent grouping_dependent" style="display:none;">
974
+ <td colspan="3">
975
+ <h1 style="margin-left: 75px;">Custom Items To Group By:</h1>
976
+ <table>
977
+ <tr>
978
+ <td>
979
+ <script type="text/plain" id="default_grouping_template">
980
+ <!--DEFAULT_GROUPING-->
981
+ </script>
982
+ <table style="margin-left:150px;" id="grouping_table">
983
+ <!--GROUPING_ITEMS-->
984
+ </table>
985
+ <table style="margin-left:150px;">
986
+ <tr>
987
+ <td colspan="3">
988
+ <!--ADD_GROUP_BY_BUTTON-->
989
+ </td>
990
+ </tr>
991
+ </table>
992
+ </td>
993
+ </tr>
994
+ </table>
995
+
996
+ <table style="margin-left:150px;">
997
+ <tr>
998
+ <td colspan="3">
999
+ <!--ADD_GROUPING_BUTTON-->
1000
+ </td>
1001
+ </tr>
1002
+ </table>
1003
+ </td>
1004
+ </tr>
1005
+
1006
+ <!--FOOTER SECTION-->
1007
+ <tr class="footer" style="display:none;">
1008
+ <td style="width:300px;">
1009
+ <h3>Build Customized Footer?:</h3>
1010
+ </td>
1011
+ <td>
1012
+ <input type="checkbox" name="footerOn" onchange="ShowFooterOptions();" id="footerOn" value="1" <!--FOOTER_CHECKED-->/>
1013
+ </td>
1014
+ <td>
1015
+
1016
+ </td>
1017
+ </tr>
1018
+ <tr class="footer footer_dependent" style="display:none;">
1019
+ <td colspan="3">
1020
+ <h1 style="margin-left:75px;">Footer Buttons:</h1>
1021
+ <script type="text/plain" id="default_footer_template">
1022
+ <!--FOOTER_BUTTON_TEMPLATE-->
1023
+ </script>
1024
+ <table style="margin-left:150px;" id="footer_table">
1025
+ <!--ALL_FOOTER_BUTTONS-->
1026
+ </table>
1027
+ <table style="margin-left:150px;">
1028
+ <tr>
1029
+ <td colspan="3">
1030
+ <!--ADD_THE_FOOTER_BUTTON-->
1031
+ </td>
1032
+ </tr>
1033
+ </table>
1034
+ </td>
1035
+ </tr>
1036
+
1037
+ <tr class="footer" style="display:none;">
1038
+ <td style="width:300px;">
1039
+ <h3>Show Pagination?:</h3>
1040
+ </td>
1041
+ <td>
1042
+ <input type="checkbox" name="showPagination" id="showPagination" value="1" <!--PAGINATION_CHECKED-->/>
1043
+ </td>
1044
+ <td>
1045
+
1046
+ </td>
1047
+ </tr>
1048
+
1049
+ <!--MISC & SUBMIT SECTION-->
1050
+
1051
+ <tr class="misc_submit" style="display:none;">
1052
+ <td style="width:300px;">
1053
+ <h3>Add Row Checkbox?:</h3>
1054
+ </td>
1055
+ <td>
1056
+ <input type="checkbox" name="checkboxEnabled" onchange="ShowCheckboxOptions();" id="checkboxEnabled" value="1" <!--SHOW_CHECKBOX_CHECKED-->/>
1057
+ </td>
1058
+ <td>
1059
+ &#160;
1060
+ </td>
1061
+ </tr>
1062
+
1063
+ <tr class="misc_submit checkbox_dependent" style="display:none;">
1064
+ <td colspan="3">
1065
+ <table style="margin-left:75px;">
1066
+ <tr>
1067
+ <td>
1068
+ <h3>Checkbox Value:</h3>
1069
+ </td>
1070
+ <td>
1071
+ <select name="checkboxField" id="checkboxField">
1072
+ <!--CHECKBOX_SELECTED_FIELDS-->
1073
+ </select>
1074
+ </td>
1075
+ <td>
1076
+ <!--CHECK_HELP_BUTTON-->
1077
+ </td>
1078
+ </tr>
1079
+ </table>
1080
+ </td>
1081
+ </tr>
1082
+ <tr class="misc_submit" style="display:none;" >
1083
+ <td>
1084
+ <h3>Submit:</h3>
1085
+ </td>
1086
+ <td>
1087
+ <!--SUBMIT_WIDGET_LIST-->
1088
+ </td>
1089
+ <td>
1090
+ &#160;
1091
+ </td>
1092
+ </tr>
1093
+
1094
+ <tr>
1095
+ <td colspan="3">
1096
+ <iframe src="" id="preview"></iframe>
1097
+ </td>
1098
+ </tr>
1099
+
1100
+ </table>
945
1101
  </form>