Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Jonathan Druart fd6cbf2273
Bug 32307: Fix gallery when Coce is enabled
Bug 28179 added the gallery in the staff interface, and bug 28180 in the
OPAC.

OPAC and staff have different code, because the cover image providers
are different.
On bug 28180 we noticed that the OPAC needed additional code to handle
OpenLibrary, Google Jacket and Coce, to differ the creation of the
gallery to prevent Chocolat to be instantiated before the links (img src)
are effectively in the DOM.

To acchieve that we introduced a wait_for_images function, and added a
"done" flag to the 3 "JS modules".

However we haven't ported this code for the staff interface, which is
also using Coce.

Note that there was a bug at the OPAC as well for COCE, the ajax jQuery
function is async, and so 'done' was set even if the call was not
finished.

Test plan:
0. Do not apply this patch
1. Enable LocalCoverImages and IntranetCoce
2. Pick a bibliographic record with an image returned from Coce
3. Add a local cover image
4. Go to the detail page
5. Open the gallery
=> Notice that you can notice a JS error and a loading icon on the
second image. This behaviour is not always broken, it depends on the
speed of the Coce server. If you don't see the problem reload the page.
6. Apply the patch and repeat
=> Notice that the cover slider block is longer to display the icon, but
that the error is gone.
7. Confirm that there is no regression at the OPAC

We could improve the situation here, and we could display the images
in the slider, especially if the first image is a local image. But
that's for another bug...

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-20 09:54:16 -03:00
..
acqui Bug 32605: (follow-up) Additional fixes 2023-02-15 09:22:05 -03:00
admin Bug 31890: Add surname to PrefillGuaranteeField system pref 2023-02-20 09:44:18 -03:00
authorities Bug 29173: (QA follow-up) Match pop-over sizes 2023-02-09 10:21:23 -03:00
basket Bug 16522: (follow-up) Remove HTML links from email 2023-01-30 12:10:12 -03:00
batch Bug 29244: Add dialog class where missing in print-notices.tt 2021-10-21 12:24:04 +02:00
catalogue Bug 32307: Fix gallery when Coce is enabled 2023-02-20 09:54:16 -03:00
cataloguing Bug 32567: (QA follow-up) Fix some labelling inconsistencies 2023-02-07 15:30:32 -03:00
circ Bug 32788: Order curbside pickup slots chronologically 2023-02-07 15:31:40 -03:00
clubs Bug 32098: Consistent classes for primary buttons: Clubs and rotating collections 2022-11-14 09:34:39 -03:00
course_reserves Bug 20256: Use new methods 2023-02-02 11:59:26 -03:00
erm Bug 32147: Capitalization: E-Resource management 2022-11-16 08:46:20 -03:00
errors Bug 30952: (follow-up) Undo change to Home breadcrumb 2022-10-12 16:00:45 -03:00
ill Bug 32566: Don't show "ILL request log" when IllLog is disabled 2023-02-20 09:44:14 -03:00
installer Bug 27631: installer and onboarding folders 2022-04-20 09:03:37 -10:00
labels Bug 32238: Add page-section to label creator pages 2022-11-22 16:34:06 -03:00
mana
members Bug 31890: Add surname to PrefillGuaranteeField system pref 2023-02-20 09:44:18 -03:00
offline_circ Bug 32073: Consistent classes for primary buttons: Circulation 2022-11-10 14:47:02 -03:00
onboarding Bug 30718: (QA follow-up) KohaDates filter on inputs 2022-08-19 08:26:40 -03:00
patron_lists Bug 32099: Consistent classes for primary buttons: Assorted templates 2022-11-14 09:36:18 -03:00
patroncards Bug 32254: Add 'page-section' to various tools pages 2022-11-22 16:33:08 -03:00
plugins Bug 32644: Terminology: staff/intranet and biblio in plugins-home page 2023-01-31 09:39:07 -03:00
pos Bug 32409: Fix cashup searching with non latin-1 chars 2023-02-02 11:59:26 -03:00
recalls Bug 32688: Convert recalls awaiting pickup tabs to Bootstrap 2023-01-30 12:21:34 -03:00
reports Bug 32605: (follow-up) Additional fixes 2023-02-15 09:22:05 -03:00
reserve Bug 32099: Consistent classes for primary buttons: Assorted templates 2022-11-14 09:36:18 -03:00
reviews Bug 32182: Replace static tabs markup with Bootstrap 2022-11-16 09:35:14 -03:00
rotating_collections Bug 32098: Consistent classes for primary buttons: Clubs and rotating collections 2022-11-14 09:34:39 -03:00
serials Bug 32605: (follow-up) Additional fixes 2023-02-15 09:22:05 -03:00
services Bug 29496: (bug 27526 follow-up) Fix item form validation 2021-11-19 15:07:10 +01:00
suggestion Bug 32603: Suggester category in Suggestions management 2023-02-07 15:30:33 -03:00
tags Bug 31768: Add tools toolbar to tags page 2023-02-07 10:31:12 -03:00
test
tools Bug 30993: (QA follow-up) Add missing filter 2023-02-15 09:27:50 -03:00
virtualshelves Bug 16522: (follow-up) Remove HTML links from email 2023-01-30 12:10:12 -03:00
about.tt Bug 32609: Add warning to the about page 2023-02-10 11:07:54 -03:00
auth.tt Bug 32010: Make sure the alert will be displayed after the ajax call 2022-11-18 12:04:28 -03:00
intranet-main.tt Bug 26628: Fix access to clubs when user only has clubs permission 2023-01-31 10:50:52 -03:00