Bug 10856: Fix cover display in shelf browser
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> I was able to reproduce the problem with local covers and the patch fixes it in my tests. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
ff7b4d4aa3
commit
117f8a5ccc
4 changed files with 23 additions and 5 deletions
|
@ -100,6 +100,15 @@
|
|||
},
|
||||
success: function(data){
|
||||
$("#shelfbrowser").replaceWith(data);
|
||||
[% IF ( GoogleJackets ) %]
|
||||
KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);
|
||||
[% END %]
|
||||
[% IF OpenLibraryCovers %]
|
||||
KOHA.OpenLibrary.GetCoverFromIsbn();
|
||||
[% END %]
|
||||
[% IF OPACLocalCoverImages %]
|
||||
KOHA.LocalCover.GetCoverFromBibnumber(true);
|
||||
[% END %]
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -115,6 +124,15 @@
|
|||
},
|
||||
success: function(data){
|
||||
$("#shelfbrowser").replaceWith(data);
|
||||
[% IF ( GoogleJackets ) %]
|
||||
KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);
|
||||
[% END %]
|
||||
[% IF OpenLibraryCovers %]
|
||||
KOHA.OpenLibrary.GetCoverFromIsbn();
|
||||
[% END %]
|
||||
[% IF OPACLocalCoverImages %]
|
||||
KOHA.LocalCover.GetCoverFromBibnumber(true);
|
||||
[% END %]
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue