1 if (typeof KOHA == "undefined" || !KOHA) {
6 * A namespace for local cover related functions.
13 * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail"></div>
15 * <div title="biblionumber" id="isbn" class="openlibrary-thumbnail-preview"></div>
16 * and run a search with all collected isbns to Open Library Book Search.
17 * The result is asynchronously returned by OpenLibrary and catched by
20 GetCoverFromBibnumber: function(uselink) {
21 $("div[id^=local-thumbnail],span[id^=local-thumbnail]").each(function(i) {
23 var message = document.createElement("span");
24 $(message).attr("class","no-image");
25 $(message).html(NO_LOCAL_JACKET);
26 $(mydiv).append(message);
27 var img = $("<img />").attr('src',
28 '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class"))
30 if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
34 $(mydiv).children('.no-image').remove();
40 var a = $("<a />").attr('href', '/cgi-bin/koha/opac-imageviewer.pl?biblionumber=' + $(mydiv).attr("class"));
46 $(mydiv).children('.no-image').remove();