Lines 445-451
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
445 |
function showAdvancedSearch() { |
445 |
function showAdvancedSearch() { |
446 |
$('#advanced-search-servers').empty(); |
446 |
$('#advanced-search-servers').empty(); |
447 |
$.each( z3950Servers, function( index, server ) { |
447 |
$.each( z3950Servers, function( index, server ) { |
448 |
$('#advanced-search-servers').append( '<li data-server-id="' + index + '"><label><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + '</label></li>' ); |
448 |
$('#advanced-search-servers').append( '<li data-server-id="' + server.server_id + '"><label><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + '</label></li>' ); |
449 |
} ); |
449 |
} ); |
450 |
$('#advanced-search-ui').modal('show'); |
450 |
$('#advanced-search-ui').modal('show'); |
451 |
} |
451 |
} |
Lines 507-513
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
507 |
num_fetched += '+'; |
507 |
num_fetched += '+'; |
508 |
} |
508 |
} |
509 |
|
509 |
|
510 |
$('#search-serversinfo').append( '<li data-server-id="' + index + '"><label><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + ' (' + num_fetched + ')' + '</label></li>' ); |
510 |
$('#search-serversinfo').append( '<li data-server-id="' + server.server_id + '"><label><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + ' (' + num_fetched + ')' + '</label></li>' ); |
511 |
} ); |
511 |
} ); |
512 |
|
512 |
|
513 |
var seenColumns = {}; |
513 |
var seenColumns = {}; |
Lines 1285-1291
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
1285 |
}); |
1285 |
}); |
1286 |
|
1286 |
|
1287 |
$( document ).on( 'change', 'input.search-toggle-server', function() { |
1287 |
$( document ).on( 'change', 'input.search-toggle-server', function() { |
1288 |
var server = z3950Servers[ $( this ).closest('li').data('server-id') ]; |
1288 |
const id = $( this ).closest('li').data('server-id'); |
|
|
1289 |
const server = z3950Servers.find(server => server.server_id === id); |
1289 |
server.checked = this.checked; |
1290 |
server.checked = this.checked; |
1290 |
|
1291 |
|
1291 |
if ( $('#search-results-ui').is( ':visible' ) && Search.Fetch() ) { |
1292 |
if ( $('#search-results-ui').is( ':visible' ) && Search.Fetch() ) { |
1292 |
- |
|
|