Lines 387-393
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
387 |
} |
387 |
} |
388 |
|
388 |
|
389 |
function showResultsBox(data) { |
389 |
function showResultsBox(data) { |
390 |
$('#search-top-pages, #search-bottom-pages').find('.pagination').empty(); |
390 |
$('#search-top-pages, #search-bottom-pages').find('nav').empty(); |
391 |
$('#searchresults thead tr').empty(); |
391 |
$('#searchresults thead tr').empty(); |
392 |
$('#searchresults tbody').empty(); |
392 |
$('#searchresults tbody').empty(); |
393 |
$('#search-serversinfo').empty().append('<li>' + _("Loading...") + '</li>'); |
393 |
$('#search-serversinfo').empty().append('<li>' + _("Loading...") + '</li>'); |
Lines 527-533
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
527 |
var max_page = Math.ceil( data.total_fetched / data.page_size ) - 1; |
527 |
var max_page = Math.ceil( data.total_fetched / data.page_size ) - 1; |
528 |
|
528 |
|
529 |
if ( cur_page != 0 ) { |
529 |
if ( cur_page != 0 ) { |
530 |
pages.push( '<li><a class="search-nav" href="#" data-offset="' + (data.offset - data.page_size) + '">« ' + _("Previous") + '</a></li>' ); |
530 |
pages.push( '<li><a class="search-nav" href="#" data-offset="' + (data.offset - data.page_size) + '"><span aria-hidden="true">«</span> ' + _("Previous") + '</a></li>' ); |
531 |
} |
531 |
} |
532 |
|
532 |
|
533 |
for ( var page = Math.max( 0, cur_page - 9 ); page <= Math.min( max_page, cur_page + 9 ); page++ ) { |
533 |
for ( var page = Math.max( 0, cur_page - 9 ); page <= Math.min( max_page, cur_page + 9 ); page++ ) { |
Lines 539-548
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
539 |
} |
539 |
} |
540 |
|
540 |
|
541 |
if ( cur_page < max_page ) { |
541 |
if ( cur_page < max_page ) { |
542 |
pages.push( ' <li><a class="search-nav" href="#" data-offset="' + (data.offset + data.page_size) + '">' + _("Next") + ' »</a></li>' ); |
542 |
pages.push( ' <li><a class="search-nav" href="#" data-offset="' + (data.offset + data.page_size) + '">' + _("Next") + ' <span aria-hidden="true">»</span></a></li>' ); |
543 |
} |
543 |
} |
544 |
|
544 |
|
545 |
$( '#search-top-pages, #search-bottom-pages' ).find( '.pagination' ).html( pages.length > 1 ? ( '<ul>' + pages.join( '' ) + '</ul>' ) : '' ); |
545 |
$( '#search-top-pages, #search-bottom-pages' ).find( 'nav' ).html( pages.length > 1 ? ( '<ul class="pagination pagination-sm">' + pages.join( '' ) + '</ul>' ) : '' ); |
546 |
|
546 |
|
547 |
var $overlay = $('#search-overlay'); |
547 |
var $overlay = $('#search-overlay'); |
548 |
$overlay.find('span').text(_("Loading")); |
548 |
$overlay.find('span').text(_("Loading")); |