Bugzilla – Attachment 145472 Details for
Bug 32642
Loading spinner always visible when cover image is short (OPAC)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32642: Loading spinner always visible when cover image is short (OPAC)
Bug32642-Loading-spinner-always-visible-when-cover.patch (text/plain), 2.43 KB, created by
Hammat wele
on 2023-01-19 13:04:41 UTC
(
hide
)
Description:
Bug 32642: Loading spinner always visible when cover image is short (OPAC)
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2023-01-19 13:04:41 UTC
Size:
2.43 KB
patch
obsolete
>From a2c6de8a8fc3a0e39e912a6d0a51befbaeb3a1ac Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Thu, 19 Jan 2023 13:03:38 +0000 >Subject: [PATCH] =?UTF-8?q?Bug=C2=A032642:=20Loading=20spinner=20always=20?= > =?UTF-8?q?visible=20when=20cover=20image=20is=20short=20(OPAC)?= >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded. > >this patch remove the spinner when the image is loaded,. > >To test: >1. Make sure the OPACLocalCoverImages system preference is enabled > 1.1. Go to Administration > Global system preferences > 1.2. Search for Coverimages > 1.3. Set OPACLocalCoverImages to 'Show' > 1.4. Click 'Save all Enhanced content preferences' >2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test) > 2.1. Download the attached image > 2.2. Find a record without an image > 2.3. Click the 'Images' tab > 2.4. Click 'Upload' > 2.5. Click 'Drop files here or click to select a file' and choose the downloaded image > 2.6. Click 'Process images' >3. View the record in the OPAC > 3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface > 3.2. Click on 'OPAC view: Open in new window.' > --> Note that the image is displayed normally, but the spinner is also displayed >4. Apply the patch >5. View the record in the OPAC > --> Note that the spinner is no more displayed >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index e97198aed4..cb559539c7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1663,6 +1663,10 @@ > > $(window).load(function() { > wait_for_images(verify_cover_images); >+ var image = document.querySelector('.cover-image img'); >+ if(image.complete && image.naturalHeight!== 0){ >+ $(".cover-slider").removeClass("cover-slides"); >+ } > }); > > $(document).ready(function() { >-- >2.34.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 32642
:
145334
|
145472
|
145473
|
145976
|
148658
|
148661
|
148762
|
149247
|
149249
|
149250
|
149251
|
150022
|
150023