Bug 10309: (follow-up) apply another follow-up for 10856, improve shelf browser

This patch adapts a patch by Julian Maurice to prevent the main
cover image from getting duplicated if the shelf browser
is used.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2013-10-14 23:23:44 +00:00
parent 266305d488
commit b16cc61e8b
3 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,7 @@ KOHA.Google = {
if (typeof(book.thumbnail_url) != "undefined") {
var img = document.createElement("img");
img.src = book.thumbnail_url;
$(this).append(img);
$(this).empty().append(img);
var re = /^gbs-thumbnail-preview/;
if ( re.exec($(this).attr("id")) ) {
$(this).append(
@ -67,7 +67,7 @@ KOHA.Google = {
var message = document.createElement("span");
$(message).attr("class","no-image");
$(message).html(NO_GOOGLE_JACKET);
$(this).append(message);
$(this).empty().append(message);
}
});
}

View File

@ -39,9 +39,9 @@ KOHA.LocalCover = {
if (uselink) {
var a = $("<a />").attr('href', '/cgi-bin/koha/opac-imageviewer.pl?biblionumber=' + $(mydiv).attr("class"));
$(a).append(img);
$(mydiv).append(a);
$(mydiv).empty().append(a);
} else {
$(mydiv).append(img);
$(mydiv).empty().append(img);
}
$(mydiv).children('.no-image').remove();
}

View File

@ -48,7 +48,7 @@ KOHA.OpenLibrary = {
var img = document.createElement("img");
if (is_opacdetail) {
img.src = book.cover.medium;
$(this).append(img);
$(this).empty().append(img);
$(this).append('<div class="results_summary">' + '<a href="' + book.url + '">Preview</a></div>');
} else {
img.src = book.cover.medium;