Lines 105-129
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
105 |
} ); |
105 |
} ); |
106 |
|
106 |
|
107 |
shortcut.add( 'alt+ctrl+k', function(event) { |
107 |
shortcut.add( 'alt+ctrl+k', function(event) { |
108 |
if ( Search.IsAvailable() ) $( '#search-by-keywords' ).focus(); |
108 |
$( '#search-by-keywords' ).focus(); |
109 |
|
109 |
|
110 |
return false; |
110 |
return false; |
111 |
} ); |
111 |
} ); |
112 |
|
112 |
|
113 |
shortcut.add( 'alt+ctrl+a', function(event) { |
113 |
shortcut.add( 'alt+ctrl+a', function(event) { |
114 |
if ( Search.IsAvailable() ) $( '#search-by-author' ).focus(); |
114 |
$( '#search-by-author' ).focus(); |
115 |
|
115 |
|
116 |
return false; |
116 |
return false; |
117 |
} ); |
117 |
} ); |
118 |
|
118 |
|
119 |
shortcut.add( 'alt+ctrl+i', function(event) { |
119 |
shortcut.add( 'alt+ctrl+i', function(event) { |
120 |
if ( Search.IsAvailable() ) $( '#search-by-isbn' ).focus(); |
120 |
$( '#search-by-isbn' ).focus(); |
121 |
|
121 |
|
122 |
return false; |
122 |
return false; |
123 |
} ); |
123 |
} ); |
124 |
|
124 |
|
125 |
shortcut.add( 'alt+ctrl+t', function(event) { |
125 |
shortcut.add( 'alt+ctrl+t', function(event) { |
126 |
if ( Search.IsAvailable() ) $( '#search-by-title' ).focus(); |
126 |
$( '#search-by-title' ).focus(); |
127 |
|
127 |
|
128 |
return false; |
128 |
return false; |
129 |
} ); |
129 |
} ); |
Lines 351-357
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
351 |
function showAdvancedSearch() { |
351 |
function showAdvancedSearch() { |
352 |
$('#advanced-search-servers').empty(); |
352 |
$('#advanced-search-servers').empty(); |
353 |
$.each( z3950Servers, function( server_id, server ) { |
353 |
$.each( z3950Servers, function( server_id, server ) { |
354 |
$('#advanced-search-servers').append( '<li data-server-id="' + server_id + '"><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + '</li>' ); |
354 |
$('#advanced-search-servers').append( '<li data-server-id="' + server_id + '"><label><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + '</label></li>' ); |
355 |
} ); |
355 |
} ); |
356 |
$('#advanced-search-ui').modal('show'); |
356 |
$('#advanced-search-ui').modal('show'); |
357 |
} |
357 |
} |
Lines 413-419
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
413 |
num_fetched += '+'; |
413 |
num_fetched += '+'; |
414 |
} |
414 |
} |
415 |
|
415 |
|
416 |
$('#search-serversinfo').append( '<li data-server-id="' + server_id + '"><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + ' (' + num_fetched + ')' + '</li>' ); |
416 |
$('#search-serversinfo').append( '<li data-server-id="' + server_id + '"><label><input class="search-toggle-server" type="checkbox"' + ( server.checked ? ' checked="checked">' : '>' ) + server.name + ' (' + num_fetched + ')' + '</label></li>' ); |
417 |
} ); |
417 |
} ); |
418 |
|
418 |
|
419 |
var seenColumns = {}; |
419 |
var seenColumns = {}; |
Lines 527-532
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
527 |
} else { |
527 |
} else { |
528 |
$overlay.find('.bar').css( { display: 'block', width: '100%' } ); |
528 |
$overlay.find('.bar').css( { display: 'block', width: '100%' } ); |
529 |
$overlay.fadeOut(); |
529 |
$overlay.fadeOut(); |
|
|
530 |
$('#searchresults')[0].focus(); |
530 |
} |
531 |
} |
531 |
} |
532 |
} |
532 |
|
533 |
|
Lines 607-613
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
607 |
break; |
608 |
break; |
608 |
case 'selected_search_targets': |
609 |
case 'selected_search_targets': |
609 |
$( document ).on( 'change', 'input.search-toggle-server', function() { |
610 |
$( document ).on( 'change', 'input.search-toggle-server', function() { |
610 |
var server_id = $( this ).parent().data('server-id'); |
611 |
var server_id = $( this ).closest('li').data('server-id'); |
611 |
Preferences.user.selected_search_targets[server_id] = this.checked; |
612 |
Preferences.user.selected_search_targets[server_id] = this.checked; |
612 |
Preferences.Save( [% USER_INFO.0.borrowernumber %] ); |
613 |
Preferences.Save( [% USER_INFO.0.borrowernumber %] ); |
613 |
} ); |
614 |
} ); |
Lines 974-980
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
974 |
}); |
975 |
}); |
975 |
|
976 |
|
976 |
$( document ).on( 'change', 'input.search-toggle-server', function() { |
977 |
$( document ).on( 'change', 'input.search-toggle-server', function() { |
977 |
var server = z3950Servers[ $( this ).parent().data('server-id') ]; |
978 |
var server = z3950Servers[ $( this ).closest('li').data('server-id') ]; |
978 |
server.checked = this.checked; |
979 |
server.checked = this.checked; |
979 |
|
980 |
|
980 |
if ( $('#search-results-ui').is( ':visible' ) ) { |
981 |
if ( $('#search-results-ui').is( ':visible' ) ) { |