From 57d48e62fdece29ae0d09c628e24919703cb479f Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Fri, 4 Oct 2013 16:13:20 +1300 Subject: [PATCH] Bug 10944 - Mixed content warnings for covers on staff client This switches the URLs used to access Amazon's cover images to the SSL image server, preventing warnings when using this on a secure site. To test: * Enable Amazon images in the sysprefs, all other cover images off. * Do a search in the staff client. Using firebug or similar, inspect the images that indicate both "no image found" and the covers. * Are they all https, and showing correctly? --- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 14 +++++++------- .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index d5a006b..09c44d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -27,7 +27,7 @@ // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html function verify_images() { $("#bookcoverimg img").each(function(i){ - if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) { + 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; h = this.height; if ((w == 1) || (h == 1)) { @@ -40,13 +40,13 @@ function verify_images() { } }); $("#editions img").each(function(i){ - if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) { + 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; h = this.height; if ((w == 1) || (h == 1)) { - this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; + this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; } else if ((this.complete != null) && (!this.complete)) { - this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; + this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; } } }); @@ -246,7 +246,7 @@ function verify_images() { [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonCoverImages ) %]
- [% END %] + [% END %] [% ELSE %]

[% title |html %]

@@ -310,7 +310,7 @@ function verify_images() {
[% IF ( AmazonCoverImages ) %]
-
[% END %] +[% END %]