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 <andrew.auld@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2023-04-04 21:50:39 +00:00 committed by Tomas Cohen Arazi
parent 74497dbb5a
commit fec0bd18ae
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -40,7 +40,7 @@ KOHA.coce = {
}
};
$(this).attr('href', url);
$(this).append(img);
$(this).empty().append(img);
});
}
},