Main Koha release repository https://koha-community.org
Find a file
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 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl 2023-01-31 11:02:21 -03:00
admin Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
api Bug 30642: Make renewal_type an enum in spec and add test 2023-02-10 11:08:00 -03:00
authorities
basket Bug 16522: (follow-up) MARC display templates and get_marc_host fixes 2023-01-30 12:10:11 -03:00
bin
C4 Bug 30642: Make renewal_type an enum in spec and add test 2023-02-10 11:08:00 -03:00
catalogue Bug 20256: Use new methods 2023-02-02 11:59:26 -03:00
cataloguing Bug 32816: Fix cataloguing/value_builder/cn_browser.pl 2023-02-20 09:54:15 -03:00
circ Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
clubs
course_reserves Bug 20256: Use new methods 2023-02-02 11:59:26 -03:00
debian Update debian/control file: 22.12.00-3 on deb9 (1b6e9c7b) 2023-02-20 09:44:13 -03:00
docs
erm Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
errors
etc Bug 32612: (QA follow-up) Remove superfluous line 2023-02-03 10:30:03 -03:00
ill
installer Bug 30642: Fix dbrev permissions 2023-02-14 09:41:47 -03:00
Koha Bug 30642: (follow-up) Change sql and adapt for translations 2023-02-10 11:07:58 -03:00
koha-tmpl Bug 32307: Fix gallery when Coce is enabled 2023-02-20 09:54:16 -03:00
labels
lib/CGI/Session/Serialize
members Bug 31095: Remove GetDebarments from members/memberentry.pl 2023-01-31 10:19:36 -03:00
misc Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
offline_circ
opac Bug 23247: Use EmbedItems in opac-MARCdetail.pl 2023-02-20 09:44:15 -03:00
patron_lists
patroncards
plugins
pos
recalls
reports Bug 32588: Make filters on 'items with no checkouts' report translatable 2023-01-31 10:59:33 -03:00
reserve Bug 32909: Load item type icons from the correct path 2023-02-15 09:21:20 -03:00
reviews
rotating_collections
serials Bug 29608: Made so doesn't require full permission 2022-09-07 13:49:53 -07:00
services
skel
suggestion Bug 32531: Restore behaviour of 'include archived' filter 2023-01-05 09:22:58 -03:00
svc Bug 15869: Change framework on overlay 2023-02-07 10:32:22 -03:00
t Bug 32979: Skip test if running as root 2023-02-20 09:44:16 -03:00
tags
tmp/modified_authorities
tools Bug 15869: (QA follow-up) Don't pass placeholder framework '_USE_ORIG' 2023-02-07 10:32:23 -03:00
virtualshelves Bug 16522: (follow-up) MARC display templates and get_marc_host fixes 2023-01-30 12:10:11 -03:00
xt Bug 32741: Regression tests 2023-02-02 11:59:26 -03:00
.editorconfig
.eslintrc.json
.gitignore Bug 32609: Add compiled css files to gitignore 2023-02-10 11:07:52 -03:00
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap
.perlcriticrc
.proverc.dist
.stylelintrc.json
about.pl Bug 30808: Add support for version codenames 2022-11-25 15:20:00 -03:00
app.psgi
build-resources.PL Bug 32609: Use the current yarn.lock to generate node_modules 2023-02-10 11:07:57 -03:00
changelanguage.pl
cpanfile Bug 32673: Remove misc/load_testing/ scripts 2023-02-03 10:30:07 -03:00
cypress.json
fix-perl-path.PL
gulpfile.js Bug 32609: Improve yarn build commands 2023-02-10 11:07:51 -03:00
help.pl
INSTALL
Koha.pm Bug 30642: DBRev 22.12.00.004 2023-02-10 12:47:15 -03:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl
Makefile.PL Bug 32609: (follow-up) enhance Makefile.PL 2023-02-10 11:07:56 -03:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
package.json Bug 32975: Error in package.json's definition of css:build vs css:build:prod 2023-02-20 09:44:07 -03:00
README
README.md
README.robots
rewrite-config.PL
tsconfig.json
webpack.config.js
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo