summaryrefslogtreecommitdiffstats
path: root/ogcp/static
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/static')
-rw-r--r--ogcp/static/js/ogcp.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index 6473373..5028993 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -136,6 +136,25 @@ function keepSelectedClients() {
});
}
+function keepReposTreeState() {
+ const repos_tree = $('#repos-list .collapse')
+
+ repos_tree.on('hidden.bs.collapse', function (event) {
+ event.stopPropagation();
+ localStorage.removeItem(this.id);
+ });
+ repos_tree.on('shown.bs.collapse', function (event) {
+ event.stopPropagation();
+ localStorage.setItem(this.id, 'show');
+ });
+
+ repos_tree.each(function () {
+ if (localStorage.getItem(this.id) == 'show') {
+ $(this).collapse('show');
+ }
+ });
+}
+
function keepScopesTreeState() {
const scopes_tree = $('#scopes .collapse')