From d1e94693261dbe9e53629f8775defe7168316f52 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Mon, 5 Aug 2024 10:43:28 +0200 Subject: js: enable center selection in Commands Enable center checkboxes and implement selection of clients from multiple rooms in the same center. --- ogcp/static/js/ogcp.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ogcp/static/js') diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js index af95dde..b70b49d 100644 --- a/ogcp/static/js/ogcp.js +++ b/ogcp/static/js/ogcp.js @@ -102,9 +102,9 @@ function configureCommandCheckboxes(context) { }); }); - // disable checkboxes outside of scope-room branches + // disable checkboxes outside of scope-center branches $(window).on('pageshow', function(event) { - const enabledCheckboxes = checkboxes.filter('[name="scope-room"]').parent().find('input:checkbox[form="scopesForm"]'); + const enabledCheckboxes = checkboxes.filter('[name="scope-center"]').parent().find('input:checkbox[form="scopesForm"]'); checkboxes.not(enabledCheckboxes).prop('disabled', true); setParentStatus(checkboxes) }); @@ -113,12 +113,12 @@ function configureCommandCheckboxes(context) { const checked = this.checked; const childrenCheckboxes = $('input:checkbox[form|="scopesForm"]', this.parentNode); - // Uncheck all other checkboxes outside of the actual room branch + // Uncheck all other checkboxes outside of the actual center branch if (checked) { - const roomBranch = findParentCheckboxes(this).add(childrenCheckboxes) - .filter('[name="scope-room"]') + const centerBranch = findParentCheckboxes(this).add(childrenCheckboxes) + .filter('[name="scope-center"]') .parent().find('input:checkbox[form="scopesForm"]'); - checkboxes.not(roomBranch).each(function () { + checkboxes.not(centerBranch).each(function () { this.checked = false; this.indeterminate = false; }); -- cgit v1.2.3-18-g5258