diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-12 14:55:27 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-14 09:23:44 +0200 |
commit | 0153b2b13fd0e28753646fe0ca961e8cae931d26 (patch) | |
tree | 3a082180ec8b7d9a46e9e28057e06930e7ebecd5 /ogcp/static | |
parent | 5533141ae93581463fa4dcc2677742274e32ea86 (diff) |
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.
Diffstat (limited to 'ogcp/static')
-rw-r--r-- | ogcp/static/js/ogcp.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js index 8916353..17d3ca0 100644 --- a/ogcp/static/js/ogcp.js +++ b/ogcp/static/js/ogcp.js @@ -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); }); } |