js: uncheck parent folder when a child folder is unchecked

Improve selection logic to deselect the checkbox of a folder's
parent when the checkbox is unchecked.

Based on work from Javier Hernandez.
master
Alejandro Sirgo Rica 2024-06-12 14:55:27 +02:00
parent 5533141ae9
commit 0153b2b13f
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ function checkFolderParent() {
const folder = $('input:checkbox[form|="scopesForm"][name="folder"]')
folder.on('change', function() {
const folder_parent = $('#' + $.escapeSelector(this.dataset.parentInput));
folder_parent.prop('checked', true);
folder_parent.prop('checked', this.checked);
});
}