summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/macros.html
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-01-27 16:22:19 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-01-28 12:51:07 +0100
commita9e6340517611971bd83e6a470f6867b8905114c (patch)
treea428cb85801bd7ffe1863392f57cdb193bd54ad4 /ogcp/templates/macros.html
parentb7e4f47f5cca21a2f7f04b6bd6a87873b5cef853 (diff)
Keep selected clients in the scopes tree
Otherwise, users have to click clients checkboxes every time they switch view. This commit adds one hook to capture when clients checkboxes changes. When they are checked, ogcp (front-end) stores them in browser's local storage. When they are unchecked, ogcp removes them from local storage. Every time users load a page with the scopes tree, ogcp checks local storage to restore selected clients.
Diffstat (limited to 'ogcp/templates/macros.html')
-rw-r--r--ogcp/templates/macros.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html
index dd26818..3d28d05 100644
--- a/ogcp/templates/macros.html
+++ b/ogcp/templates/macros.html
@@ -10,6 +10,7 @@
if (document.readyState === 'complete') {
updateScopeState();
keepScopesTreeState();
+ keepSelectedClients();
}
});
</script>