From b0af03361f531fe192029cd10f14d2e53c48fd19 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 10 May 2019 13:24:39 +0000 Subject: [PATCH] Bug 22881: Trying to clear search history via the navbar X doesn't clear any searches This patch undoes a mistake introduced in my patch for Bug 21479. A "preventDefault()" was added to the search history clear button by mistake. The "confirmDelete" function only works if the default action of the link is allowed to complete. To test you must have the EnableOpacSearchHistory system preference enabled. Apply the patch and log into the OPAC as a patron who has a search history. Click the "X" link in the header next to the "Search history" link. Confirm that you want to clear your search history. The page should refresh. Navigate to your account -> Your search history to confirm that your search history has been cleared. Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit 6d1b7ff27eb2d53d637c169c7132a66d546c0124) Signed-off-by: Martin Renvoize (cherry picked from commit b95682f73549cd9ddda73c61a54a4b45b0443cbe) Signed-off-by: Lucas Gass --- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 16ca89629f..a2f983babf 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -174,8 +174,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip); var biblionumber = $(this).data("biblionumber"); delSingleRecord( biblionumber ); }); - $(".clearsh").on("click", function(e){ - e.preventDefault(); + $(".clearsh").on("click", function(){ return confirmDelete(MSG_DELETE_SEARCH_HISTORY); }); //]]> -- 2.39.5