Bugzilla – Attachment 186842 Details for
Bug 32542
Coce images not appearing in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32542: Add 'wait_for_images' to results.js'
Bug-32542-Add-waitforimages-to-resultsjs.patch (text/plain), 1.49 KB, created by
Nick Clemens (kidclamp)
on 2025-09-23 19:02:18 UTC
(
hide
)
Description:
Bug 32542: Add 'wait_for_images' to results.js'
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-09-23 19:02:18 UTC
Size:
1.49 KB
patch
obsolete
>From 62e93c5970a879c963db0a0b1775022306915d23 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 23 Sep 2025 19:02:03 +0000 >Subject: [PATCH] Bug 32542: Add 'wait_for_images' to results.js' > >--- > .../intranet-tmpl/prog/js/pages/results.js | 32 +++++++++++++++++-- > 1 file changed, 29 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >index cfe0cd88ba8..a4a50903351 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >@@ -130,9 +130,35 @@ function verify_cover_images() { > }); > } > >-$(window).load(function () { >- verify_cover_images(); >-}); >+if (PREF_IntranetCoce && PREF_CoceProviders) { >+ let counter_wait = 0; >+ function wait_for_images(cb){ >+ >+ var loaded = 1; >+ counter_wait++; >+ >+ if ( loaded ) { >+ loaded = KOHA.coce.done; >+ } >+ >+ if (!loaded && counter_wait < 50) {// Do not wait more than 5 seconds >+ window.setTimeout(function(){wait_for_images(cb);}, 100); >+ } else { >+ if (counter_wait >= 50 ) { >+ console.log("Could not retrieve the images") >+ } >+ cb(); >+ } >+ } >+ >+ $(window).load(function() { >+ wait_for_images(verify_cover_images); >+ }); >+} else { >+ $(window).load(function() { >+ verify_cover_images(); >+ }); >+} > > var toHighlight = {}; > var q_array; >-- >2.39.5
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 32542
: 186842