Bug 31040: jsTree image being used outside of jsTree plugin
This patch corrects OPAC templates which tried to use a jsTree image
asset which is missing following the jsTree upgrade (see Bug 11873).
Templates should use /images/spinner-small.gif instead.
To test, apply the patch and enable OpenLibrarySearch and populate
OverDrive and RecordedBooks preferences with credentials (they don't
have to be valid).
Perform a catalog search in the OPAC. When the search results page first
loads you should see messages about the services being queried:
Searching OpenLibrary...
Searching RecordedBoks...
Searching OverDrive...
Each should show a working "spinner" image while the queries are being
performed. If you have valid OverDrive credentials you can try clicking
through to the OverDrive search results page to confirm that the image
is working on that page too.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8f1f1cfd50
)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
3b6978259f
commit
8bb0df3a53
5 changed files with 7 additions and 7 deletions
|
@ -272,7 +272,7 @@
|
|||
|
||||
[% IF Koha.Preference('RecordedBooksClientSecret') && Koha.Preference('RecordedBooksLibraryID') %]
|
||||
<script>
|
||||
var SPINNER_THROBBER = "[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif";
|
||||
var SPINNER_THROBBER = "[% interface | html %]/[% theme | html %]/images/spinner-small.gif";
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
}
|
||||
|
||||
function search( offset ) {
|
||||
$( '#overdrive-status' ).html( _("Searching OverDrive...") + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></span>' );
|
||||
$( '#overdrive-status' ).html( _("Searching OverDrive...") + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></span>' );
|
||||
|
||||
KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", querystring, results_per_page, offset, function( data ) {
|
||||
if ( data.error ) {
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
var results_per_page = [% OPACnumSearchResults || 20 | html %];
|
||||
|
||||
function search( page ) {
|
||||
$( '#recordedbooks-status' ).html( MSG_SEARCHING.format("RecordedBooks") + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></span>' );
|
||||
$( '#recordedbooks-status' ).html( MSG_SEARCHING.format("RecordedBooks") + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></span>' );
|
||||
|
||||
KOHA.RecordedBooks.search( querystring, results_per_page, page, function( data ) {
|
||||
if ( data.error ) {
|
||||
|
|
|
@ -812,7 +812,7 @@
|
|||
});
|
||||
[% END # /IF OpacHighlightedWords %]
|
||||
[% IF ( OverDriveEnabled ) %]
|
||||
var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
|
||||
var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
|
||||
$( '#numresults' ) .after( $overdrive_results );
|
||||
//Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
|
||||
//as the overdrive API treats double quotes as a search term and returns extra results
|
||||
|
@ -833,7 +833,7 @@
|
|||
} );
|
||||
[% END # /IF OverDriveEnabled %]
|
||||
[% IF ( RecordedBooksEnabled ) %]
|
||||
var $recordedbooks_results = $( '<div id="recordedbooks-results">' + MSG_SEARCHING.format('RecordedBooks') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
|
||||
var $recordedbooks_results = $( '<div id="recordedbooks-results">' + MSG_SEARCHING.format('RecordedBooks') + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
|
||||
$( '#numresults' ) .after( $recordedbooks_results );
|
||||
KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
|
||||
if ( data.error ) {
|
||||
|
@ -850,7 +850,7 @@
|
|||
} );
|
||||
[% END # /IF RecordedBooksEnabled %]
|
||||
[% IF ( OpenLibrarySearch ) %]
|
||||
var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
|
||||
var $openlibrary_results = $( '<div id="openlibrary-results">' + MSG_SEARCHING.format('OpenLibrary' ) + ' <img class="throbber" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" /></div>' );
|
||||
$( '#numresults' ) .after( $openlibrary_results );
|
||||
KOHA.OpenLibrary.search( querystring, null, function( data ) {
|
||||
if ( data.error ) {
|
||||
|
|
|
@ -312,7 +312,7 @@ KOHA.RecordedBooks = new function() {
|
|||
$('<div id="action_'+isbn+'" class="actions-menu">')
|
||||
.append(actions)
|
||||
.appendTo(el);
|
||||
$("#action_"+isbn).before('<span id="waiting_'+isbn+'" style="display:none;"><img class="throbber" src="/opac-tmpl/lib/jquery/plugins/themes/classic/throbber.gif" /></span>');
|
||||
$("#action_"+isbn).before('<span id="waiting_'+isbn+'" style="display:none;"><img class="throbber" src="' + SPINNER_THROBBER + '" /></span>');
|
||||
};
|
||||
|
||||
this.search = function( q, page_size, page, callback ) {
|
||||
|
|
Loading…
Reference in a new issue