Bugzilla – Attachment 137995 Details for
Bug 31217
Fix Coce JavaScript to hide single-pixel cover images in the OPAC lightbox gallery
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31217: OPAC coce.js is not hiding the coce-coverimg div for single-pixel images
Bug-31217-OPAC-cocejs-is-not-hiding-the-coce-cover.patch (text/plain), 1.61 KB, created by
Alex Buckley
on 2022-07-21 22:02:25 UTC
(
hide
)
Description:
Bug 31217: OPAC coce.js is not hiding the coce-coverimg div for single-pixel images
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2022-07-21 22:02:25 UTC
Size:
1.61 KB
patch
obsolete
>From df03bde38f45d9c1623987c8d094c95136286e7b Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 22 Jul 2022 09:50:16 +1200 >Subject: [PATCH] Bug 31217: OPAC coce.js is not hiding the coce-coverimg div > for single-pixel images > >This is because OPAC coce.js targets coce-coverimg as a class, when it is >actually an ID. > >Test plan: >1. Set: >- CoceHost = https://coce.mykoha.co.nz >- CoceProviders = Select all >- OpacCoce = Enable > >2. Add the ISBN of '9780262336499' to a biblio > >3. View the biblio in the OPAC. Observe an empty 'Coce image from >Amazon.com' box loads > >4. Apply patch and restart services > >5. Reload the same biblio record in the OPAC. Observe the empty 'Coce >image from Amazon.com' is not displayed > >Sponsored-by: Toi Ohomai Institute of Technology, New Zealand >--- > 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 090059ba92..f31a8b48f0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/coce.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/coce.js >@@ -36,7 +36,7 @@ KOHA.coce = { > img.onload = function() { > // image dimensions can't be known until image has loaded > if (img.height == 1 && img.width == 1) { >- $(this).closest(".coce-coverimg").remove(); >+ $(this).closest("#coce-coverimg").remove(); > } > }; > $(this).attr('href', url); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31217
:
137995
|
138070
|
138111
|
138192
|
138198
|
139218
|
139344