From 2558a52ac5bcdc9e4c452e427b1cc85bae21d104 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 27 Jan 2022 12:40:45 +0100 Subject: [PATCH] Bug 30296: [20.11.x] Set path for bibs_selected Or it does not get cleared. Not that we may want to skip it for master as bug 29932 is going to replace it with sessionStorage Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy No longer needed too on 21.11 and 21.05. Signed-off-by: Wainui Witika-Park --- .../intranet-tmpl/prog/js/staff-global.js | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index 487388360d..ac594c30f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -239,3 +239,68 @@ function keep_text(clicked_index) { searchboxes[i].value = persist; } } + +// Extends jQuery API +jQuery.extend({uniqueArray:function(array){ + return $.grep(array, function(el, index) { + return index === $.inArray(el, array); + }); +}}); + +function removeByValue(arr, val) { + for(var i=0; i