Lines 164-169
Link Here
|
164 |
<div class="hint">Image from Adlibris</div> |
164 |
<div class="hint">Image from Adlibris</div> |
165 |
</div> |
165 |
</div> |
166 |
[% END %] |
166 |
[% END %] |
|
|
167 |
|
167 |
[% IF ( AmazonCoverImages && normalized_isbn) %] |
168 |
[% IF ( AmazonCoverImages && normalized_isbn) %] |
168 |
<div class="cover-image" id="amazon-bookcoverimg"> |
169 |
<div class="cover-image" id="amazon-bookcoverimg"> |
169 |
<a href="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"> |
170 |
<a href="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"> |
Lines 172-177
Link Here
|
172 |
<div class="hint">Image from Amazon.com</div> |
173 |
<div class="hint">Image from Amazon.com</div> |
173 |
</div> |
174 |
</div> |
174 |
[% END %] |
175 |
[% END %] |
|
|
176 |
|
175 |
[% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %] |
177 |
[% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %] |
176 |
[% coce_id = normalized_ean || normalized_isbn %] |
178 |
[% coce_id = normalized_ean || normalized_isbn %] |
177 |
<div class="cover-image" id="coce-coverimg"> |
179 |
<div class="cover-image" id="coce-coverimg"> |
Lines 936-943
Note that permanent location is a code, and location may be an authval.
Link Here
|
936 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
938 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
937 |
function verify_images() { |
939 |
function verify_images() { |
938 |
// Loop over each container in the template which contains covers |
940 |
// Loop over each container in the template which contains covers |
939 |
var coverSlides = $(".cover-image"); |
941 |
$(".cover-image").each( function( index ){ |
940 |
coverSlides.each( function( index ){ |
|
|
941 |
var div = $(this); |
942 |
var div = $(this); |
942 |
// Find the image in the container |
943 |
// Find the image in the container |
943 |
var img = div.find("img")[0]; |
944 |
var img = div.find("img")[0]; |
Lines 977-1000
Note that permanent location is a code, and location may be an authval.
Link Here
|
977 |
div.find(".hint").html(_("Coce image from Open Library")); |
978 |
div.find(".hint").html(_("Coce image from Open Library")); |
978 |
} |
979 |
} |
979 |
} |
980 |
} |
980 |
// If more that one slide is present, add a navigation link |
|
|
981 |
// for activating the slide |
982 |
if( coverSlides.length > 1 ){ |
983 |
var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>"); |
984 |
if( index == 0 ){ |
985 |
// Set the first navigation link as active |
986 |
$(covernav).addClass("nav-active"); |
987 |
} |
988 |
$(covernav).html("<i class=\"fa fa-circle\"></i>"); |
989 |
$("#cover-slides").addClass("cover-slides").append( covernav ); |
990 |
} |
991 |
} |
981 |
} |
992 |
} |
982 |
} |
993 |
}); |
983 |
}); |
994 |
if( $(".cover-image").length < 2 ){ |
984 |
|
995 |
/* Don't show controls for switching between covers if there is only 1 */ |
985 |
var coverSlides = $(".cover-image"); |
996 |
$(".cover-nav").remove(); |
986 |
if( coverSlides.length > 1 ){ |
|
|
987 |
coverSlides.each(function( index ){ |
988 |
// If more that one slide is present, add a navigation link |
989 |
// for activating the slide |
990 |
var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>"); |
991 |
if( index == 0 ){ |
992 |
// Set the first navigation link as active |
993 |
$(covernav).addClass("nav-active"); |
994 |
} |
995 |
$(covernav).html("<i class=\"fa fa-circle\"></i>"); |
996 |
$("#cover-slides").addClass("cover-slides").append( covernav ); |
997 |
|
998 |
}); |
997 |
} |
999 |
} |
|
|
1000 |
|
998 |
if( $(".cover-image:visible").length < 1 ){ |
1001 |
if( $(".cover-image:visible").length < 1 ){ |
999 |
$("#cover-slides").remove(); |
1002 |
$("#cover-slides").remove(); |
1000 |
} |
1003 |
} |
1001 |
- |
|
|