@@ -, +, @@ modified: koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js modified: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt --- koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js | 5 +- .../prog/en/modules/catalogue/detail.tt | 54 ++++++++++++-------- .../prog/en/modules/catalogue/results.tt | 2 +- 3 files changed, 35 insertions(+), 26 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js @@ -28,11 +28,10 @@ KOHA.LocalCover = { var img = $("").attr('src', '/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) .load(function () { - if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { + if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth <= 1) { //IE HACK try { - $(mydiv).append(img); - $(mydiv).children('.no-image').remove(); + $(mydiv).remove(); } catch(err){ } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -28,19 +28,22 @@ //= 0) || (this.src.indexOf('g-images.amazon.com') >=0) || (this.src.indexOf('images-na.ssl-images-amazon.com'))) { - w = this.width; - h = this.height; - if ((w == 1) || (h == 1)) { - $("#bookcoverimg").remove(); - $(".yui-gb").attr("class","yui-g"); - } else if ((this.complete != null) && (!this.complete)) { - $("#bookcoverimg").remove(); - $(".yui-gb").attr("class","yui-g"); + w = this.width; + h = this.height; + if ((w == 1) || (h == 1)) { + $("#amazon-bookcoverimg").remove(); + $(".yui-gb").attr("class","yui-g"); + } else if ((this.complete != null) && (!this.complete)) { + $("#amazon-bookcoverimg").remove(); + $(".yui-gb").attr("class","yui-g"); + } } - } }); + if( $(this).find('img').length < 1 ) $(this).remove(); + }); $("#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'))) { w = this.width; @@ -189,7 +192,7 @@ function verify_images() { }); }); - [% IF ( AmazonCoverImages ) %]$(window).load(function() { + [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() { verify_images(); });[% END %] //]]> @@ -376,17 +379,21 @@ function verify_images() { MARC Preview: Show [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] - [% IF ( ( AmazonEnabled && AmazonCoverImages ) || LocalCoverImages ) %] + [% IF ( AmazonCoverImages || LocalCoverImages ) %]