-
Notifications
You must be signed in to change notification settings - Fork 3
/
CronjobDatabaseBackup.js
31 lines (31 loc) · 1.28 KB
/
CronjobDatabaseBackup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
jQuery(document).ready(function($) {
$("form[action*='CronjobDatabaseBackup'] .InputfieldCheckboxes input:checkbox.check").click(function() {
var checked = !$(this).data('checked');
var parent = $(this).data('for');
var boxes = $(parent + '.InputfieldCheckboxes .InputfieldCheckboxesColumns input:checkbox[disabled!=\'disabled\']');
var cboxes = $('.Inputfield_tables_content.InputfieldCheckboxes .InputfieldCheckboxesColumns input:checkbox');
boxes.prop('checked', checked);
if (parent == '.Inputfield_tables') {
if (checked) {
cboxes.prop('checked', checked);
cboxes.removeAttr('disabled');
} else {
cboxes.prop('checked', checked);
cboxes.attr('disabled','disabled');
}
}
$(this).val(checked ? 1 : 0 )
$(this).data('checked', checked);
});
$("form[action*='CronjobDatabaseBackup'] .Inputfield_tables.InputfieldCheckboxes .InputfieldCheckboxesColumns input:checkbox").click(function() {
var val = $(this).val();
var checked = $(this).prop('checked');
var box = $('.Inputfield_tables_content.InputfieldCheckboxes .InputfieldCheckboxesColumns input:checkbox[value=\'' + val + '\']');
if (!checked) {
box.prop('checked', checked);
box.attr('disabled','disabled');
} else {
box.removeAttr('disabled');
}
});
});