From 58f295fb1cbc78db91d16708ea15818f29e451b7 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Fri, 16 Sep 2022 14:38:03 +0200 Subject: Fix client room retrieving Otherwise, retrieving do not work on clients inside folders. --- ogcp/static/js/ogcp.js | 2 +- ogcp/templates/macros.html | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js index 977f5a7..875084d 100644 --- a/ogcp/static/js/ogcp.js +++ b/ogcp/static/js/ogcp.js @@ -94,7 +94,7 @@ function checkChildrenCheckboxes() { others.trigger('change'); } else { // Look for room, deselect all other rooms - const selectedRoom = $(this).parent().parent().parent().children('[name="scope-room"]'); + const selectedRoom = $('[data-room="' + $(this).data('parentRoom') + '"]'); const others = $('input:checkbox[name="scope-room"]').not(selectedRoom); others.prop('checked', false).prop('indeterminate', false); others.each(function() { diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html index 4ff8477..6ba1d38 100644 --- a/ogcp/templates/macros.html +++ b/ogcp/templates/macros.html @@ -1,7 +1,7 @@ {% macro scopes_tree_collapse(scopes, state='', selection_mode='scopes') -%}