summaryrefslogtreecommitdiffstats
path: root/ogcp/static
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-16 13:46:28 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-16 13:46:28 +0200
commit2ca2215ed6653dc7bf2cfaf320fee811b376ece8 (patch)
treeb106450cad1bc7818551fdaa3c0d566f93f0cb6b /ogcp/static
parentdb2869088fcd19ac60bd110ad04a8c6b74f9d306 (diff)
js: restrict the checkbox filter to the sidebar
Prevent accidental processing of checkboxes outside the sidebar.
Diffstat (limited to 'ogcp/static')
-rw-r--r--ogcp/static/js/ogcp.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index 4136df6..f70f77c 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -47,7 +47,7 @@ function showSelectedClient(client_checkbox) {
}
function showSelectedClientsOnEvents() {
- const checkboxes = $('input:checkbox[form|="scopesForm"]');
+ const checkboxes = $('#sidebar input:checkbox');
checkboxes.on('change show-client', function () {
showSelectedClient(this);
@@ -111,7 +111,7 @@ function configureCommandCheckboxes(context) {
checkboxes.on('change', function () {
const checked = this.checked;
- const childrenCheckboxes = $('input:checkbox[form|="scopesForm"]', this.parentNode);
+ const childrenCheckboxes = $('#sidebar input:checkbox', this.parentNode);
// Uncheck all other checkboxes outside of the actual center branch
if (checked) {
@@ -138,7 +138,7 @@ function configureCommandCheckboxes(context) {
}
function keepSelectedClients(context) {
- const checkboxes = $('input:checkbox[form|="scopesForm"]')
+ const checkboxes = $('#sidebar input:checkbox')
checkboxes.on('change', function (event) {
storeCheckboxStatus(this, context);
@@ -334,7 +334,7 @@ function checkRepoServer() {
}
function checkFolderParent(context) {
- const folder = $('input:checkbox[form|="scopesForm"][name="folder"]')
+ const folder = $('#sidebar input:checkbox[name="folder"]')
folder.on('change', function() {
const folder_parent = $('#' + $.escapeSelector(this.dataset.parentInput));
folder_parent.prop('checked', this.checked);
@@ -343,7 +343,7 @@ function checkFolderParent(context) {
}
function limitCheckboxes(context) {
- const checkboxes = $('input:checkbox[form|="scopesForm"]');
+ const checkboxes = $('#sidebar input:checkbox');
checkboxes.on('change', function () {
const currentCheckbox = $(this);
@@ -372,7 +372,7 @@ function limitCheckboxes(context) {
}
function checkScopeServer() {
- const servers = $('input:checkbox[form|="scopesForm"][name="scope-server"]');
+ const servers = $('#sidebar input:checkbox[name="scope-server"]');
servers.each(function() {
const checkbox = this;
const checkboxChildren = $('input:checkbox', this.parentNode).not(this);