@@ -, +, @@ HTTPS. --- .../intranet-tmpl/prog/en/css/staff-global.css | 11 ++++++ .../prog/en/includes/doc-head-close.inc | 7 ++++ koha-tmpl/intranet-tmpl/prog/en/js/amazonimages.js | 15 ++++++++ .../prog/en/modules/catalogue/detail.tt | 38 ++++++++++++++++---- .../prog/en/modules/catalogue/results.tt | 31 ++++++---------- .../bootstrap/en/modules/opac-opensearch.tt | 11 +++++- koha-tmpl/opac-tmpl/bootstrap/js/amazonimages.js | 13 +++---- 7 files changed, 92 insertions(+), 34 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/js/amazonimages.js --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2273,6 +2273,17 @@ div.authorizedheading { display: inline; } +span.no-image { + background-color : #FFF; + border: 1px solid #979797; + color : #AAA; + display:block; + font-size : 86%; + font-weight : bold; + text-align : center; + width : 75px; +} + #hierarchies a { font-weight: normal; text-decoration: underline; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -56,3 +56,10 @@ var NO_LOCAL_JACKET = _("No cover image available"); //]]> [% END %] +[% IF ( AmazonCoverImages ) %] + + +[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/js/amazonimages.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/amazonimages.js @@ -0,0 +1,15 @@ +// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html +function verify_images() { + $("img").each(function(i){ + if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0) + || (this.src.indexOf('syndetics.com') >=0) || (this.src.indexOf('images-na.ssl-images-amazon.com') >= 0)) { + w = this.width; + h = this.height; + if ((w == 1) || (h == 1)) { + $(this).parent().html(""+NO_AMAZON_IMAGE+""); + } else if ((this.complete != null) && (!this.complete)) { + $(this).parent().html(""+NO_AMAZON_IMAGE+""); + } + } + }); +} --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -42,13 +42,14 @@ function verify_images() { } }); $("#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'))) { + 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') >= 0)) { w = this.width; 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+""); } } }); @@ -349,7 +350,6 @@ function verify_images() { [% IF ( XSLTDetailsDisplay ) %] [% XSLTBloc %] - [% IF ( GetShelves ) %] Lists that include this title: [% FOREACH GetShelve IN GetShelves %] @@ -374,7 +374,13 @@ function verify_images() { [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonCoverImages ) %]
- [% END %] + + [% IF ( using_https ) %] + + [% ELSE %] + + [% END %] + [% END %] [% ELSE %]

[% title |html %]

@@ -438,7 +444,14 @@ function verify_images() {
[% IF ( AmazonCoverImages ) %]
-
[% END %] + + [% IF ( using_https ) %] + + [% ELSE %] + + [% END %] + +[% END %]