From a328b170702efc3c66af8598d91b75f4afccd06b Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Fri, 4 Oct 2013 16:13:20 +1300 Subject: [PATCH] [PASSED QA] 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? Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- .../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 26f945c..3da453b 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'; } } }); @@ -332,7 +332,7 @@ function verify_images() { [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonCoverImages ) %]
- [% END %] + [% END %] [% ELSE %]

[% title |html %]

@@ -396,7 +396,7 @@ function verify_images() {
[% IF ( AmazonCoverImages ) %]
-
[% END %] +[% END %]
    @@ -813,7 +813,7 @@ function verify_images() { [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]

    Editions

    -[% FOREACH XISBN IN XISBNS %][% IF ( AmazonCoverImages ) %][% END %] +[% FOREACH XISBN IN XISBNS %][% IF ( AmazonCoverImages ) %][% END %] [% UNLESS ( item_level_itypes ) %][% END %] [% END %]
    [% IF ( noItemTypeImages ) %][% XISBN.description %][% ELSE %][% XISBN.description %][% END %][% XISBN.title |html %] by [% XISBN.author %] ©[% XISBN.copyrightdate %] [% IF ( XISBN.publishercode ) %] 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 84206fe..b05172c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -19,9 +19,9 @@ function verify_images() { 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'; } } }); @@ -441,7 +441,7 @@ var holdForPatron = function () { - + -- 1.7.10.4