Bug 25016: Coce should not return a 1-pixel Amazon cover image
authorOwen Leonard <oleonard@myacpl.org>
Sun, 29 Mar 2020 00:19:39 +0000 (00:19 +0000)
committerJoy Nelson <joy@bywatersolutions.com>
Thu, 7 May 2020 21:07:54 +0000 (21:07 +0000)
commit55b5a0e1121ae72d635e89f110b1063e9fb2877b
tree6f64cfad47f826225451f0099a87ca2e2268903f
parentfe9fc8428101c13021f7e1386962b9d18095cffb
Bug 25016: Coce should not return a 1-pixel Amazon cover image

This patch adds an onload function to the JavaScript which loads images
from Coce. In the case where the image is 1 x 1 pixel the image should
be removed.

To test you should have Coce enabled and Amazon.com included in the list
of sources.

 - Apply the patch and view the bibliographic details page under a
  variety of conditions:
   - A title which has a matching Amazon image:
     - The image should load as expected.
   - A title which doesn't have a matching Amazon image
     - The image should not be found in the source at all after the page
       has loaded.
  - Test with local cover images enabled

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
koha-tmpl/intranet-tmpl/js/coce.js