From 0468977424fbd3354415d25f6732ed995af14027 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 2 Oct 2018 17:34:44 -0300 Subject: [PATCH] Bug 21479: Fix remove from cart - OPAC This bug affects all stable releases and seems to have been there for a long time. To recreate: - Launch a search at the OPAC - Add 2 elements to the cart - Remove one => Cart is empty Note that it does not exist on the staff interface The code in opac-bottom is only for the detail page, but the evenement binding was done on the result search page as they have the same selector (.cartRemove) Using a more specific selector (already used for "add to shelf") fixes the problem. Test plan: Add and remove elements to/from your cart On both search and detail view --- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 4 ++-- 1 file changed, 2 insertions(+), 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 ab7eb2c306..7ea1c3beb1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -188,11 +188,11 @@ $.widget.bridge('uitooltip', $.ui.tooltip); Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber | html %]'); return false; }); - $(".addrecord").on("click",function(){ + $("#ulactioncontainer > ul > li > a.addrecord").on("click",function(){ addRecord('[% biblionumber | html %]'); return false; }); - $(".cartRemove").on("click",function(){ + $("#ulactioncontainer > ul > li > a.cartRemove").on("click",function(){ delSingleRecord('[% biblionumber | html %]'); return false; }); -- 2.11.0