|
Lines 921-928
Link Here
|
| 921 |
[% END # /IF OpacHighlightedWords %] |
921 |
[% END # /IF OpacHighlightedWords %] |
| 922 |
[% IF ( OverDriveEnabled ) %] |
922 |
[% IF ( OverDriveEnabled ) %] |
| 923 |
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>' ); |
923 |
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>' ); |
| 924 |
$( '#numresults' ) .append( ' ' ) |
924 |
$( '#numresults' ) .after( $overdrive_results ); |
| 925 |
.append( $overdrive_results ); |
|
|
| 926 |
//Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes |
925 |
//Clean querystring, first we remove CCL entities, then decode HTML entities, then swap double quotes for single quotes |
| 927 |
//as the overdrive API treats double quotes as a search term and returns extra results |
926 |
//as the overdrive API treats double quotes as a search term and returns extra results |
| 928 |
od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' '); |
927 |
od_querystring = querystring.replace(/(?:^|\W)([\w-]+)(,[\w-]+)*([:=])/g,' '); |
|
Lines 943-950
Link Here
|
| 943 |
[% END # /IF OverDriveEnabled %] |
942 |
[% END # /IF OverDriveEnabled %] |
| 944 |
[% IF ( RecordedBooksEnabled ) %] |
943 |
[% IF ( RecordedBooksEnabled ) %] |
| 945 |
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>' ); |
944 |
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>' ); |
| 946 |
$( '#numresults' ) .append( ' ' ) |
945 |
$( '#numresults' ) .after( $recordedbooks_results ); |
| 947 |
.append( $recordedbooks_results ); |
|
|
| 948 |
KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) { |
946 |
KOHA.RecordedBooks.search( querystring, [% OPACnumSearchResults || "null" | html %], null, function( data ) { |
| 949 |
if ( data.error ) { |
947 |
if ( data.error ) { |
| 950 |
$recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error); |
948 |
$recordedbooks_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('RecordedBooks') + ': ' + data.error); |
|
Lines 961-968
Link Here
|
| 961 |
[% END # /IF RecordedBooksEnabled %] |
959 |
[% END # /IF RecordedBooksEnabled %] |
| 962 |
[% IF ( OpenLibrarySearch ) %] |
960 |
[% IF ( OpenLibrarySearch ) %] |
| 963 |
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>' ); |
961 |
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>' ); |
| 964 |
$( '#numresults' ) .append( ' ' ) |
962 |
$( '#numresults' ) .after( $openlibrary_results ); |
| 965 |
.append( $openlibrary_results ); |
|
|
| 966 |
KOHA.OpenLibrary.search( querystring, null, function( data ) { |
963 |
KOHA.OpenLibrary.search( querystring, null, function( data ) { |
| 967 |
if ( data.error ) { |
964 |
if ( data.error ) { |
| 968 |
$openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') ); |
965 |
$openlibrary_results.html( MSG_ERROR_SEARCHING_COLLECTION.format('OpenLibrary') ); |
| 969 |
- |
|
|