Lines 28-46
Link Here
|
28 |
//<![CDATA[ |
28 |
//<![CDATA[ |
29 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
29 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
30 |
function verify_images() { |
30 |
function verify_images() { |
31 |
$("#bookcoverimg img").each(function(i){ |
31 |
$("#bookcoverimg").each(function(i){ |
32 |
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'))) { |
32 |
$(this).find('img').each(function(i){ |
33 |
w = this.width; |
33 |
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'))) { |
34 |
h = this.height; |
34 |
w = this.width; |
35 |
if ((w == 1) || (h == 1)) { |
35 |
h = this.height; |
36 |
$("#bookcoverimg").remove(); |
36 |
if ((w == 1) || (h == 1)) { |
37 |
$(".yui-gb").attr("class","yui-g"); |
37 |
$("#amazon-bookcoverimg").remove(); |
38 |
} else if ((this.complete != null) && (!this.complete)) { |
38 |
$(".yui-gb").attr("class","yui-g"); |
39 |
$("#bookcoverimg").remove(); |
39 |
} else if ((this.complete != null) && (!this.complete)) { |
40 |
$(".yui-gb").attr("class","yui-g"); |
40 |
$("#amazon-bookcoverimg").remove(); |
|
|
41 |
$(".yui-gb").attr("class","yui-g"); |
42 |
} |
41 |
} |
43 |
} |
42 |
} |
|
|
43 |
}); |
44 |
}); |
|
|
45 |
if( $(this).find('img').length < 1 ) $(this).remove(); |
46 |
}); |
44 |
$("#editions img").each(function(i){ |
47 |
$("#editions img").each(function(i){ |
45 |
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'))) { |
48 |
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'))) { |
46 |
w = this.width; |
49 |
w = this.width; |
Lines 180-188
function verify_images() {
Link Here
|
180 |
[% END %] |
183 |
[% END %] |
181 |
}); |
184 |
}); |
182 |
|
185 |
|
183 |
[% IF ( AmazonCoverImages ) %]$(window).load(function() { |
186 |
[% IF ( AmazonCoverImages || LocalCoverImages )%]$(window).load(function() { |
184 |
verify_images(); |
187 |
verify_images(); |
185 |
});[% END %] |
188 |
});[% END %] |
186 |
//]]> |
189 |
//]]> |
187 |
</script> |
190 |
</script> |
188 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
191 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
Lines 369-385
function verify_images() {
Link Here
|
369 |
<span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC Preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a></span> |
372 |
<span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC Preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a></span> |
370 |
[% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %] |
373 |
[% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %] |
371 |
|
374 |
|
372 |
[% IF ( ( AmazonEnabled && AmazonCoverImages ) || LocalCoverImages ) %] |
375 |
[% IF ( AmazonCoverImages || LocalCoverImages ) %] |
373 |
</div><div class="yui-u" id="bookcoverimg"> |
376 |
</div><div class="yui-u" id="bookcoverimg"> |
374 |
[% IF ( LocalCoverImages ) %]<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>[% END %] |
377 |
[% IF ( LocalCoverImages ) %] |
375 |
[% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]<div id="bookcoverimg"> |
378 |
<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div> |
376 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
379 |
[% END %] |
|
|
380 |
[% IF ( AmazonCoverImages ) %] |
381 |
<div id="amazon-bookcoverimg"> |
382 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
377 |
[% IF ( using_https ) %] |
383 |
[% IF ( using_https ) %] |
378 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
384 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
379 |
[% ELSE %] |
385 |
[% ELSE %] |
380 |
<img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
386 |
<img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
381 |
[% END %] |
387 |
[% END %] |
382 |
</a></div>[% END %][% END %] |
388 |
</a></div> |
|
|
389 |
[% END %] |
383 |
[% END %] |
390 |
[% END %] |
384 |
[% ELSE %] |
391 |
[% ELSE %] |
385 |
|
392 |
|
Lines 443-452
function verify_images() {
Link Here
|
443 |
</ul> |
450 |
</ul> |
444 |
</div> |
451 |
</div> |
445 |
|
452 |
|
446 |
[% IF ( ( AmazonEnabled && AmazonCoverImages ) || LocalCoverImages ) %] |
453 |
[% IF ( AmazonCoverImages || LocalCoverImages ) %] |
447 |
<div class="yui-u" id="bookcoverimg"> |
454 |
<div class="yui-u" id="bookcoverimg"> |
448 |
[% IF ( LocalCoverImages ) %]<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>[% END %] |
455 |
[% IF ( LocalCoverImages ) %] |
449 |
[% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]<div id="bookcoverimg"> |
456 |
<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div> |
|
|
457 |
[% END %] |
458 |
[% IF ( AmazonCoverImages ) %] |
459 |
<div id="amazon-bookcoverimg"> |
450 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
460 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
451 |
[% IF ( using_https ) %] |
461 |
[% IF ( using_https ) %] |
452 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
462 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
Lines 455-461
function verify_images() {
Link Here
|
455 |
[% END %] |
465 |
[% END %] |
456 |
</a> |
466 |
</a> |
457 |
</div> |
467 |
</div> |
458 |
[% END %][% END %] |
468 |
[% END %] |
459 |
</div> |
469 |
</div> |
460 |
[% END %] |
470 |
[% END %] |
461 |
|
471 |
|
462 |
- |
|
|