drg_cms 0.5.52.16 → 0.6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/drg_cms/drg_cms.js +446 -144
- data/app/assets/javascripts/drg_cms/jstree.min.js +6 -6
- data/app/assets/javascripts/drg_cms_application.js +1 -1
- data/app/assets/stylesheets/drg_cms/drg_cms.css +625 -243
- data/app/assets/stylesheets/drg_cms/jstree.css +6 -12
- data/app/assets/stylesheets/drg_cms/select-multiple.css +18 -12
- data/app/assets/stylesheets/drg_cms_cms.css +1 -1
- data/app/controllers/cmsedit_controller.rb +536 -331
- data/app/controllers/dc_application_controller.rb +380 -117
- data/app/controllers/dc_common_controller.rb +105 -14
- data/app/{controllers → controls}/browse_models_control.rb +0 -0
- data/app/controls/dc_help_control.rb +126 -0
- data/app/{controllers → controls}/dc_page_control.rb +24 -8
- data/app/controls/dc_poll_result_control.rb +88 -0
- data/app/controls/dc_report.rb +225 -0
- data/app/{controllers → controls}/design_element_settings_control.rb +0 -0
- data/app/forms/all_options.yml +50 -9
- data/app/forms/cms_menu.yml +28 -18
- data/app/forms/dc_ad.yml +11 -22
- data/app/forms/dc_big_table.yml +1 -0
- data/app/forms/dc_big_table_value.yml +1 -0
- data/app/forms/dc_category.yml +2 -1
- data/app/forms/dc_design.yml +20 -16
- data/app/forms/dc_filter.yml +3 -6
- data/app/forms/dc_help_1.yml +109 -0
- data/app/forms/dc_journal.yml +3 -1
- data/app/forms/dc_json_ld.yml +59 -0
- data/app/forms/dc_key_value.yml +32 -0
- data/app/forms/dc_link.yml +1 -1
- data/app/forms/dc_menu.yml +2 -0
- data/app/forms/dc_menu_item.yml +2 -0
- data/app/forms/dc_page.yml +3 -5
- data/app/forms/dc_part.yml +1 -0
- data/app/forms/dc_piece.yml +1 -0
- data/app/forms/dc_poll.yml +19 -9
- data/app/forms/dc_poll_item.yml +2 -1
- data/app/forms/dc_poll_result.yml +83 -0
- data/app/forms/dc_poll_result_export.yml +35 -0
- data/app/forms/dc_seo.yml +33 -0
- data/app/forms/dc_simple_menu.yml +2 -0
- data/app/forms/dc_site.yml +4 -12
- data/app/forms/dc_user.yml +27 -11
- data/app/forms/dc_user_role.yml +3 -0
- data/app/forms/json_ld_schema.yml +168 -0
- data/app/helpers/cms_common_helper.rb +376 -0
- data/app/helpers/cms_edit_helper.rb +506 -0
- data/app/helpers/cms_helper.rb +268 -0
- data/app/helpers/cms_index_helper.rb +576 -0
- data/app/helpers/dc_application_helper.rb +183 -271
- data/app/models/concerns/dc_page_concern.rb +40 -6
- data/app/models/concerns/dc_policy_rule_concern.rb +20 -8
- data/app/models/concerns/dc_seo_concern.rb +66 -0
- data/app/models/concerns/dc_site_concern.rb +67 -44
- data/app/models/concerns/dc_user_concern.rb +62 -21
- data/app/models/dc_design.rb +30 -18
- data/app/models/dc_filter.rb +22 -13
- data/app/models/dc_json_ld.rb +152 -0
- data/app/models/dc_key_value.rb +48 -0
- data/app/models/dc_key_value_store.rb +1 -0
- data/app/models/dc_memory.rb +8 -1
- data/app/models/dc_page.rb +0 -1
- data/app/models/dc_permission.rb +49 -9
- data/app/models/dc_policy.rb +25 -14
- data/app/models/dc_policy_role.rb +22 -11
- data/app/models/dc_poll.rb +39 -19
- data/app/models/{drgcms_form_fields/drgcms_form_fields.rb → dc_poll_result.rb} +23 -2
- data/app/models/dc_temp.rb +140 -0
- data/app/models/dc_user_role.rb +2 -2
- data/app/models/drgcms_form_fields.rb +14 -6
- data/app/models/drgcms_form_fields/action.rb +61 -0
- data/app/models/drgcms_form_fields/check_box.rb +3 -0
- data/app/models/drgcms_form_fields/comment.rb +8 -4
- data/app/models/drgcms_form_fields/date_picker.rb +11 -9
- data/app/models/drgcms_form_fields/date_select.rb +1 -1
- data/app/models/drgcms_form_fields/{date_time_picker.rb → datetime_picker.rb} +12 -10
- data/app/models/drgcms_form_fields/datetime_select.rb +1 -1
- data/app/models/drgcms_form_fields/drgcms_field.rb +55 -9
- data/app/models/drgcms_form_fields/embedded.rb +26 -16
- data/app/models/drgcms_form_fields/file_field.rb +52 -0
- data/app/models/drgcms_form_fields/file_select.rb +2 -2
- data/app/models/drgcms_form_fields/hash_field.rb +90 -0
- data/app/models/drgcms_form_fields/hidden_field.rb +1 -1
- data/app/models/drgcms_form_fields/html_field.rb +1 -1
- data/app/models/drgcms_form_fields/link_to.rb +2 -2
- data/app/models/drgcms_form_fields/method.rb +66 -0
- data/app/models/drgcms_form_fields/multitext_autocomplete.rb +23 -14
- data/app/models/drgcms_form_fields/number_field.rb +15 -6
- data/app/models/drgcms_form_fields/radio.rb +96 -0
- data/app/models/drgcms_form_fields/readonly.rb +2 -2
- data/app/models/drgcms_form_fields/select.rb +92 -29
- data/app/models/drgcms_form_fields/text_area.rb +1 -1
- data/app/models/drgcms_form_fields/text_autocomplete.rb +29 -17
- data/app/models/drgcms_form_fields/text_field.rb +1 -1
- data/app/models/drgcms_form_fields/text_with_select.rb +6 -3
- data/app/models/drgcms_form_fields/tree_select.rb +29 -10
- data/app/{helpers → renderers}/dc_ad_renderer.rb +0 -0
- data/app/{helpers → renderers}/dc_big_menu_renderer.rb +1 -0
- data/app/{helpers → renderers}/dc_captcha_renderer.rb +0 -0
- data/app/{helpers → renderers}/dc_common_renderer.rb +0 -0
- data/app/{helpers → renderers}/dc_gallery_renderer.rb +1 -0
- data/app/{helpers → renderers}/dc_menu_renderer.rb +11 -4
- data/app/{helpers → renderers}/dc_page_renderer.rb +1 -0
- data/app/{helpers → renderers}/dc_part_renderer.rb +5 -4
- data/app/{helpers → renderers}/dc_piece_renderer.rb +1 -1
- data/app/{helpers → renderers}/dc_poll_renderer.rb +84 -48
- data/app/{helpers → renderers}/dc_renderer.rb +1 -0
- data/app/{helpers → renderers}/dc_simple_menu_renderer.rb +1 -0
- data/app/views/cmsedit/{remove_edit_stuff.js.erb → __remove_edit_stuff.js.erb} +0 -0
- data/app/views/cmsedit/{show.html.erb → __show.html.erb} +0 -0
- data/app/views/cmsedit/_edit_stuff.html.erb +4 -25
- data/app/views/cmsedit/_form.html.erb +4 -3
- data/app/views/cmsedit/_result.html.erb +2 -3
- data/app/views/cmsedit/edit.html.erb +4 -1
- data/app/views/cmsedit/index.html.erb +7 -1
- data/app/views/cmsedit/new.html.erb +3 -1
- data/app/views/dc_common/_help.html.erb +8 -0
- data/app/views/layouts/models.html.erb +2 -1
- data/config/locales/drgcms_en.yml +26 -3
- data/config/locales/drgcms_sl.yml +31 -5
- data/config/locales/models_en.yml +66 -18
- data/config/locales/models_sl.yml +71 -20
- data/drg_cms.gemspec +3 -3
- data/lib/drg_cms.rb +63 -1
- data/lib/drg_cms/version.rb +2 -2
- data/lib/generators/new_drg_form/new_drg_form_generator.rb +9 -2
- data/lib/tasks/database.rake +6 -56
- metadata +81 -63
- data/app/assets/stylesheets/drg_cms/__jquery-ui.css +0 -339
- data/app/helpers/application_helper.rb +0 -2
- data/app/helpers/cmsedit_helper.rb +0 -885
- data/app/models/dc_dummy.rb +0 -102
- data/test/fixtures/drg_cms_test_data.rb +0 -87
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdd59e26395442cc8bec436e5a05940e762f373bfd30a83d5ddca87b443627a4
|
4
|
+
data.tar.gz: be25c10a78a2fc6ed37f5e02484cfbff1d28b8cadb8546432f5b67665578006f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 838507481e4d09277049b1468ddbc18b2e40cc32b5fdcac38224169ab1b761aee445ebd93c0747c409db4f87298e986c9472552bc60d69f7d73031bea58a9c31
|
7
|
+
data.tar.gz: 41965e0a604a632d975d3081d85d4e1d775ccb01a7e6dbbfad49be732e89f1223b20376024897b13df742bd6b38eab8c4a8f541d5270f127660dfd23e5edd27e
|
@@ -28,6 +28,7 @@
|
|
28
28
|
*******************************************************************/
|
29
29
|
$.getUrlParam = function(name) {
|
30
30
|
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
|
31
|
+
if (results == null) return null;
|
31
32
|
return results[1] || 0;
|
32
33
|
};
|
33
34
|
|
@@ -42,16 +43,65 @@ dumpAttributes = function(obj) {
|
|
42
43
|
};
|
43
44
|
|
44
45
|
/*******************************************************************
|
45
|
-
*
|
46
|
+
* Function checks if there are delay loaded embedded elements on
|
47
|
+
* selected tab and triggers iframe reload.
|
46
48
|
*******************************************************************/
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
update_embedded_on_tab_select = function(div_name) {
|
50
|
+
let iframes = $(div_name).find("iframe");
|
51
|
+
$.each(iframes, function(index, iframe) {
|
52
|
+
// delayed load
|
53
|
+
let src_delay = iframe.getAttribute('data-src-delay');
|
54
|
+
if (src_delay != null && src_delay != '') {
|
55
|
+
iframe.setAttribute('data-src-delay', '');
|
56
|
+
iframe.setAttribute('src', src_delay);
|
57
|
+
}
|
58
|
+
// always load on tab select
|
59
|
+
let src_always = iframe.getAttribute('data-src-always');
|
60
|
+
if (src_always != null) {
|
61
|
+
iframe.setAttribute('src', src_always);
|
62
|
+
}
|
63
|
+
});
|
64
|
+
};
|
65
|
+
|
66
|
+
/*******************************************************************
|
67
|
+
* Return false when confirmation is not required
|
68
|
+
*******************************************************************/
|
69
|
+
confirmation_is_cancled = function(object) {
|
70
|
+
var confirmation = object.getAttribute("data-confirm");
|
71
|
+
// if confirmation required
|
72
|
+
if (confirmation !== null) {
|
73
|
+
if (!confirm(confirmation)) {return true;}
|
74
|
+
}
|
75
|
+
return false;
|
76
|
+
};
|
77
|
+
|
78
|
+
/*******************************************************************
|
79
|
+
* Will update select field on the form which select options are dependend
|
80
|
+
* on other field value. It calls /dc_common/autocomplete and passes
|
81
|
+
* methodname and depend field value to obtain new values for select field.
|
82
|
+
*******************************************************************/
|
83
|
+
update_select_depend = function(select_name, depend_name, method) {
|
84
|
+
var select_field = $('#'+select_name);
|
85
|
+
var depend_field = $('#'+depend_name);
|
86
|
+
|
87
|
+
$.ajax({
|
88
|
+
url: "/dc_common/autocomplete",
|
89
|
+
type: "POST",
|
90
|
+
dataType: "json",
|
91
|
+
data: { input: depend_field.val(), search: method},
|
92
|
+
success: function(data) {
|
93
|
+
|
94
|
+
select_field.empty();
|
95
|
+
$.each(data, function(index, element) {
|
96
|
+
select_field.append( new Option(element['label'], element['id']) );
|
97
|
+
});
|
98
|
+
}
|
99
|
+
});
|
53
100
|
};
|
54
101
|
|
102
|
+
/*******************************************************************
|
103
|
+
* Format number input field according to data
|
104
|
+
*******************************************************************/
|
55
105
|
format_number_field = function(e) {
|
56
106
|
var decimals = e.attr("data-decimal") || 2;
|
57
107
|
var delimiter = e.attr("data-delimiter") || '.';
|
@@ -99,10 +149,10 @@ $(function() {
|
|
99
149
|
*
|
100
150
|
* Protocol consists of operation and value which are returned as json by
|
101
151
|
* called controller. Controller will return an ajax call usually like this:
|
102
|
-
* render json: {operation: value}
|
152
|
+
* render json: {operation: value}
|
103
153
|
*
|
104
154
|
* Operation is further divided into source and determinator which are divided by underline char.
|
105
|
-
* render json: {#div_status: 'OK!'}
|
155
|
+
* render json: {#div_status: 'OK!'}
|
106
156
|
* will replace html in div="status" with value 'OK!'. Source is '#div' determinator is 'status'.
|
107
157
|
*
|
108
158
|
* Possible operators are:
|
@@ -125,78 +175,133 @@ $(function() {
|
|
125
175
|
* window_: Will force loading of url supplied in value into new window
|
126
176
|
* reload_: Will reload current window
|
127
177
|
*
|
128
|
-
* Operations can be chained and are executed
|
129
|
-
* render json: {'window_' => "/
|
130
|
-
* will open /
|
178
|
+
* Operations can be chained and are executed sequential.
|
179
|
+
* render json: {'window_' => "/document.pdf", 'reload_' => 1}.to_json
|
180
|
+
* will open /document.pdf in new window and reload current window.
|
131
181
|
*
|
132
182
|
* render json: {'record_name' => "Damjan", 'record_surname' => 'Rems'}.to_json
|
133
183
|
* will replace values of two fields on the form.
|
134
184
|
*******************************************************************/
|
135
185
|
|
136
186
|
process_json_result = function(json) {
|
137
|
-
var i,operation,
|
138
|
-
$.each(json, function(key,
|
187
|
+
var i, w, operation, selector, msg_div, field;
|
188
|
+
$.each(json, function(key, value) {
|
139
189
|
i = key.search('_');
|
140
190
|
if (i > 1) {
|
141
191
|
operation = key.substring(0,i);
|
142
|
-
|
192
|
+
selector = key.substring(i+1,100);
|
143
193
|
} else {
|
144
194
|
operation = key;
|
145
|
-
|
195
|
+
selector = '';
|
146
196
|
}
|
147
|
-
|
197
|
+
|
148
198
|
switch (operation) {
|
149
|
-
|
199
|
+
|
200
|
+
/**** update fields on form ****/
|
150
201
|
case 'record':
|
151
|
-
|
202
|
+
let name = key.replace('record_','record[') + ']';
|
203
|
+
field = $('[name="' + name + '"]');
|
204
|
+
// checkbox field
|
205
|
+
if (field.is(':checkbox')) {
|
206
|
+
field.prop('checked', value);
|
207
|
+
// select field
|
208
|
+
} else if (field.is('select')) {
|
209
|
+
// options for select field
|
210
|
+
if (value && value.isArray) {
|
211
|
+
field.empty();
|
212
|
+
$.each(value, function(index, v) {
|
213
|
+
field.append( new Option(v[0], v[1]) );
|
214
|
+
});
|
215
|
+
// select field value
|
216
|
+
} else {
|
217
|
+
field.val(value).change();
|
218
|
+
}
|
219
|
+
// radio field
|
220
|
+
} else if (field.attr('type') == 'radio') {
|
221
|
+
field.val([value])
|
222
|
+
|
223
|
+
// other input fields
|
224
|
+
} else {
|
225
|
+
field.val(value);
|
226
|
+
}
|
152
227
|
break;
|
153
|
-
|
228
|
+
|
229
|
+
/**** display message ****/
|
154
230
|
case 'msg':
|
155
|
-
|
156
|
-
if ( $('.'+
|
157
|
-
|
158
|
-
$('.dc-title').after(
|
231
|
+
let msg_div = 'dc-form-' + selector;
|
232
|
+
if ( $('.' + msg_div).length == 0 ) {
|
233
|
+
value = '<div class="' + msg_div + '">' + value + '</div>';
|
234
|
+
$('.dc-title').after(value);
|
159
235
|
} else {
|
160
|
-
$('.'+
|
236
|
+
$('.' + msg_div).html(value);
|
237
|
+
$('.' + msg_div).show();
|
161
238
|
}
|
162
239
|
break;
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
$('#popup').
|
240
|
+
|
241
|
+
/**** display popup message ****/
|
242
|
+
case 'popup':
|
243
|
+
$('#popup').html(value);
|
244
|
+
$('#popup').bPopup({ speed: 650, transition: 'slideUp'});
|
245
|
+
break;
|
167
246
|
|
168
|
-
|
247
|
+
/**** update div ****/
|
169
248
|
case '#div+':
|
170
|
-
$('#'+
|
249
|
+
$('#'+selector).append(value);
|
171
250
|
break;
|
172
251
|
case '#+div':
|
173
|
-
$('#'+
|
252
|
+
$('#'+selector).prepend(value);
|
174
253
|
break;
|
175
254
|
case '#div':
|
176
|
-
$('#'+
|
255
|
+
$('#'+selector).html(value);
|
177
256
|
break;
|
178
257
|
case '.div+':
|
179
|
-
$('.'+
|
258
|
+
$('.'+selector).append(value);
|
180
259
|
break;
|
181
260
|
case '.+div':
|
182
|
-
$('.'+
|
261
|
+
$('.'+selector).prepend(value);
|
183
262
|
break;
|
184
263
|
case '.div':
|
185
|
-
$('.'+
|
264
|
+
$('.'+selector).html(value);
|
186
265
|
break;
|
187
|
-
|
266
|
+
|
267
|
+
/**** goto url ****/
|
188
268
|
case 'url':
|
189
|
-
window.location.href =
|
269
|
+
window.location.href = value;
|
190
270
|
break;
|
191
271
|
case 'alert':
|
192
|
-
alert(
|
272
|
+
alert(value);
|
193
273
|
break;
|
194
274
|
case 'window':
|
195
|
-
|
275
|
+
if (value == 'close') { window.close();
|
276
|
+
} else if (value == 'reload') {
|
277
|
+
location.reload();
|
278
|
+
} else {
|
279
|
+
w = window.open(value, selector);
|
280
|
+
w.focus();
|
281
|
+
}
|
282
|
+
break;
|
283
|
+
case 'newwindow':
|
284
|
+
w = window.open(value, selector,"location=no,scrollbars=yes,resizable=yes");
|
196
285
|
w.focus();
|
197
286
|
break;
|
287
|
+
case 'eval':
|
288
|
+
console.log('from process_json_result: Eval option will be deprecated. Use script instead.')
|
289
|
+
eval (value);
|
290
|
+
break;
|
291
|
+
case 'script':
|
292
|
+
eval (value);
|
293
|
+
break;
|
198
294
|
case 'reload':
|
199
|
-
|
295
|
+
value = value.toString();
|
296
|
+
if (value == 'parent') {
|
297
|
+
parent.location.reload();
|
298
|
+
/*** this would be current window (reload: true) ****/
|
299
|
+
} else if (value.length < 5) {
|
300
|
+
location.reload();
|
301
|
+
/*** reload iframe ****/
|
302
|
+
} else {
|
303
|
+
$( '#' + value ).attr('src', $( '#' + value ).attr('src'));
|
304
|
+
}
|
200
305
|
break;
|
201
306
|
default:
|
202
307
|
console.log("DRGCMS: Invalid ajax result operation: " + operation);
|
@@ -236,6 +341,42 @@ $.fn.dc_scroll_view = function () {
|
|
236
341
|
});
|
237
342
|
};
|
238
343
|
|
344
|
+
/*******************************************************************
|
345
|
+
* Updates single field on parent iframe form of embedded form.
|
346
|
+
*******************************************************************/
|
347
|
+
process_parent_form_updates = function(element) {
|
348
|
+
let field = element.getAttribute("data-field");
|
349
|
+
let value = element.getAttribute("data-value");
|
350
|
+
let selector = '#' + field;
|
351
|
+
|
352
|
+
// update record
|
353
|
+
if (field.match(/record/)) {
|
354
|
+
if (window.parent.$(selector).length > 0) {
|
355
|
+
if (field.substring(0, 3) === 'td_') { // readonly field
|
356
|
+
window.parent.$(selector + ' > div').html(value);
|
357
|
+
} else { // input field
|
358
|
+
window.parent.$(selector).val(value);
|
359
|
+
}
|
360
|
+
}
|
361
|
+
// any div
|
362
|
+
} else {
|
363
|
+
if (window.parent.$(selector).length > 0) {
|
364
|
+
window.parent.$(selector).html(value);
|
365
|
+
}
|
366
|
+
}
|
367
|
+
};
|
368
|
+
|
369
|
+
/*****************************************************************
|
370
|
+
* Toggle show and hide div
|
371
|
+
******************************************************************/
|
372
|
+
dc_toggle_div = function(div) {
|
373
|
+
if ($(div).is(":visible")) {
|
374
|
+
$(div).slideUp();
|
375
|
+
} else {
|
376
|
+
$(div).slideDown();
|
377
|
+
}
|
378
|
+
};
|
379
|
+
|
239
380
|
/*******************************************************************
|
240
381
|
*
|
241
382
|
*******************************************************************/
|
@@ -248,6 +389,27 @@ $(document).ready( function() {
|
|
248
389
|
// select_first_input_field('.dc-form');
|
249
390
|
}
|
250
391
|
*/
|
392
|
+
/*******************************************************************
|
393
|
+
* It will scroll display to ypos if return_to_ypos parameter is present
|
394
|
+
*******************************************************************/
|
395
|
+
if (window.location.href.match(/return_to_ypos=/))
|
396
|
+
{
|
397
|
+
window.scrollTo(0, $.getUrlParam('return_to_ypos'));
|
398
|
+
}
|
399
|
+
|
400
|
+
/*******************************************************************
|
401
|
+
* The idea is to update fields on parent iframe form, when embedded document
|
402
|
+
* is updated in its iframe. Update fields are listed in .dc-form-updates div
|
403
|
+
* and are set by flash[:update] Hash object.
|
404
|
+
*
|
405
|
+
* eg. flash[:update] = {'td_record_radonly' => 'New value for read_only field',
|
406
|
+
* 'record_name' => 'New name'}
|
407
|
+
*******************************************************************/
|
408
|
+
if ( $('.dc-form-updates').length > 0 ) {
|
409
|
+
$('.dc-form-updates').children().each( function( index, element ) {
|
410
|
+
process_parent_form_updates(element);
|
411
|
+
});
|
412
|
+
}
|
251
413
|
|
252
414
|
/*******************************************************************
|
253
415
|
* Register ad clicks
|
@@ -257,6 +419,17 @@ $(document).ready( function() {
|
|
257
419
|
return true;
|
258
420
|
});
|
259
421
|
|
422
|
+
/*****************************************************************
|
423
|
+
* Toggle CMS mode. When clicked on left 30 pixels, window will be scrolled approximately
|
424
|
+
* to the position wher toggle was clicked. When clicked from pixel 31 and on it will
|
425
|
+
* stay on the top of window.
|
426
|
+
******************************************************************/
|
427
|
+
$('.cms-toggle').bind('click', function(e) {
|
428
|
+
var url = '/dc_common/toggle_edit_mode?return_to=' + window.location.href;
|
429
|
+
if (e.pageX < 30) url = url + '&return_to_ypos=' + e.pageY ;
|
430
|
+
window.location.href = url;
|
431
|
+
});
|
432
|
+
|
260
433
|
/*******************************************************************
|
261
434
|
* Popup or close CMS edit menu on icon click
|
262
435
|
*******************************************************************/
|
@@ -280,21 +453,22 @@ $(document).ready( function() {
|
|
280
453
|
* Sort action clicked on cmsedit
|
281
454
|
*******************************************************************/
|
282
455
|
$('.drgcms_sort').change( function(e) {
|
283
|
-
table = e.target.getAttribute("data-table");
|
284
|
-
|
456
|
+
var table = e.target.getAttribute("data-table");
|
457
|
+
var form = e.target.getAttribute("data-form");
|
458
|
+
var sort = e.target.value;
|
285
459
|
e.target.value = null;
|
286
|
-
window.location.href = "/cmsedit?sort=" + sort + "&table=" + table;
|
460
|
+
window.location.href = "/cmsedit?sort=" + sort + "&table=" + table + "&form_name=" + form;
|
287
461
|
});
|
288
462
|
|
289
463
|
/*******************************************************************
|
290
464
|
* Tab clicked on form. Hide old and show selected div.
|
291
465
|
*******************************************************************/
|
292
466
|
$('.dc-form-li').on('click', function(e) {
|
293
|
-
// find li with dc-form-li-selected class. This is our old tab
|
294
|
-
|
467
|
+
// find li with dc-form-li-selected class. This is our old tab
|
468
|
+
let old_tab_id = null;
|
295
469
|
$(e.target).parents('ul').find('li').each( function() {
|
296
470
|
if ($(this).hasClass('dc-form-li-selected')) {
|
297
|
-
// when not already selected toggle dc-form-li-selected class and save old tab
|
471
|
+
// when not already selected toggle dc-form-li-selected class and save old tab
|
298
472
|
if ($(this) !== $(e.target)) {
|
299
473
|
$(this).toggleClass('dc-form-li-selected');
|
300
474
|
$(e.target).toggleClass('dc-form-li-selected');
|
@@ -307,11 +481,15 @@ $(document).ready( function() {
|
|
307
481
|
if (old_tab_id !== null) {
|
308
482
|
$('#data_' + old_tab_id).toggleClass('div-hidden');
|
309
483
|
$('#data_' + e.target.getAttribute("data-div")).toggleClass('div-hidden');
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
484
|
+
|
485
|
+
// resize parent iframe to fit selected tab size
|
486
|
+
let div_height = document.body.scrollHeight;
|
487
|
+
let frame = window.frameElement
|
488
|
+
if (frame === null) frame = document.body;
|
489
|
+
frame.style.height = div_height.toString() + 'px';
|
490
|
+
|
314
491
|
select_first_input_field('#data_' + e.target.getAttribute("data-div"));
|
492
|
+
update_embedded_on_tab_select('#data_' + e.target.getAttribute("data-div"));
|
315
493
|
}
|
316
494
|
});
|
317
495
|
|
@@ -319,12 +497,11 @@ $(document).ready( function() {
|
|
319
497
|
* Resize iframe_cms to the size of its contents. Make at least 500 px high
|
320
498
|
* unless on initial display.
|
321
499
|
*******************************************************************/
|
322
|
-
$('#iframe_cms').load
|
323
|
-
|
324
|
-
new_height = this.contentWindow.document.body.offsetHeight + 50;
|
500
|
+
$('#iframe_cms').on('load', function() {
|
501
|
+
let new_height = this.contentWindow.document.body.offsetHeight + 50;
|
325
502
|
if (new_height < 500 && new_height > 60) new_height = 500;
|
326
503
|
this.style.height = new_height + 'px';
|
327
|
-
// scroll to top
|
504
|
+
// scroll to top
|
328
505
|
$('#iframe_cms').dc_scroll_view();
|
329
506
|
});
|
330
507
|
|
@@ -332,61 +509,99 @@ $(document).ready( function() {
|
|
332
509
|
* Same goes for editiframe. Resize it + 30px
|
333
510
|
* unless on initial display with no data
|
334
511
|
*******************************************************************/
|
335
|
-
$('#iframe_edit').load
|
336
|
-
// console.log(this.contentWindow.document.body.offsetHeight);
|
512
|
+
$('#iframe_edit').on('load', function() {
|
337
513
|
if (this.contentWindow.document.body.offsetHeight > 10) {
|
338
514
|
this.style.height = (this.contentWindow.document.body.offsetHeight + 30) + 'px';
|
339
|
-
|
515
|
+
|
340
516
|
$('#iframe_edit').dc_scroll_view();
|
341
517
|
}
|
342
518
|
});
|
343
|
-
|
519
|
+
|
520
|
+
/*******************************************************************
|
521
|
+
* Same goes for iframe_embedded. Resize it + 30px
|
522
|
+
*******************************************************************/
|
523
|
+
$('.iframe_embedded').on('load', function() {
|
524
|
+
let embedded_height = this.contentWindow.document.body.offsetHeight;
|
525
|
+
// workaround. It gets tricky when embedded field is on tab
|
526
|
+
if (embedded_height == 0) embedded_height = 500;
|
527
|
+
this.style.height = (embedded_height + 30) + 'px';
|
528
|
+
// resize parent iframe window too
|
529
|
+
let parentWindow = this.contentWindow.parent;
|
530
|
+
let parent_height = (parentWindow.document.body.offsetHeight + 30) + 'px';
|
531
|
+
//parentWindow.frameElement.setAttribute('style', 'height:' + parent_height);
|
532
|
+
parentWindow.frameElement.style.height = parent_height;
|
533
|
+
});
|
534
|
+
|
344
535
|
/*******************************************************************
|
345
536
|
* Process Ajax call on cmsedit form actions
|
346
537
|
*******************************************************************/
|
347
538
|
$('.dc-link-ajax').on('click', function(e) {
|
348
|
-
//
|
539
|
+
// confirmation if required
|
540
|
+
if (confirmation_is_cancled(this)) {return false;}
|
541
|
+
|
542
|
+
// check HTML5 validations
|
349
543
|
if ($("form")[0] && !$("form")[0].checkValidity() ) {
|
350
544
|
$("form")[0].reportValidity();
|
351
545
|
return false;
|
352
546
|
}
|
353
|
-
|
354
|
-
|
355
|
-
// Get values from elements on the page:
|
547
|
+
let req = this.getAttribute("data-request");
|
548
|
+
// Get values from elements on the page:
|
356
549
|
if (req == "script") {
|
357
|
-
eval (
|
550
|
+
eval (this.getAttribute("data-script"));
|
358
551
|
return false;
|
359
552
|
}
|
360
553
|
else if (req == "post") {
|
361
554
|
data = $('form').serialize();
|
362
|
-
// alert(data);
|
363
555
|
}
|
364
556
|
else {
|
365
557
|
data = {};
|
366
558
|
req = 'get'; // by default
|
367
559
|
}
|
368
|
-
|
369
|
-
|
560
|
+
|
561
|
+
let url = this.getAttribute("data-url");
|
562
|
+
if (url.length < 5) return false;
|
563
|
+
|
564
|
+
$('.dc-spinner').show();
|
370
565
|
$.ajax({
|
371
|
-
url:
|
566
|
+
url: url,
|
372
567
|
type: req,
|
373
568
|
dataType: "json",
|
374
569
|
data: data,
|
375
|
-
// success: function(files,data,xhr) {
|
376
|
-
// document.getElementById('if_priponkas').contentDocument.location.reload(true);
|
377
|
-
// }
|
378
570
|
success: function(data) {
|
379
571
|
process_json_result(data);
|
380
|
-
$('.dc-spinner').
|
572
|
+
$('.dc-spinner').hide();
|
381
573
|
}
|
382
|
-
|
383
|
-
|
384
|
-
|
574
|
+
});
|
575
|
+
});
|
576
|
+
|
577
|
+
/*******************************************************************
|
578
|
+
* Process action submit button click.
|
579
|
+
*******************************************************************/
|
580
|
+
$('.dc-action-submit').on('click', function(e) {
|
581
|
+
// confirmation if required
|
582
|
+
if (confirmation_is_cancled(this)) {return false;}
|
583
|
+
|
584
|
+
// check HTML5 validations
|
585
|
+
var form = $("form")[0];
|
586
|
+
if (form && !form.checkValidity() ) {
|
587
|
+
form.reportValidity();
|
588
|
+
return false;
|
589
|
+
}
|
590
|
+
var url = this.getAttribute("data-url");
|
591
|
+
if (url == null) {return false;}
|
592
|
+
|
593
|
+
form.setAttribute('action', url);
|
594
|
+
form.setAttribute('method', "post");
|
595
|
+
form.submit();
|
596
|
+
});
|
385
597
|
|
386
598
|
/*******************************************************************
|
387
599
|
will open a new window with URL specified.
|
388
600
|
********************************************************************/
|
389
601
|
$('.dc-window-open').on('click', function(e) {
|
602
|
+
// confirmation if required
|
603
|
+
if (confirmation_is_cancled(this)) {return false;}
|
604
|
+
|
390
605
|
var url = this.getAttribute("data-url");
|
391
606
|
var title = this.getAttribute("title");
|
392
607
|
var w = 1000;
|
@@ -395,7 +610,6 @@ $(document).ready( function() {
|
|
395
610
|
var top = (screen.height/2)-(h/2);
|
396
611
|
var win = window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
|
397
612
|
win.focus();
|
398
|
-
// $('#bpopup').bPopup({ loadUrl: url, speed: 650, transition: 'slideDown' });
|
399
613
|
});
|
400
614
|
|
401
615
|
/*******************************************************************
|
@@ -447,11 +661,11 @@ $(document).ready( function() {
|
|
447
661
|
* Display spinner on link with spinner, submit link
|
448
662
|
*******************************************************************/
|
449
663
|
$('.dc-link-spinner').on('click', function(e) {
|
450
|
-
$('.dc-spinner').
|
664
|
+
$('.dc-spinner').show();
|
451
665
|
});
|
452
666
|
|
453
667
|
$('.dc-link-submit').on('click', function(e) {
|
454
|
-
$('.dc-spinner').
|
668
|
+
$('.dc-spinner').show();
|
455
669
|
});
|
456
670
|
|
457
671
|
/*******************************************************************
|
@@ -460,8 +674,8 @@ $(document).ready( function() {
|
|
460
674
|
* data from with text_autocomplete and data doesn't exist in belongs_to table.
|
461
675
|
*******************************************************************/
|
462
676
|
$('.in-edit-add').on('click', function(e) {
|
463
|
-
url = '/cmsedit/new?table=' + this.getAttribute("data-table");
|
464
|
-
|
677
|
+
let url = '/cmsedit/new?table=' + this.getAttribute("data-table");
|
678
|
+
// I know. It doesn't work as expected. But it will do for now.
|
465
679
|
w = window.open(url, '', 'chrome=yes,width=800,height=600,resizable,scrollbars=yes,status=1,centerscreen=yes,modal=yes');
|
466
680
|
w.focus();
|
467
681
|
});
|
@@ -472,13 +686,9 @@ $(document).ready( function() {
|
|
472
686
|
**********************************************************************/
|
473
687
|
$('#filter_field').on('change', function() {
|
474
688
|
if (this.value.length > 0) {
|
475
|
-
name = 'filter_' + this.value;
|
689
|
+
let name = 'filter_' + this.value;
|
476
690
|
$(this).parents('form').find('span').each( function() {
|
477
|
-
|
478
|
-
element = $(this).find(':first').attr('id');
|
479
|
-
sometimes it is the second element
|
480
|
-
if (element == nil) { element = $(this).find(':first').next().attr('id');}
|
481
|
-
*/
|
691
|
+
|
482
692
|
if ($(this).attr('id') == name) {
|
483
693
|
if ( $(this).hasClass('div-hidden') ) { $(this).toggleClass('div-hidden'); }
|
484
694
|
} else {
|
@@ -534,7 +744,7 @@ element = $(this).find(':first').attr('id');
|
|
534
744
|
/*******************************************************************
|
535
745
|
* Experimental. Force reload of parent page if this div appears.
|
536
746
|
*******************************************************************/
|
537
|
-
$('#div-reload-parent').load
|
747
|
+
$('#div-reload-parent').on('load', function() {
|
538
748
|
// alert('div-reload-parent 1');
|
539
749
|
parent.location.href = parent.location.href;
|
540
750
|
});
|
@@ -544,7 +754,7 @@ element = $(this).find(':first').attr('id');
|
|
544
754
|
*
|
545
755
|
* Just an Idea. Not needed yet.
|
546
756
|
*******************************************************************/
|
547
|
-
$('#div-reload').load
|
757
|
+
$('#div-reload').on('load', function() {
|
548
758
|
alert('div-reload 1');
|
549
759
|
// location.href = location.href;
|
550
760
|
});
|
@@ -560,8 +770,8 @@ element = $(this).find(':first').attr('id');
|
|
560
770
|
* Fire action (by default show document) when doubleclicked on result row
|
561
771
|
*******************************************************************/
|
562
772
|
$('.dc-result tr').on('dblclick', function(e) {
|
563
|
-
url = String( this.getAttribute("data-dblclick") );
|
564
|
-
// prevent when data-dblclick not set
|
773
|
+
let url = String( this.getAttribute("data-dblclick") );
|
774
|
+
// prevent when data-dblclick not set
|
565
775
|
if (url.length > 5) {
|
566
776
|
e.preventDefault();
|
567
777
|
location.href = url;
|
@@ -572,8 +782,8 @@ element = $(this).find(':first').attr('id');
|
|
572
782
|
* Fire action (by default show document) when doubleclicked on result row
|
573
783
|
*******************************************************************/
|
574
784
|
$('.dc-result-data').on('dblclick', function(e) {
|
575
|
-
url = String( this.getAttribute("data-dblclick") );
|
576
|
-
// prevent when data-dblclick not set
|
785
|
+
let url = String( this.getAttribute("data-dblclick") );
|
786
|
+
// prevent when data-dblclick not set
|
577
787
|
if (url.length > 5) {
|
578
788
|
e.preventDefault();
|
579
789
|
location.href = url;
|
@@ -605,12 +815,12 @@ element = $(this).find(':first').attr('id');
|
|
605
815
|
});
|
606
816
|
|
607
817
|
/*******************************************************************
|
608
|
-
* This will fire cmsedit index action and pass value
|
818
|
+
* This will fire cmsedit index action and pass value entered into
|
609
819
|
* filter field and thus refresh browsed result set.
|
610
820
|
*******************************************************************/
|
611
821
|
$('#_record__filter_field').keydown( function(e) {
|
612
822
|
if (e.which == '13' || e.which == '9') {
|
613
|
-
url = $(this).parents('span').attr("data-url");
|
823
|
+
var url = $(this).parents('span').attr("data-url");
|
614
824
|
url = url + "&filter_value=" + this.value;
|
615
825
|
location.href = url;
|
616
826
|
return false;
|
@@ -622,8 +832,8 @@ element = $(this).find(':first').attr('id');
|
|
622
832
|
* work on all field types.
|
623
833
|
*******************************************************************/
|
624
834
|
$('.record_filter_field_icon').on('click', function(e) {
|
625
|
-
field = $('#_record__filter_field');
|
626
|
-
url = $(this).parents('span').attr("data-url");
|
835
|
+
var field = $('#_record__filter_field');
|
836
|
+
var url = $(this).parents('span').attr("data-url");
|
627
837
|
url = url + "&filter_value=" + field.val();
|
628
838
|
location.href = url;
|
629
839
|
});
|
@@ -675,8 +885,9 @@ element = $(this).find(':first').attr('id');
|
|
675
885
|
});
|
676
886
|
|
677
887
|
/*******************************************************************
|
678
|
-
* Resize result table columns
|
888
|
+
* Resize result table columns. For now an idea.
|
679
889
|
*******************************************************************/
|
890
|
+
/*
|
680
891
|
$( ".dc-result-header .spacer" )
|
681
892
|
.mouseenter(function() {
|
682
893
|
console.log("enter");
|
@@ -684,7 +895,7 @@ element = $(this).find(':first').attr('id');
|
|
684
895
|
.mouseleave(function() {
|
685
896
|
console.log("leave");
|
686
897
|
});
|
687
|
-
|
898
|
+
*/
|
688
899
|
/*******************************************************************
|
689
900
|
* number_field type entered
|
690
901
|
*******************************************************************/
|
@@ -699,51 +910,57 @@ element = $(this).find(':first').attr('id');
|
|
699
910
|
/*******************************************************************
|
700
911
|
* number_field type leaved
|
701
912
|
*******************************************************************/
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
913
|
+
$('.dc-number').on('focusout', function(e) {
|
914
|
+
var decimals = $(this).attr("data-decimal") || 2;
|
915
|
+
var delimiter = $(this).attr("data-delimiter") || '.';
|
916
|
+
var separator = $(this).attr("data-separator") || ',';
|
917
|
+
var currency = $(this).attr("data-currency") || '';
|
918
|
+
var val = this.value;
|
919
|
+
// clear delimiters and replace separator with .
|
920
|
+
val = val.replace(delimiter,'');
|
921
|
+
val = val.replace(separator,'.');
|
922
|
+
val = parseFloat(val).toFixed(decimals);
|
923
|
+
var whole, dec, sign;
|
924
|
+
// [whole,dec] = val.split('.');
|
925
|
+
whole = val.split('.')[0];
|
926
|
+
dec = val.split('.')[1];
|
714
927
|
// remove negative sign and add at the end
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
928
|
+
var sign = whole.substr(0,1);
|
929
|
+
if (sign == '-') {
|
930
|
+
whole = whole.substr(1,20);
|
931
|
+
} else {
|
932
|
+
sign = '';
|
933
|
+
}
|
934
|
+
// save value to hidden field which holds return value
|
935
|
+
var field = '#' + $(this).attr("id").slice(0,-1);
|
936
|
+
$(field).val(val);
|
721
937
|
|
722
|
-
$(field).val( parseFloat(value).toFixed(decimals) );
|
723
|
-
|
724
938
|
// decimal part
|
725
|
-
|
726
|
-
|
727
|
-
|
939
|
+
if (decimals == 0) separator = '';
|
940
|
+
if (dec == null) dec = '';
|
941
|
+
while (dec.length < decimals) dec = dec + '0';
|
728
942
|
// whole part
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
943
|
+
if (whole == null || whole == '') whole = '0';
|
944
|
+
var ar = [];
|
945
|
+
while (whole.length > 0) {
|
946
|
+
var pos1 = whole.length - 3
|
947
|
+
if (pos1 < 0) pos1 = 0;
|
948
|
+
ar.unshift(whole.substr(pos1,3));
|
949
|
+
whole = whole.slice(0, -3);
|
736
950
|
};
|
737
951
|
|
738
|
-
|
739
|
-
|
952
|
+
if (delimiter !== '') whole = ar.join(delimiter);
|
953
|
+
$(this).val(sign + whole + separator + dec + currency);
|
740
954
|
});
|
741
955
|
|
742
956
|
/*******************************************************************
|
743
|
-
*
|
957
|
+
* Key pressed in number_field.
|
958
|
+
* - put minus sign in front of input field
|
959
|
+
* - replace dot and comma separators when required. Not all numeric pads are created equal.
|
960
|
+
* - when enter is pressed, save value to field before form is proccessed
|
744
961
|
*******************************************************************/
|
745
962
|
$('.dc-number').on('keydown', function(e) {
|
746
|
-
// Minus sign. Put it on first place
|
963
|
+
// Minus sign. Put it on first place
|
747
964
|
if (e.which == 109) {
|
748
965
|
if($(this).val().substr(0,1) == '-') {
|
749
966
|
$(this).val( $(this).val().substr(1,20));
|
@@ -752,16 +969,103 @@ element = $(this).find(':first').attr('id');
|
|
752
969
|
}
|
753
970
|
e.preventDefault();
|
754
971
|
}
|
755
|
-
//
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
972
|
+
// replace , with . if . is separator.
|
973
|
+
var separator = $(this).attr("data-separator") || '.';
|
974
|
+
var inp = this;
|
975
|
+
if (e.which == 188) {
|
976
|
+
if (separator == '.') {
|
977
|
+
setTimeout(function() {
|
978
|
+
inp.value = inp.value.replace(/,/g, '.');
|
979
|
+
}, 0);
|
980
|
+
}
|
981
|
+
}
|
982
|
+
// replace . with , if , is separator
|
983
|
+
if (e.which == 190) {
|
984
|
+
if (separator == ',') {
|
985
|
+
setTimeout(function() {
|
986
|
+
inp.value = inp.value.replace(/\./g, ',');
|
987
|
+
}, 0);
|
988
|
+
}
|
989
|
+
}
|
990
|
+
|
991
|
+
// Enter means process form. Save the value before form is processed
|
992
|
+
if (e.which == 13) {
|
993
|
+
var decimals = $(this).attr("data-decimal") || 2;
|
994
|
+
var value = $(this).val().replace(separator,'.');
|
995
|
+
var field = '#' + $(this).attr("id").slice(0,-1);
|
761
996
|
|
762
|
-
|
763
|
-
|
997
|
+
$(field).val( parseFloat(value).toFixed(decimals) );
|
998
|
+
}
|
764
999
|
});
|
1000
|
+
|
1001
|
+
/*******************************************************************
|
1002
|
+
* Slovenian keyboard has comma key instead of dot in numeric pad.
|
1003
|
+
* This will catch if comma has been pressed and will replace it with dot.
|
1004
|
+
*******************************************************************/
|
1005
|
+
$('.date-picker').keypress( function(e) {
|
1006
|
+
if (e.keyCode !== 44) return;
|
1007
|
+
var inp = this;
|
1008
|
+
setTimeout(function() {
|
1009
|
+
inp.value = inp.value.replace(/,/g, '.');
|
1010
|
+
}, 0);
|
1011
|
+
});
|
1012
|
+
|
1013
|
+
/*******************************************************************
|
1014
|
+
* Result header sort icon is hoverd. Change background icon to filter.
|
1015
|
+
*******************************************************************/
|
1016
|
+
$('.dc-result-header .th i').hover( function() {
|
1017
|
+
old_sort_icon = '';
|
1018
|
+
// save old sort icon and replace it with filter icon
|
1019
|
+
$.each( $(this).attr("class").split(/\s+/),
|
1020
|
+
function(index, item) { if (item.match('sort')) { old_sort_icon = item}; }
|
1021
|
+
);
|
1022
|
+
$(this).removeClass(old_sort_icon).addClass('fa-filter');
|
1023
|
+
// bring back old sort icon
|
1024
|
+
}, function(){
|
1025
|
+
$(this).removeClass('fa-filter').addClass(old_sort_icon);
|
1026
|
+
});
|
1027
|
+
|
1028
|
+
/*******************************************************************
|
1029
|
+
* Result header sort icon is clicked. Display filter menu for the field.
|
1030
|
+
*******************************************************************/
|
1031
|
+
$('.dc-result-header .th i').click( function(e) {
|
1032
|
+
e.preventDefault();
|
1033
|
+
// additional click will close dialog when visible
|
1034
|
+
if ($('.filter-popup').is(':visible')) {
|
1035
|
+
$('.filter-popup').hide();
|
1036
|
+
return;
|
1037
|
+
}
|
1038
|
+
// retrieve name of current field and set it in popup
|
1039
|
+
let header = $(this).closest('.th');
|
1040
|
+
let field_name = header.attr("data-name");
|
1041
|
+
$('.filter-popup').attr('data-name', field_name);
|
1042
|
+
// change popup position and show
|
1043
|
+
$('.filter-popup').css({'top':e.pageY+5,'left':e.pageX, 'position':'absolute'});
|
1044
|
+
$('.filter-popup').show();
|
1045
|
+
});
|
1046
|
+
|
1047
|
+
/*******************************************************************
|
1048
|
+
* Filter operation is clicked on filter popup. Retrieve data and call
|
1049
|
+
* filter on action.
|
1050
|
+
*******************************************************************/
|
1051
|
+
$('.filter-popup li').click( function(e) {
|
1052
|
+
let url = $(this).data('url');
|
1053
|
+
let operator = $(this).data('operator');
|
1054
|
+
let parent = $(this).closest('.filter-popup');
|
1055
|
+
let field_name = parent.data("name");
|
1056
|
+
|
1057
|
+
url = url + '&filter_field=' + field_name + '&filter_oper=' + operator;
|
1058
|
+
window.location.href = url;
|
1059
|
+
});
|
1060
|
+
|
1061
|
+
/*****************************************************************
|
1062
|
+
* Toggle div
|
1063
|
+
******************************************************************/
|
1064
|
+
$(".dc-handle").click(function() {
|
1065
|
+
let div = this.getAttribute("data-div");
|
1066
|
+
dc_toggle_div(div);
|
1067
|
+
});
|
1068
|
+
|
765
1069
|
});
|
766
1070
|
|
767
1071
|
/*******************************************************************
|
@@ -780,9 +1084,7 @@ $(document).keydown( function(e) {
|
|
780
1084
|
});
|
781
1085
|
|
782
1086
|
/*******************************************************************
|
783
|
-
|
784
|
-
* almost every minute. That was a lesson learned years ago when I lost
|
785
|
-
* few hours of work on computer lockup ;-(
|
1087
|
+
|
786
1088
|
*******************************************************************
|
787
1089
|
$(document).onmousedown( function(e) {
|
788
1090
|
mouseDown = true;
|
@@ -794,4 +1096,4 @@ $(document).onmouseup( function(e) {
|
|
794
1096
|
console.log("mouse up");
|
795
1097
|
});
|
796
1098
|
|
797
|
-
**/
|
1099
|
+
**/
|