7161 Followup for indentation openlibrary.js
Only whitespace changes to fix indentation after tab removal. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
12e6aedf54
commit
deb444401a
|
|
@ -30,42 +30,37 @@ KOHA.OpenLibrary = {
|
|||
"&callback=KOHA.OpenLibrary.olCallBack&jscmd=data");
|
||||
scriptElement.setAttribute("type", "text/javascript");
|
||||
document.documentElement.firstChild.appendChild(scriptElement);
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Add cover pages <div
|
||||
* and link to preview if div id is gbs-thumbnail-preview
|
||||
*/
|
||||
olCallBack: function(booksInfo) {
|
||||
for (id in booksInfo) {
|
||||
var book = booksInfo[id];
|
||||
var isbn = id.substring(5);
|
||||
$("."+isbn).each(function() {
|
||||
var is_opacdetail = /openlibrary-thumbnail-preview/.exec($(this).attr("id"));
|
||||
var a = document.createElement("a");
|
||||
a.href = booksInfo.url;
|
||||
if (book.cover) {
|
||||
var img = document.createElement("img");
|
||||
if (is_opacdetail) {
|
||||
img.src = book.cover.medium;
|
||||
$(this).append(img);
|
||||
$(this).append(
|
||||
'<div class="results_summary">' + '<a href="' + book.url + '">Preview</a></div>'
|
||||
);
|
||||
} else {
|
||||
img.src = book.cover.small;
|
||||
$(this).append(img);
|
||||
for (id in booksInfo) {
|
||||
var book = booksInfo[id];
|
||||
var isbn = id.substring(5);
|
||||
$("."+isbn).each(function() {
|
||||
var is_opacdetail = /openlibrary-thumbnail-preview/.exec($(this).attr("id"));
|
||||
var a = document.createElement("a");
|
||||
a.href = booksInfo.url;
|
||||
if (book.cover) {
|
||||
var img = document.createElement("img");
|
||||
if (is_opacdetail) {
|
||||
img.src = book.cover.medium;
|
||||
$(this).append(img);
|
||||
$(this).append('<div class="results_summary">' + '<a href="' + book.url + '">Preview</a></div>');
|
||||
} else {
|
||||
img.src = book.cover.small;
|
||||
$(this).append(img);
|
||||
}
|
||||
} else {
|
||||
var message = document.createElement("span");
|
||||
$(message).attr("class","no-image");
|
||||
$(message).html(NO_OL_JACKET);
|
||||
$(this).append(message);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
var message = document.createElement("span");
|
||||
$(message).attr("class","no-image");
|
||||
$(message).html(NO_OL_JACKET);
|
||||
$(this).append(message);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue