Bug 28180 - Use a lightbox gallery to display the images on the detail pages in OPAC
Summary: Use a lightbox gallery to display the images on the detail pages in OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 7187 7709 (view as bug list)
Depends on: 28179 29200
Blocks: 31207 29803 31217 31446 35633
  Show dependency treegraph
 
Reported: 2021-04-20 14:10 UTC by Jonathan Druart
Modified: 2024-05-27 03:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement to the OPAC enables the display of multiple cover images on the detail page for a record or items in a gallery.
Version(s) released in:
21.11.00
Circulation function:


Attachments
Bug 28180: Add Chocolat to OPAC (43.89 KB, patch)
2021-04-20 15:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (29.00 KB, patch)
2021-04-20 15:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (2.90 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.58 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.57 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.08 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.11 KB, patch)
2021-04-20 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add Chocolat to OPAC (43.23 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (29.09 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (2.96 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.65 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.64 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.15 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.17 KB, patch)
2021-05-04 12:18 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28180: Add Chocolat to OPAC (44.05 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (29.17 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (3.05 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.74 KB, patch)
2021-05-04 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.73 KB, patch)
2021-05-04 13:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.24 KB, patch)
2021-05-04 13:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.27 KB, patch)
2021-05-04 13:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: (follow-up) Remove console.log (1.12 KB, patch)
2021-05-10 07:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Restore NO_LOCAL_JACKET (989 bytes, patch)
2021-05-10 07:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: (follow-up) Updates to styling of lightbox controls (22.88 KB, patch)
2021-05-10 18:27 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28180: (follow-up) Updates to styling of lightbox controls (22.94 KB, patch)
2021-07-12 14:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: CSS changes (754.85 KB, patch)
2021-07-12 14:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: CSS changes (755.69 KB, patch)
2021-07-26 07:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix collision with existing verify_images (5.23 KB, patch)
2021-08-11 12:44 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix some non-translatable strings (2.29 KB, patch)
2021-08-11 12:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix collision with existing verify_images (4.56 KB, patch)
2021-08-11 13:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Correctly guess if images have been loaded (3.62 KB, patch)
2021-08-11 14:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix bug with AdLibris (2.04 KB, patch)
2021-09-12 22:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix bug with AdLibris (1.98 KB, patch)
2021-10-03 10:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Correctly guess if images have been loaded (760.79 KB, patch)
2021-10-11 12:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix bug with AdLibris (2.07 KB, patch)
2021-10-11 12:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add Chocolat to OPAC (44.05 KB, patch)
2021-10-19 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (28.20 KB, patch)
2021-10-19 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (3.05 KB, patch)
2021-10-19 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.74 KB, patch)
2021-10-19 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.73 KB, patch)
2021-10-19 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.24 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.27 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: (follow-up) Remove console.log (1.12 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Restore NO_LOCAL_JACKET (989 bytes, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: (follow-up) Updates to styling of lightbox controls (22.94 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix some non-translatable strings (2.29 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix collision with existing verify_images (4.56 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Correctly guess if images have been loaded (760.79 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Fix bug with first image does not exist (2.20 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Remove adlibris conflict (1.36 KB, patch)
2021-10-19 14:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28180: Add Chocolat to OPAC (43.38 KB, patch)
2021-10-20 20:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface (28.28 KB, patch)
2021-10-20 20:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Syndetics (3.11 KB, patch)
2021-10-20 20:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Google Jackets (5.80 KB, patch)
2021-10-20 20:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust OpenLibrary (4.79 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Reintroduce and adjust Baker and Taylor (3.30 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock (1.33 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: (follow-up) Remove console.log (1.18 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Restore NO_LOCAL_JACKET (1.02 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: (follow-up) Updates to styling of lightbox controls (23.01 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Fix some non-translatable strings (2.34 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Fix collision with existing verify_images (4.61 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Correctly guess if images have been loaded (760.86 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Fix bug with first image does not exist (2.25 KB, patch)
2021-10-20 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28180: Remove adlibris conflict (1.42 KB, patch)
2021-10-20 20:43 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-04-20 14:10:15 UTC

    
Comment 1 Jonathan Druart 2021-04-20 15:07:54 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2021-04-20 15:07:59 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2021-04-20 15:08:03 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2021-04-20 15:08:07 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2021-04-20 15:08:14 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2021-04-20 15:08:19 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2021-04-20 15:08:24 UTC Comment hidden (obsolete)
Comment 8 PTFS Europe Sandboxes 2021-05-04 12:18:14 UTC Comment hidden (obsolete)
Comment 9 PTFS Europe Sandboxes 2021-05-04 12:18:19 UTC Comment hidden (obsolete)
Comment 10 PTFS Europe Sandboxes 2021-05-04 12:18:23 UTC Comment hidden (obsolete)
Comment 11 PTFS Europe Sandboxes 2021-05-04 12:18:27 UTC Comment hidden (obsolete)
Comment 12 PTFS Europe Sandboxes 2021-05-04 12:18:31 UTC Comment hidden (obsolete)
Comment 13 PTFS Europe Sandboxes 2021-05-04 12:18:34 UTC Comment hidden (obsolete)
Comment 14 PTFS Europe Sandboxes 2021-05-04 12:18:38 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2021-05-04 13:39:44 UTC
Created attachment 120464 [details] [review]
Bug 28180: Add Chocolat to OPAC

See Bug 28179: Add the Chocolat gallery lightbox JS library

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 16 Jonathan Druart 2021-05-04 13:39:49 UTC
Created attachment 120465 [details] [review]
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface

This patch is the OPAC version of
  Bug 28179: Add a lightbox gallery to display cover images - detail page, staff interface

But there were several difficulties as the staff and OPAC code diverged
a lot.
First we are going to apply the different enhancements that have been
made staff-side:
- Display all the local cover image on the bibliographic detail pages
(before this patch only the first one was displayed)
- The slider functionality added by bug 25031

Test plan:
All the cover images are affected, all the different sources will be
tested.
All the steps will be done on the same bibliographic record.
1. Local cover images
 a. Turn on OPACLocalCoverImages and AllowMultipleCover
 b. Add several local cover images to a bibliographic record
 c. Add several local cover images to an item
 d. Click on an image and confirm that it is displayed in a gallery and
 you can navigate see all the images attached to the bibliographic
 record
 e. Same for items
2. Adlibris
 a. Turn on AdlibrisCoversEnabled
 b. Edit the biliographic record and add an ISBN that will return a
 cover image for this service (9780670026623 for instance)
 c. Display the cover images in the gallery
 d. Note the link to the adlibris.com website at the bottom
3. Amazon
 a. Turn on OPACAmazonCoverImages
 b. Display the cover images in the gallery
4. Coce
 a. Turn on OpacCoce, set CoceHost to "http://coce.tamil.fr:8080"
 and select some values for CoceProviders.
 b. Display the cover images in the gallery
5. Custom cover images
 a. Turn on OPACCustomCoverImages and set CustomCoverImagesURL to https://covers.openlibrary.org/b/isbn/{isbn}-M.jpg
 of anything else meaningful
 b. Display the cover images in the gallery

QA Note: Other sources have been removed by this patch but will be
re-added by follow-ups

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 17 Jonathan Druart 2021-05-04 13:39:53 UTC
Created attachment 120466 [details] [review]
Bug 28180: Reintroduce and adjust Syndetics

Test plan:
1. Enable SyndeticsEnabled and SyndeticsCoverImages
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 18 Jonathan Druart 2021-05-04 13:39:57 UTC
Created attachment 120467 [details] [review]
Bug 28180: Reintroduce and adjust Google Jackets

Test plan:
1. Turn on GoogleJackets
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 19 Jonathan Druart 2021-05-04 13:40:01 UTC
Created attachment 120468 [details] [review]
Bug 28180: Reintroduce and adjust OpenLibrary

1. Turn on OpenLibraryCovers
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 20 Jonathan Druart 2021-05-04 13:40:06 UTC
Created attachment 120469 [details] [review]
Bug 28180: Reintroduce and adjust Baker and Taylor

Test plan:
1. Turn on BakerTaylorEnabled and fill BakerTaylorUsername/BakerTaylorPassword (if you don't have, ask me)
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 21 Jonathan Druart 2021-05-04 13:40:10 UTC
Created attachment 120470 [details] [review]
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock

Found a bug and ended up with this solution, suggestions welcomed!

example with OpenLibrary with isbn=9780670026623, the image is a bit
higher than others and then the cover-nav buttons are on top of
.contentblock and cannot be clicked

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 22 Jonathan Druart 2021-05-04 13:41:10 UTC
Signed-off-by patches attached on behalf of the sponsor.
The sandbox's signoff process picked the name of the creator of the sandbox instead of the one filled in on the signoff form.

Also, the status has not been adjusted.
Comment 23 Katrin Fischer 2021-05-09 11:34:29 UTC
I am seeing a failure in the QA script, can you please check:

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
   OK	  filters
   FAIL	  forbidden patterns
		forbidden pattern: console.log (line 1754)

Also and more importantly, with this patch covers on result list are broken:

Uncaught ReferenceError: NO_LOCAL_JACKET is not defined
    GetCoverFromBibnumber http://localhost:8080/opac-tmpl/bootstrap/js/localcovers_20.1200047.js:25
    jQuery 2
    GetCoverFromBibnumber http://localhost:8080/opac-tmpl/bootstrap/js/localcovers_20.1200047.js:21
    <anonymous> http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=perl&weight_search=1:3137
    jQuery 2
Comment 24 Jonathan Druart 2021-05-10 07:16:21 UTC
Created attachment 120753 [details] [review]
Bug 28180: (follow-up) Remove console.log
Comment 25 Jonathan Druart 2021-05-10 07:16:26 UTC
Created attachment 120754 [details] [review]
Bug 28180: Restore NO_LOCAL_JACKET

This is a patch to squash. No idea what it got removed previously
Comment 26 Jonathan Druart 2021-05-10 07:17:06 UTC
(In reply to Katrin Fischer from comment #23)

Both fixed!
Comment 27 Owen Leonard 2021-05-10 18:27:40 UTC
Created attachment 120805 [details] [review]
Bug 28180: (follow-up) Updates to styling of lightbox controls

This patch adds style changes like the ones made in Bug 28179. It also
addresses a bug with the way the verify_images() function was firing.
I've moved the function outside of document.ready() and added a call to
it on window load, consistent with how it works in the staff client.

I've removed a redundant call to verify_images() from the footer include
file, opac-bottom.inc.

The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.
Comment 28 Jonathan Druart 2021-07-12 14:22:43 UTC
Created attachment 122783 [details] [review]
Bug 28180: (follow-up) Updates to styling of lightbox controls

This patch adds style changes like the ones made in Bug 28179. It also
addresses a bug with the way the verify_images() function was firing.
I've moved the function outside of document.ready() and added a call to
it on window load, consistent with how it works in the staff client.

I've removed a redundant call to verify_images() from the footer include
file, opac-bottom.inc.

The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 29 Jonathan Druart 2021-07-12 14:22:49 UTC
Created attachment 122784 [details] [review]
Bug 28180: CSS changes
Comment 30 Jonathan Druart 2021-07-12 14:23:16 UTC
Your follow-up is working great, Owen. Thanks!
Comment 31 Katrin Fischer 2021-07-24 23:16:40 UTC
Can you please fix the conflicts?

Using index info to reconstruct a base tree...
M	koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css
M	koha-tmpl/opac-tmpl/bootstrap/css/opac.css
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/opac.css
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/opac.css
Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css
error: Failed to merge in the changes.
Patch failed at 0001 Bug 28180: CSS changes
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Comment 32 Jonathan Druart 2021-07-26 07:31:00 UTC
(In reply to Katrin Fischer from comment #31)
> Can you please fix the conflicts?

> CONFLICT (content): Merge conflict in
> koha-tmpl/opac-tmpl/bootstrap/css/opac.css
> CONFLICT (content): Merge conflict in
> koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css

Those are conflicts on the "Compiled CSS patch". The patch can be skipped and the patch regenerated with "yarn build && yarn build --view=opac"
Comment 33 Jonathan Druart 2021-07-26 07:31:27 UTC
Created attachment 123178 [details] [review]
Bug 28180: CSS changes
Comment 34 Katrin Fischer 2021-07-26 07:33:59 UTC
You are right, I was a little too fast. But why include them in the first place?
Comment 35 Jonathan Druart 2021-07-26 08:36:46 UTC
(In reply to Katrin Fischer from comment #34)
> You are right, I was a little too fast. But why include them in the first
> place?

To ease testing, especially for sandboxes.
Comment 36 Katrin Fischer 2021-07-26 09:28:37 UTC
(In reply to Jonathan Druart from comment #35)
> (In reply to Katrin Fischer from comment #34)
> > You are right, I was a little too fast. But why include them in the first
> > place?
> 
> To ease testing, especially for sandboxes.

You can now do the yarn build bit on the sandboxes, but of course not everybody might know that. I was more thinking about the conflicts causing problems there. There is always something that can go wrong I guess :) I shoudl have taken a better look here at the conflict anyway.
Comment 37 Katrin Fischer 2021-08-11 09:58:22 UTC
I believe there might be some problematic constructions for translation in the JavaScript, but need to investigate further:

lightbox_descriptions.push("Custom cover image");
lightbox_descriptions.push(_("Image from Google Books (<a href='%s'>see the original image</a>)").format($(img).data('link')));
Comment 38 Katrin Fischer 2021-08-11 09:59:00 UTC
One more:
img.alt = "Cover image";
Comment 39 Katrin Fischer 2021-08-11 10:18:54 UTC
There is something weird, if multiple cover providers are activated:

- Turn on OpenLibrary covers
- Turn on Amazon covers
- Search for "perl"
- Most books will show 2 covers in results and in the detail pages
- Example: CGI programming with Perl
- Turn on Google covers
- Result list shows 3
- Detail page: only Amazon
Comment 40 Katrin Fischer 2021-08-11 10:22:15 UTC
(In reply to Katrin Fischer from comment #37)
> I believe there might be some problematic constructions for translation in
> the JavaScript, but need to investigate further:
> 
> lightbox_descriptions.push("Custom cover image");
> lightbox_descriptions.push(_("Image from Google Books (<a href='%s'>see the
> original image</a>)").format($(img).data('link')));

They appear to work, at least seeing the strings in the po file.
Comment 41 Katrin Fischer 2021-08-11 10:45:14 UTC
Please check comment#39.

Also:

1) Link to source

At the bottom of the lightbox view it says:

[provider] cover image (see the original image)

I wonder if we could make it clearer here that we are linking to the provider's page as this is an external link where you will leave the library's website. And it won't only be the image you get to.

Maybe something along the lines of:
(see the original image on the [provider]'s website)

A native speaker might come up with a better wording :)
Comment 42 Jonathan Druart 2021-08-11 12:00:38 UTC Comment hidden (obsolete)
Comment 43 Jonathan Druart 2021-08-11 12:44:40 UTC Comment hidden (obsolete)
Comment 44 Jonathan Druart 2021-08-11 12:47:27 UTC
Created attachment 123792 [details] [review]
Bug 28180: Fix some non-translatable strings
Comment 45 Jonathan Druart 2021-08-11 13:07:33 UTC
Created attachment 123793 [details] [review]
Bug 28180: Fix collision with existing verify_images

At the OPAC we already had a verify_images JS function in amazonimages.js
It's preferable to use another function name.
This patch replace our verify_images with verify_cover_images and apply
the change to the staff code as well.
Comment 46 Jonathan Druart 2021-08-11 13:41:04 UTC
It's a problem in master as well (staff-side) and highlighted at the OPAC as we have more images coming from external providers.

The code to hide the non-existent images does not work as we expect.
In my case, a new laptop (faster) make the problem more obvious, the JS code is processed faster than before and we remove the div that contain images from amazon, google, etc. because the images are not loaded yet.

I think we should fix that on a separate bug report to fix the staff side at the same time. And obviously this new enhancement won't be pushed until it's fixed.

You can continue testing with the following (non optimal) patch:

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 03f41fe8317..93b3c682f61 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
@@ -1620,7 +1620,7 @@
                             }
                         }
                     } else {
-                        div.remove();
+                        //div.remove();
                     }
                 });
Comment 47 Jonathan Druart 2021-08-11 14:37:41 UTC
Created attachment 123794 [details] [review]
Bug 28180: Correctly guess if images have been loaded

window.load won't assure us that the images loaded using JS code are
correctly loaded.

This patch adds a flag to the different providers when the images are
fully loaded.
Comment 48 Jonathan Druart 2021-08-11 14:38:04 UTC
I think this patch is the way to go.
Comment 49 Jonathan Druart 2021-09-08 10:03:39 UTC
Patches still apply, CSS changes need to be rebuilt with `yarn build --view=opac`
Comment 50 Katrin Fischer 2021-09-12 15:13:18 UTC
Patches still apply, but something has been broken since my last test run.

What I did so far:

- Made sure master was current
- restart_all, ran database updates
- Applied patches, no conflicts
- restart_all again
- yarn build --view opac


1) Turned on Adlibris covers.

Instead of the covers, only a link shows in the result list and detail pages.

2) Additionally activated Google covers.

The covers show, but not within the lightbox display.

3) Added Amazon covers

Now I see up to 2 covers, but next to each other, still no lightbox.


Did a patch get lost here? :(
Comment 51 Katrin Fischer 2021-09-12 21:30:14 UTC
Hm, I later realized that this was not meant to change results, but only the detail page. Previous comments apply to the results list.

On the detail page for me none of the 3 mentioned cover services covers show :(

Example: search for "perl" > Programming Perl
- 2 covers and the adlibris link on results
- no cover at all on detail page

Switch back to master, git stash, restart_all:
- Adlibris still broken on results
- covers show on results and detail page
Comment 52 Jonathan Druart 2021-09-12 22:09:25 UTC
Created attachment 124819 [details] [review]
Bug 28180: Fix bug with AdLibris

If Adlibris is first and there is no image
Comment 53 Jonathan Druart 2021-09-12 22:13:10 UTC
Hi Katrin, thanks!
You found a bug in a very specific combination. AdLibris is loaded first but there is no image there (is the service broken currently?).
The code copied from staff is broken. As we have much more cover services OPAC side the bugs are easier to catch.
I think this last patch is improving the situation but I cannot guarantee it will always work.
To be honest I've always tested with local cover images (as it's why this enhancement has been sponsored), and it was always working when a cover image is attached.
Comment 54 Jonathan Druart 2021-10-03 10:08:22 UTC
Created attachment 125666 [details] [review]
Bug 28180: Fix bug with AdLibris

If Adlibris is first and there is no image
Comment 55 Katrin Fischer 2021-10-10 10:37:16 UTC
Finally back to this.
Comment 56 Katrin Fischer 2021-10-10 11:21:39 UTC
I am very sorry, but I think I found another inconsistency:

CustomCoverImages
LocalCoverImages
AllowMultipleCovers 
GoogleJackets

1) On the results page: CustomCover (a random image url), local cover and Google cover.
2) Switch to detail page: Only custom and local cover show.
3) Reload page with F5: Google cover appears.

Same test plan applies to results without a local cover.
Comment 57 Katrin Fischer 2021-10-10 11:23:28 UTC
Same behaviour when using the "next" button for navigating between the results, initial page load is always without the Google cover. Requires an explicit refresh.
Comment 58 Jonathan Druart 2021-10-11 07:37:42 UTC
Hi Katrin, I don't recreate the problem you have.
I've create a sandbox with your settings: https://opac-bz28180.sandboxes.biblibre.eu/cgi-bin/koha/opac-search.pl?idx=&q=perl&weight_search=1
"Perl DBI" has a local cover image (biblionumber=13).
Comment 59 Jonathan Druart 2021-10-11 07:42:14 UTC
What you describe make me think the JS cache was not cleared.
With this change we have a problem when there is no custom image (for instance), as we don't longer test the height of the images. When the custom image won't exist, the cover slider will display an empty slide for the custom image. But this won't be easy to fix (we cannot have the previous patch "Bug 28180: Fix bug with AdLibris" AND keep the current behavior). It works for the staff interface because we don't have all those services, but the code is not working correctly for OPAC. I would not consider it a blocker.

But what you describe is not expected.
Comment 60 Katrin Fischer 2021-10-11 09:06:49 UTC
I am not sure I fully understand your comment, but I think this is a real regression that will get unhappy comments. Google images are supposedly widely used and they disappear from the detail pages now :(

In my test case there always was a custom image - do you mean local? It happened for the record with the local image too - I had 3 shown in results and only 2 missing Google) in the detail page. So not sure that's the issue.
Comment 61 Jonathan Druart 2021-10-11 12:52:44 UTC
Created attachment 126041 [details] [review]
Bug 28180: Correctly guess if images have been loaded

window.load won't assure us that the images loaded using JS code are
correctly loaded.

This patch adds a flag to the different providers when the images are
fully loaded.

Note that the img.naturalHeight check is not working for google jackets
and is actually not needed (test with a bib record with and without
google jacket and confirm that it's working as expected).
Comment 62 Jonathan Druart 2021-10-11 12:52:49 UTC
Created attachment 126042 [details] [review]
Bug 28180: Fix bug with AdLibris

If Adlibris is first and there is no image
Comment 63 Jonathan Druart 2021-10-11 12:58:34 UTC
(In reply to Katrin Fischer from comment #60)
> I am not sure I fully understand your comment, but I think this is a real
> regression that will get unhappy comments. Google images are supposedly
> widely used and they disappear from the detail pages now :(
> 
> In my test case there always was a custom image - do you mean local? It
> happened for the record with the local image too - I had 3 shown in results
> and only 2 missing Google) in the detail page. So not sure that's the issue.

I did recreate on Firefox, not chrome (usually using Firefox, but the cache didn't want to clear correctly this morning when I tried).
That should be fixed now!
Comment 64 Jonathan Druart 2021-10-19 14:45:38 UTC
Created attachment 126506 [details] [review]
Bug 28180: Add Chocolat to OPAC

See Bug 28179: Add the Chocolat gallery lightbox JS library

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 65 Jonathan Druart 2021-10-19 14:45:42 UTC
Created attachment 126507 [details] [review]
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface

This patch is the OPAC version of
  Bug 28179: Add a lightbox gallery to display cover images - detail page, staff interface

But there were several difficulties as the staff and OPAC code diverged
a lot.
First we are going to apply the different enhancements that have been
made staff-side:
- Display all the local cover image on the bibliographic detail pages
(before this patch only the first one was displayed)
- The slider functionality added by bug 25031

Test plan:
All the cover images are affected, all the different sources will be
tested.
All the steps will be done on the same bibliographic record.
1. Local cover images
 a. Turn on OPACLocalCoverImages and AllowMultipleCover
 b. Add several local cover images to a bibliographic record
 c. Add several local cover images to an item
 d. Click on an image and confirm that it is displayed in a gallery and
 you can navigate see all the images attached to the bibliographic
 record
 e. Same for items
2. Adlibris
 a. Turn on AdlibrisCoversEnabled
 b. Edit the biliographic record and add an ISBN that will return a
 cover image for this service (9780670026623 for instance)
 c. Display the cover images in the gallery
 d. Note the link to the adlibris.com website at the bottom
3. Amazon
 a. Turn on OPACAmazonCoverImages
 b. Display the cover images in the gallery
4. Coce
 a. Turn on OpacCoce, set CoceHost to "http://coce.tamil.fr:8080"
 and select some values for CoceProviders.
 b. Display the cover images in the gallery
5. Custom cover images
 a. Turn on OPACCustomCoverImages and set CustomCoverImagesURL to https://covers.openlibrary.org/b/isbn/{isbn}-M.jpg
 of anything else meaningful
 b. Display the cover images in the gallery

QA Note: Other sources have been removed by this patch but will be
re-added by follow-ups

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 66 Jonathan Druart 2021-10-19 14:45:48 UTC
Created attachment 126508 [details] [review]
Bug 28180: Reintroduce and adjust Syndetics

Test plan:
1. Enable SyndeticsEnabled and SyndeticsCoverImages
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 67 Jonathan Druart 2021-10-19 14:45:53 UTC
Created attachment 126509 [details] [review]
Bug 28180: Reintroduce and adjust Google Jackets

Test plan:
1. Turn on GoogleJackets
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 68 Jonathan Druart 2021-10-19 14:45:58 UTC
Created attachment 126510 [details] [review]
Bug 28180: Reintroduce and adjust OpenLibrary

1. Turn on OpenLibraryCovers
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 69 Jonathan Druart 2021-10-19 14:46:02 UTC
Created attachment 126511 [details] [review]
Bug 28180: Reintroduce and adjust Baker and Taylor

Test plan:
1. Turn on BakerTaylorEnabled and fill BakerTaylorUsername/BakerTaylorPassword (if you don't have, ask me)
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 70 Jonathan Druart 2021-10-19 14:46:07 UTC
Created attachment 126512 [details] [review]
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock

Found a bug and ended up with this solution, suggestions welcomed!

example with OpenLibrary with isbn=9780670026623, the image is a bit
higher than others and then the cover-nav buttons are on top of
.contentblock and cannot be clicked

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>
Comment 71 Jonathan Druart 2021-10-19 14:46:13 UTC
Created attachment 126513 [details] [review]
Bug 28180: (follow-up) Remove console.log
Comment 72 Jonathan Druart 2021-10-19 14:46:18 UTC
Created attachment 126514 [details] [review]
Bug 28180: Restore NO_LOCAL_JACKET

This is a patch to squash. No idea what it got removed previously
Comment 73 Jonathan Druart 2021-10-19 14:46:23 UTC
Created attachment 126515 [details] [review]
Bug 28180: (follow-up) Updates to styling of lightbox controls

This patch adds style changes like the ones made in Bug 28179. It also
addresses a bug with the way the verify_images() function was firing.
I've moved the function outside of document.ready() and added a call to
it on window load, consistent with how it works in the staff client.

I've removed a redundant call to verify_images() from the footer include
file, opac-bottom.inc.

The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 74 Jonathan Druart 2021-10-19 14:46:28 UTC
Created attachment 126516 [details] [review]
Bug 28180: Fix some non-translatable strings
Comment 75 Jonathan Druart 2021-10-19 14:46:33 UTC
Created attachment 126517 [details] [review]
Bug 28180: Fix collision with existing verify_images

At the OPAC we already had a verify_images JS function in amazonimages.js
It's preferable to use another function name.
This patch replace our verify_images with verify_cover_images and apply
the change to the staff code as well.
Comment 76 Jonathan Druart 2021-10-19 14:46:40 UTC
Created attachment 126518 [details] [review]
Bug 28180: Correctly guess if images have been loaded

window.load won't assure us that the images loaded using JS code are
correctly loaded.

This patch adds a flag to the different providers when the images are
fully loaded.

Note that the img.naturalHeight check is not working for google jackets
and is actually not needed (test with a bib record with and without
google jacket and confirm that it's working as expected).
Comment 77 Jonathan Druart 2021-10-19 14:46:46 UTC
Created attachment 126519 [details] [review]
Bug 28180: Fix bug with first image does not exist

This was first written for Adlibris, before its removal from the
codebase.
But this patch maybe still be useful for other services (if first and no image).
Comment 78 Jonathan Druart 2021-10-19 14:46:50 UTC
Created attachment 126520 [details] [review]
Bug 28180: Remove adlibris conflict

Can be squashed when pushed
Comment 79 Jonathan Druart 2021-10-19 14:47:15 UTC
Rebased on top of bug 29200.
Comment 80 Katrin Fischer 2021-10-20 20:41:42 UTC
Created attachment 126596 [details] [review]
Bug 28180: Add Chocolat to OPAC

See Bug 28179: Add the Chocolat gallery lightbox JS library

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 81 Katrin Fischer 2021-10-20 20:41:48 UTC
Created attachment 126597 [details] [review]
Bug 28180: Add a lightbox gallery to display cover images - detail page, OPAC interface

This patch is the OPAC version of
  Bug 28179: Add a lightbox gallery to display cover images - detail page, staff interface

But there were several difficulties as the staff and OPAC code diverged
a lot.
First we are going to apply the different enhancements that have been
made staff-side:
- Display all the local cover image on the bibliographic detail pages
(before this patch only the first one was displayed)
- The slider functionality added by bug 25031

Test plan:
All the cover images are affected, all the different sources will be
tested.
All the steps will be done on the same bibliographic record.
1. Local cover images
 a. Turn on OPACLocalCoverImages and AllowMultipleCover
 b. Add several local cover images to a bibliographic record
 c. Add several local cover images to an item
 d. Click on an image and confirm that it is displayed in a gallery and
 you can navigate see all the images attached to the bibliographic
 record
 e. Same for items
2. Adlibris
 a. Turn on AdlibrisCoversEnabled
 b. Edit the biliographic record and add an ISBN that will return a
 cover image for this service (9780670026623 for instance)
 c. Display the cover images in the gallery
 d. Note the link to the adlibris.com website at the bottom
3. Amazon
 a. Turn on OPACAmazonCoverImages
 b. Display the cover images in the gallery
4. Coce
 a. Turn on OpacCoce, set CoceHost to "http://coce.tamil.fr:8080"
 and select some values for CoceProviders.
 b. Display the cover images in the gallery
5. Custom cover images
 a. Turn on OPACCustomCoverImages and set CustomCoverImagesURL to https://covers.openlibrary.org/b/isbn/{isbn}-M.jpg
 of anything else meaningful
 b. Display the cover images in the gallery

QA Note: Other sources have been removed by this patch but will be
re-added by follow-ups

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 82 Katrin Fischer 2021-10-20 20:41:54 UTC
Created attachment 126598 [details] [review]
Bug 28180: Reintroduce and adjust Syndetics

Test plan:
1. Enable SyndeticsEnabled and SyndeticsCoverImages
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 83 Katrin Fischer 2021-10-20 20:41:59 UTC
Created attachment 126599 [details] [review]
Bug 28180: Reintroduce and adjust Google Jackets

Test plan:
1. Turn on GoogleJackets
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 84 Katrin Fischer 2021-10-20 20:42:04 UTC
Created attachment 126600 [details] [review]
Bug 28180: Reintroduce and adjust OpenLibrary

1. Turn on OpenLibraryCovers
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 85 Katrin Fischer 2021-10-20 20:42:11 UTC
Created attachment 126601 [details] [review]
Bug 28180: Reintroduce and adjust Baker and Taylor

Test plan:
1. Turn on BakerTaylorEnabled and fill BakerTaylorUsername/BakerTaylorPassword (if you don't have, ask me)
2. Display the cover images in the gallery

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 86 Katrin Fischer 2021-10-20 20:42:18 UTC
Created attachment 126602 [details] [review]
Bug 28180: Bug fix - cannot select cover-nav button when on top of the .contentblock

Found a bug and ended up with this solution, suggestions welcomed!

example with OpenLibrary with isbn=9780670026623, the image is a bit
higher than others and then the cover-nav buttons are on top of
.contentblock and cannot be clicked

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Rasmus Leißner <rasmus.leissner@solutions-factory.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 87 Katrin Fischer 2021-10-20 20:42:23 UTC
Created attachment 126603 [details] [review]
Bug 28180: (follow-up) Remove console.log

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 88 Katrin Fischer 2021-10-20 20:42:29 UTC
Created attachment 126604 [details] [review]
Bug 28180: Restore NO_LOCAL_JACKET

This is a patch to squash. No idea what it got removed previously

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 89 Katrin Fischer 2021-10-20 20:42:34 UTC
Created attachment 126605 [details] [review]
Bug 28180: (follow-up) Updates to styling of lightbox controls

This patch adds style changes like the ones made in Bug 28179. It also
addresses a bug with the way the verify_images() function was firing.
I've moved the function outside of document.ready() and added a call to
it on window load, consistent with how it works in the staff client.

I've removed a redundant call to verify_images() from the footer include
file, opac-bottom.inc.

The cosmetic changes replace the Chocolat image icons with new SVG
assets based on Bootstrap Icons (https://icons.getbootstrap.com/). The
color changes I think help the controls to be more visible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 90 Katrin Fischer 2021-10-20 20:42:39 UTC
Created attachment 126606 [details] [review]
Bug 28180: Fix some non-translatable strings

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 91 Katrin Fischer 2021-10-20 20:42:44 UTC
Created attachment 126607 [details] [review]
Bug 28180: Fix collision with existing verify_images

At the OPAC we already had a verify_images JS function in amazonimages.js
It's preferable to use another function name.
This patch replace our verify_images with verify_cover_images and apply
the change to the staff code as well.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 92 Katrin Fischer 2021-10-20 20:42:52 UTC
Created attachment 126608 [details] [review]
Bug 28180: Correctly guess if images have been loaded

window.load won't assure us that the images loaded using JS code are
correctly loaded.

This patch adds a flag to the different providers when the images are
fully loaded.

Note that the img.naturalHeight check is not working for google jackets
and is actually not needed (test with a bib record with and without
google jacket and confirm that it's working as expected).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 93 Katrin Fischer 2021-10-20 20:42:58 UTC
Created attachment 126609 [details] [review]
Bug 28180: Fix bug with first image does not exist

This was first written for Adlibris, before its removal from the
codebase.
But this patch maybe still be useful for other services (if first and no image).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 94 Katrin Fischer 2021-10-20 20:43:07 UTC
Created attachment 126610 [details] [review]
Bug 28180: Remove adlibris conflict

Can be squashed when pushed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 95 Jonathan Druart 2021-10-21 10:24:51 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 96 Katrin Fischer 2021-11-22 22:54:09 UTC
Maybe another candidate for 'new feature'?
Comment 97 David Cook 2022-08-22 02:50:11 UTC
*** Bug 7709 has been marked as a duplicate of this bug. ***
Comment 98 David Cook 2022-08-22 03:33:44 UTC
*** Bug 7187 has been marked as a duplicate of this bug. ***