Bugzilla – Attachment 28270 Details for
Bug 11602
Fix localcover display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add a class to local thumbnails and don't show 1px no-image-found
0001-BUG-11602-ENH-Fix-localcover-display.patch (text/plain), 1.67 KB, created by
Nicholas van Oudtshoorn
on 2014-05-15 05:40:06 UTC
(
hide
)
Description:
Add a class to local thumbnails and don't show 1px no-image-found
Filename:
MIME Type:
Creator:
Nicholas van Oudtshoorn
Created:
2014-05-15 05:40:06 UTC
Size:
1.67 KB
patch
obsolete
>From 14e07b31e7291fe634d6949799c770d16376adef Mon Sep 17 00:00:00 2001 >From: Nicholas van Oudtshoorn <vanoudt@gmail.com> >Date: Thu, 15 May 2014 13:27:48 +0800 >Subject: [PATCH] BUG 11602 [ENH] - Fix localcover display Adds a css class of > thumbnail to local covers Don't show the 1px "No image found" image (since > we'll ususally try another image provider) >Content-Type: text/plain; charset="utf-8" > >--- > koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js b/koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js >index 7bd7ae2..d407ef6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js >@@ -27,6 +27,7 @@ KOHA.LocalCover = { > var img = $("<img />").attr('src', > '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) > .load(function () { >+ this.setAttribute("class", "thumbnail"); > if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { > //IE HACK > try { >@@ -35,7 +36,7 @@ KOHA.LocalCover = { > } > catch(err){ > }; >- } else { >+ } else if (this.width > 1) { // don't show the silly 1px "no image" img > if (uselink) { > var a = $("<a />").attr('href', '/cgi-bin/koha/opac-imageviewer.pl?biblionumber=' + $(mydiv).attr("class")); > $(a).append(img); >-- >1.8.3.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 11602
:
28270
|
45347
|
45364