From 7b706529a4d70ae3a3a181b01fc2e54f2348e733 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 3 Oct 2024 15:30:06 +0200 Subject: [PATCH] Bug 33484: Remove localStorage on logout Signed-off-by: Pedro Amorim Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index 73a4a0251e..b05936f48f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -435,6 +435,9 @@ function logOut() { localStorage.removeItem("patron_search_selections"); localStorage.removeItem("item_search_selections"); localStorage.removeItem("copiedPermissions"); + + // Remove DataTables states + Object.keys(localStorage).forEach(k => {if (k.match(/^DataTables_/)) { localStorage.removeItem(k)}}); } function openHelp() { -- 2.39.5