Lines 962-974
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
962 |
} ); |
962 |
} ); |
963 |
|
963 |
|
964 |
$( document ).on( 'click', 'a.search-nav', function() { |
964 |
$( document ).on( 'click', 'a.search-nav', function() { |
965 |
$("#search-overlay").show(); |
965 |
if ( Search.Fetch( { offset: $( this ).data( 'offset' ) } ) ) { |
966 |
Search.Fetch( { offset: $( this ).data( 'offset' ) } ); |
966 |
$("#search-overlay").show(); |
|
|
967 |
} |
968 |
|
967 |
return false; |
969 |
return false; |
968 |
}); |
970 |
}); |
969 |
|
971 |
|
970 |
$( document ).on( 'click', 'th[data-sort-label]', function() { |
972 |
$( document ).on( 'click', 'th[data-sort-label]', function() { |
971 |
$("#search-overlay").show(); |
|
|
972 |
var direction; |
973 |
var direction; |
973 |
|
974 |
|
974 |
if ( $( this ).hasClass( 'sorting_asc' ) ) { |
975 |
if ( $( this ).hasClass( 'sorting_asc' ) ) { |
Lines 977-985
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
977 |
direction = 'asc'; |
978 |
direction = 'asc'; |
978 |
} |
979 |
} |
979 |
|
980 |
|
980 |
showSearchSorting( $( this ).data( 'sort-label' ), direction ); |
981 |
if ( Search.Fetch( { sort_key: $( this ).data( 'sort-label' ), sort_direction: direction } ) ) { |
|
|
982 |
showSearchSorting( $( this ).data( 'sort-label' ), direction ); |
983 |
|
984 |
$("#search-overlay").show(); |
985 |
} |
981 |
|
986 |
|
982 |
Search.Fetch( { sort_key: $( this ).data( 'sort-label' ), sort_direction: direction } ); |
|
|
983 |
return false; |
987 |
return false; |
984 |
}); |
988 |
}); |
985 |
|
989 |
|
Lines 987-995
require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
Link Here
|
987 |
var server = z3950Servers[ $( this ).closest('li').data('server-id') ]; |
991 |
var server = z3950Servers[ $( this ).closest('li').data('server-id') ]; |
988 |
server.checked = this.checked; |
992 |
server.checked = this.checked; |
989 |
|
993 |
|
990 |
if ( $('#search-results-ui').is( ':visible' ) ) { |
994 |
if ( $('#search-results-ui').is( ':visible' ) && Search.Fetch() ) { |
991 |
$("#search-overlay").show(); |
995 |
$("#search-overlay").show(); |
992 |
Search.Fetch(); |
|
|
993 |
} |
996 |
} |
994 |
} ); |
997 |
} ); |
995 |
|
998 |
|
996 |
- |
|
|