Added an checkbox to change all operations of a permission.

This commit is contained in:
Jan Böhmer 2019-09-11 16:46:59 +02:00
parent ac302ab16a
commit 35dd1fabc0
3 changed files with 36 additions and 1 deletions

View file

@ -219,6 +219,17 @@ $(document).on("ajaxUI:start ajaxUI:reload", function() {
unchecked: "false",
indeterminate: "indeterminate",
});
$('.permission_multicheckbox:checkbox').change(function() {
//Find the other checkboxes in this row, and change their value
var $row = $(this).parents('tr');
//@ts-ignore
var new_state = $(this).tristate('state');
//@ts-ignore
$('.tristate:checkbox', $row).tristate('state', new_state;
});
});
//Re initialize fileinputs on reload