From 7b53a7fef584eedf3f134c6442a3a7de3bf8f00a Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 4 Apr 2023 21:50:39 +0000 Subject: [PATCH] Bug 32412: Empty coce container before appending image To test: 1. Apply patch and clear browser cache 2. Turn on Coce for the OPAC. 3. OPACShelfBrowser must be on 4. Find a record that returns a cover image and open it's detail page. 5. Use the next/previous navigation links in the OPACShelfBrowser 6. Notice that no extra image is being added to the biblio-cover-slider. 7. Make sure that Coce images still load correctly in on the OPAC detail page, OPAC results page, and in the shelf browser. Signed-off-by: Andrew Auld Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit fec0bd18ae1e982232bf5b5d7d000c2bc6984589) Signed-off-by: Martin Renvoize --- koha-tmpl/opac-tmpl/bootstrap/js/coce.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/coce.js b/koha-tmpl/opac-tmpl/bootstrap/js/coce.js index c8829aeb98..65772380dd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/coce.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/coce.js @@ -40,7 +40,7 @@ KOHA.coce = { } }; $(this).attr('href', url); - $(this).append(img); + $(this).empty().append(img); }); } }, -- 2.39.2