Summary: | Coce should not return a 1-pixel Amazon cover image | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | 1joynelson, david, jonathan.druart, lucas, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This patch improves the display of cover images where Coce is enabled and Amazon is a source. Where the image from Amazon is a 1x1 pixel placeholder (meaning Amazon has no image) it is no longer displayed.
|
|
Version(s) released in: |
20.05.00, 19.11.06
|
Circulation function: | |
Bug Depends on: | 25007 | ||
Bug Blocks: | 25031 | ||
Attachments: |
Bug 25016: Coce should not return a 1-pixel Amazon cover image
Bug 25016: Coce should not return a 1-pixel Amazon cover image Bug 25016: Coce should not return a 1-pixel Amazon cover image Bug 25016: Coce should not return a 1-pixel Amazon cover image |
Description
Owen Leonard
2020-03-28 21:06:07 UTC
Created attachment 102058 [details] [review] 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 Created attachment 103033 [details] [review] 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> 1. Should not we hide the green dot if there is only 1 image? 2. Clicking a blue dot (select another image), the scrollbar is hitting the top (preventDefault is missing?) 3. Without cover images, I see the border of #cover-slides, then disappears. Cannot we avoid that? Created attachment 103078 [details] [review] 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> Created attachment 103082 [details] [review] 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> Nice work everyone! Pushed to master for 20.05 backported to 19.11.x for 19.11.06 |