View | Details | Raw Unified | Return to bug 27882
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-7 / +3 lines)
Lines 917-924 Link Here
917
                [% END # /IF OpacHighlightedWords %]
917
                [% END # /IF OpacHighlightedWords %]
918
                [% IF ( OverDriveEnabled ) %]
918
                [% IF ( OverDriveEnabled ) %]
919
                    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>' );
919
                    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>' );
920
                    $( '#numresults' ) .append( ' ' )
920
                    $( '#numresults' ) .after( $overdrive_results );
921
                        .append( $overdrive_results );
922
                    //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
921
                    //Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes
923
                    //as the overdrive API treats double quotes as a search term and returns extra results
922
                    //as the overdrive API treats double quotes as a search term and returns extra results
924
                    od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
923
                    od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' ');
Lines 939-946 Link Here
939
                [% END # /IF OverDriveEnabled %]
938
                [% END # /IF OverDriveEnabled %]
940
                [% IF ( RecordedBooksEnabled ) %]
939
                [% IF ( RecordedBooksEnabled ) %]
941
                    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>' );
940
                    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>' );
942
                    $( '#numresults' ) .append( ' ' )
941
                    $( '#numresults' ) .after( $recordedbooks_results );
943
                        .append( $recordedbooks_results );
944
                    KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
942
                    KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) {
945
                        if ( data.error ) {
943
                        if ( data.error ) {
946
                            $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks')  + ': ' + data.error);
944
                            $recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks')  + ': ' + data.error);
Lines 957-964 Link Here
957
                [% END # /IF RecordedBooksEnabled %]
955
                [% END # /IF RecordedBooksEnabled %]
958
                [% IF ( OpenLibrarySearch ) %]
956
                [% IF ( OpenLibrarySearch ) %]
959
                    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>' );
957
                    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>' );
960
                    $( '#numresults' ) .append( ' ' )
958
                    $( '#numresults' ) .after( $openlibrary_results );
961
                        .append( $openlibrary_results );
962
                    KOHA.OpenLibrary.search( querystring, null, function( data ) {
959
                    KOHA.OpenLibrary.search( querystring, null, function( data ) {
963
                        if ( data.error ) {
960
                        if ( data.error ) {
964
                            $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
961
                            $openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') );
965
- 

Return to bug 27882