From dab6192d14ab4ee93085973a73fcff0628e019a1 Mon Sep 17 00:00:00 2001 From: Mason James 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 --- 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(""+NO_AMAZON_IMAGE+""); } 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(""+NO_AMAZON_IMAGE+""); } } }); -- 1.7.10.4