From 8f1f1cfd5054211df2aebf3073333133b410d929 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 24 Jun 2022 11:44:09 +0000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt | 2 +- .../bootstrap/en/modules/opac-recordedbooks-search.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 +++--- koha-tmpl/opac-tmpl/bootstrap/js/recordedbooks.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index c29aabb6a1..4fab59077d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -272,7 +272,7 @@ [% IF Koha.Preference('RecordedBooksClientSecret') && Koha.Preference('RecordedBooksLibraryID') %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt index ae67690b2d..96fee654df 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt @@ -113,7 +113,7 @@ } function search( offset ) { - $( '#overdrive-status' ).html( _("Searching OverDrive...") + ' ' ); + $( '#overdrive-status' ).html( _("Searching OverDrive...") + ' ' ); KOHA.OverDrive.Search( "[% Koha.Preference('OverDriveLibraryID') | html %]", querystring, results_per_page, offset, function( data ) { if ( data.error ) { diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt index 7f149f019f..027bebd381 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recordedbooks-search.tt @@ -74,7 +74,7 @@ var results_per_page = [% OPACnumSearchResults || 20 | html %]; function search( page ) { - $( '#recordedbooks-status' ).html( MSG_SEARCHING.format("RecordedBooks") + ' ' ); + $( '#recordedbooks-status' ).html( MSG_SEARCHING.format("RecordedBooks") + ' ' ); KOHA.RecordedBooks.search( querystring, results_per_page, page, function( data ) { if ( data.error ) { diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index b71ad4ed86..7bf913b5c1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -812,7 +812,7 @@ }); [% END # /IF OpacHighlightedWords %] [% IF ( OverDriveEnabled ) %] - var $overdrive_results = $( '
' + MSG_SEARCHING.format('OverDrive') + '
' ); + var $overdrive_results = $( '
' + MSG_SEARCHING.format('OverDrive') + '
' ); $( '#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 = $( '
' + MSG_SEARCHING.format('RecordedBooks') + '
' ); + var $recordedbooks_results = $( '
' + MSG_SEARCHING.format('RecordedBooks') + '
' ); $( '#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 = $( '
' + MSG_SEARCHING.format('OpenLibrary' ) + '
' ); + var $openlibrary_results = $( '
' + MSG_SEARCHING.format('OpenLibrary' ) + '
' ); $( '#numresults' ) .after( $openlibrary_results ); KOHA.OpenLibrary.search( querystring, null, function( data ) { if ( data.error ) { diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/recordedbooks.js b/koha-tmpl/opac-tmpl/bootstrap/js/recordedbooks.js index f3f7e8e708..773a970dc5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/recordedbooks.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/recordedbooks.js @@ -312,7 +312,7 @@ KOHA.RecordedBooks = new function() { $('
') .append(actions) .appendTo(el); - $("#action_"+isbn).before(''); + $("#action_"+isbn).before(''); }; this.search = function( q, page_size, page, callback ) { -- 2.39.5