Bugzilla – Attachment 103065 Details for
Bug 25007
AmazonCoverImages doesnt check for ISBN in details.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25007: (follow-up) Fix the way image check alters layout
Bug-25007-follow-up-Fix-the-way-image-check-alters.patch (text/plain), 2.60 KB, created by
Jonathan Druart
on 2020-04-16 09:45:36 UTC
(
hide
)
Description:
Bug 25007: (follow-up) Fix the way image check alters layout
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-16 09:45:36 UTC
Size:
2.60 KB
patch
obsolete
>From 232c726f2d6299af80240588e2d37c709a652588 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Sat, 28 Mar 2020 17:42:50 +0000 >Subject: [PATCH] Bug 25007: (follow-up) Fix the way image check alters layout > >A question in the bug report asks: Why is is necessary to change the >Bootstrap class to col-xs-12? The JavaScript which checks for the >existence of an Amazon cover image is designed to remove the Amazon >cover's container if there is none. Changing the class of >cover image column is gone. > >However, the check is incorrect because it doesn't account for Local >Covers. There might be both a 1 x 1 pixel Amazon image and a local cover >image, so the layout shouldn't be changed unless there are no images >present. > >To test, apply the patch and view the bibliographic details page of >various titles including: >- Amazon cover present, no local cover >- No Amazon cover, local cover image present >- Both Amazon and local cover image > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 2b5fb56200..1091b50059 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -908,14 +908,15 @@ Note that permanent location is a code, and location may be an authval. > h = this.height; > if ((w == 1) || (h == 1)) { > $("#amazon-bookcoverimg").remove(); >- $("#catalogue_detail_biblio").attr("class","col-xs-12"); > } else if ((this.complete != null) && (!this.complete)) { > $("#amazon-bookcoverimg").remove(); >- $("#catalogue_detail_biblio").attr("class","col-xs-12"); > } > } > }); >- if( $(this).find('img').length < 1 ) $(this).remove(); >+ if( $(this).find('img').length < 1 ){ >+ $(this).remove(); >+ $("#catalogue_detail_biblio").attr("class","col-xs-12"); >+ } > }); > $("#editions img").each(function(i){ > if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0) || (this.src.indexOf('images-na.ssl-images-amazon.com'))) { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25007
:
102018
|
102054
|
102056
|
102057
|
102060
|
102061
|
102062
|
102063
|
103034
|
103035
|
103036
|
103064
| 103065