From ec2a6b5c78360d3476930cceb1f8711463d75d24 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 7 Jun 2019 10:46:32 +0200 Subject: [PATCH] collapsible.js: Use namespace `behavior` for local storage entries --- public/js/icinga/behavior/collapsible.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/icinga/behavior/collapsible.js b/public/js/icinga/behavior/collapsible.js index ff87a0790..70f658320 100644 --- a/public/js/icinga/behavior/collapsible.js +++ b/public/js/icinga/behavior/collapsible.js @@ -144,7 +144,7 @@ * Load state from storage */ Collapsible.prototype.loadStorage = function () { - var expanded = localStorage.getItem('collapsible.expanded'); + var expanded = localStorage.getItem('behavior.collapsible.expanded'); if (!! expanded) { this.expanded = new Set(JSON.parse(expanded)); } @@ -155,9 +155,9 @@ */ Collapsible.prototype.destroy = function () { if (this.expanded.size > 0) { - localStorage.setItem('collapsible.expanded', JSON.stringify(Array.from(this.expanded.values()))); + localStorage.setItem('behavior.collapsible.expanded', JSON.stringify(Array.from(this.expanded.values()))); } else { - localStorage.removeItem('collapsible.expanded'); + localStorage.removeItem('behavior.collapsible.expanded'); } };