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 189-197
function verify_images() {
Link Here
|
189 |
[% END %] |
192 |
[% END %] |
190 |
}); |
193 |
}); |
191 |
|
194 |
|
192 |
[% IF ( AmazonCoverImages ) %]$(window).load(function() { |
195 |
[% IF ( AmazonCoverImages || LocalCoverImages )%]$(window).load(function() { |
193 |
verify_images(); |
196 |
verify_images(); |
194 |
});[% END %] |
197 |
});[% END %] |
195 |
//]]> |
198 |
//]]> |
196 |
</script> |
199 |
</script> |
197 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
200 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
Lines 376-392
function verify_images() {
Link Here
|
376 |
<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 %]&viewas=html" title="MARC" class="previewMARC">Show</a></span> |
379 |
<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 %]&viewas=html" title="MARC" class="previewMARC">Show</a></span> |
377 |
[% 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 %] |
380 |
[% 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 %] |
378 |
|
381 |
|
379 |
[% IF ( ( AmazonEnabled && AmazonCoverImages ) || LocalCoverImages ) %] |
382 |
[% IF ( AmazonCoverImages || LocalCoverImages ) %] |
380 |
</div><div class="yui-u" id="bookcoverimg"> |
383 |
</div><div class="yui-u" id="bookcoverimg"> |
381 |
[% IF ( LocalCoverImages ) %]<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>[% END %] |
384 |
[% IF ( LocalCoverImages ) %] |
382 |
[% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]<div id="bookcoverimg"> |
385 |
<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div> |
383 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
386 |
[% END %] |
|
|
387 |
[% IF ( AmazonCoverImages ) %] |
388 |
<div id="amazon-bookcoverimg"> |
389 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
384 |
[% IF ( using_https ) %] |
390 |
[% IF ( using_https ) %] |
385 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
391 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
386 |
[% ELSE %] |
392 |
[% ELSE %] |
387 |
<img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
393 |
<img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
388 |
[% END %] |
394 |
[% END %] |
389 |
</a></div>[% END %][% END %] |
395 |
</a></div> |
|
|
396 |
[% END %] |
390 |
[% END %] |
397 |
[% END %] |
391 |
[% ELSE %] |
398 |
[% ELSE %] |
392 |
|
399 |
|
Lines 450-459
function verify_images() {
Link Here
|
450 |
</ul> |
457 |
</ul> |
451 |
</div> |
458 |
</div> |
452 |
|
459 |
|
453 |
[% IF ( ( AmazonEnabled && AmazonCoverImages ) || LocalCoverImages ) %] |
460 |
[% IF ( AmazonCoverImages || LocalCoverImages ) %] |
454 |
<div class="yui-u" id="bookcoverimg"> |
461 |
<div class="yui-u" id="bookcoverimg"> |
455 |
[% IF ( LocalCoverImages ) %]<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>[% END %] |
462 |
[% IF ( LocalCoverImages ) %] |
456 |
[% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]<div id="bookcoverimg"> |
463 |
<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div> |
|
|
464 |
[% END %] |
465 |
[% IF ( AmazonCoverImages ) %] |
466 |
<div id="amazon-bookcoverimg"> |
457 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
467 |
<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> |
458 |
[% IF ( using_https ) %] |
468 |
[% IF ( using_https ) %] |
459 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
469 |
<img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> |
Lines 462-468
function verify_images() {
Link Here
|
462 |
[% END %] |
472 |
[% END %] |
463 |
</a> |
473 |
</a> |
464 |
</div> |
474 |
</div> |
465 |
[% END %][% END %] |
475 |
[% END %] |
466 |
</div> |
476 |
</div> |
467 |
[% END %] |
477 |
[% END %] |
468 |
|
478 |
|
469 |
- |
|
|