Bugzilla – Attachment 50497 Details for
Bug 13597
Amazon 'no image' element needs a 'no-image' class, in the staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13597 - Amazon 'no image' element needs a 'no-image' class, in the staff client
Bug-13597---Amazon-no-image-element-needs-a-no-ima.patch (text/plain), 2.22 KB, created by
Marc Véron
on 2016-04-21 09:54:11 UTC
(
hide
)
Description:
Bug 13597 - Amazon 'no image' element needs a 'no-image' class, in the staff client
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-04-21 09:54:11 UTC
Size:
2.22 KB
patch
obsolete
>From dab6192d14ab4ee93085973a73fcff0628e019a1 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Thu, 21 Apr 2016 12:40:26 +1200 >Subject: [PATCH] Bug 13597 - Amazon 'no image' element needs a 'no-image' > class, in the staff client >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >to test patch... > >1/ go to staff client > >2/ add following CSS to 'IntranetUserCSS' syspref, to hide images... > span.no-image { > display: none; > } > >3/ do a search that returns 'no image' results... > observe that 'no image' images are still displaying :( > >4/ apply patch > >5/ repeat step 2/ > observe that 'no image' images are not displaying :) > >Works as advertised. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 0e77646..d7c0ac3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -22,7 +22,9 @@ > var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); > var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold."); > var q_array = new Array(); // will hold search terms, if present >+ > [% IF ( AmazonCoverImages ) %] >+var NO_AMAZON_IMAGE = _("No cover image available"); > // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html > function verify_images() { > $("img").each(function(i){ >@@ -31,8 +33,10 @@ function verify_images() { > h = this.height; > if ((w == 1) || (h == 1)) { > this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; >+ $(this).parent().html("<span class=\"no-image\">"+NO_AMAZON_IMAGE+"</span>"); > } else if ((this.complete != null) && (!this.complete)) { > this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; >+ $(this).parent().html("<span class=\"no-image\">"+NO_AMAZON_IMAGE+"</span>"); > } > } > }); >-- >1.7.10.4
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 13597
:
35396
|
50487
|
50488
|
50497
|
91140
|
91367
|
91398