From ae14dfbf2822ccc8e0d7585c16af5dc04f9c0ad5 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 --- 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 73a4a0251e1..b05936f48f9 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.34.1