Bugzilla – Attachment 138112 Details for
Bug 31228
Fix Coce JavaScript to hide single-pixel cover images in both the staff client detail and results pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31228: Intraneyt coce.js is not hiding the coce-coverimg div for single-pixel images
Bug-31228-Intraneyt-cocejs-is-not-hiding-the-coce-.patch (text/plain), 3.20 KB, created by
Alex Buckley
on 2022-07-26 05:59:53 UTC
(
hide
)
Description:
Bug 31228: Intraneyt coce.js is not hiding the coce-coverimg div for single-pixel images
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2022-07-26 05:59:53 UTC
Size:
3.20 KB
patch
obsolete
>From f782476d230cdafd40e187ccb04e6f02eeb4ff19 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 25 Jul 2022 18:49:15 +0000 >Subject: [PATCH] Bug 31228: Intraneyt coce.js is not hiding the coce-coverimg > div for single-pixel images > >This is because the intranet detail.tt has coce-coverimg as an ID. Intranet results.tt has coce-coverimg as a class. Intranet coce.js targets coce-coverimg as a class. > >Intranet detail.tt should be changed to have coce-coverimg as a class. >This is inline with the change made to the OPAC in bug 31217 > >Test plan: >1. Set your system preferences: >- CoceHost = https://coce.mykoha.co.nz >- CoceProviders = Select all >- IntranetCoce = Enable > >2. Add the ISBN of '9780262336499' to a biblio > >3. Open a "Incognito" window in your browser (recommended to use Google >Chrome to test this) > >4. View the biblio detail page in the intranet. Observe a 'Coce image from >Amazon' box loads with a spinner > >5. Apply patch and restart services > >6. Clear your browser cache > >7. Reload the same biblio detail page in the intranet. Observe no image is >displayed. > >8. Do an intranet search to get the biblio returned in search results >page. Confirm no cover image box is displayed > >9. View the intranet search result and detail pages for a different >biblio that you know Coce should be displaying the cover image of and >confirm that it is correctly displayed with the source of that image listed: For >example 'Coce image from Amazon.com' is displayed > >Sponsored-by: Catalyst IT, New Zealand >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 14ac3460a4d..460f0c445db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -227,7 +227,7 @@ > > [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %] > [% coce_id = normalized_ean || normalized_isbn %] >- <div class="cover-image" id="coce-coverimg"> >+ <div class="cover-image coce-coverimg"> > [% IF ( coce_id ) %] > <a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a> > [% ELSE %] >@@ -1340,7 +1340,7 @@ Note that permanent location is a code, and location may be an authval. > } else if ( div.attr("id") == "syndetics-bookcoverimg" ){ > lightbox_descriptions.push(_("Syndetics cover image (<a href='%s'>see the original image</a>)").format($(img).data('link'))); > } >- else if( div.attr("id") == "coce-coverimg" ){ >+ else if( div.attr("class") == "cover-image coce-coverimg" ){ > // Identify which service's image is being loaded by Coce > var coce_description; > if( $(img).attr("src").indexOf('amazon.com') >= 0 ){ >-- >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 31228
:
138112
|
138113
|
138187
|
139095
|
139096
|
139217