diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-08-05 10:43:28 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-08-05 10:43:28 +0200 |
commit | d1e94693261dbe9e53629f8775defe7168316f52 (patch) | |
tree | e485e4783a6f14dd99c3a52d02b0c51d8994dfcd | |
parent | 3e35997131f51e892b93157c6d18a3a0ba759318 (diff) |
js: enable center selection in Commands
Enable center checkboxes and implement selection of clients from
multiple rooms in the same center.
-rw-r--r-- | ogcp/static/js/ogcp.js | 12 | ||||
-rw-r--r-- | ogcp/templates/base.html | 2 |
2 files changed, 7 insertions, 7 deletions
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; }); diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html index b6fcb94..cbbfafa 100644 --- a/ogcp/templates/base.html +++ b/ogcp/templates/base.html @@ -108,7 +108,7 @@ <!-- ChartJS --> <script src="{{ url_for('static', filename='AdminLTE/plugins/chart.js/Chart.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/ogcp.js') }}?v=14"></script> + <script src="{{ url_for('static', filename='js/ogcp.js') }}?v=15"></script> <script> // error messages |