Bug 24510: Code cleaning

Additional test plan:
Create 3 clubs: abc adf axy
place a hold for on of those club, search for a club 'a'
you will get the focus on the "Clubs" tab

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-02-26 17:38:53 +01:00 committed by Martin Renvoize
parent c841e8a8bf
commit 73df5c7b3f
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -974,27 +974,16 @@
columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
$(document).ready(function() {
[% UNLESS clubs %]
$('#circ_holds_select').tabs({
active: 0,
activate: function(){
$(this).find("input.focus").focus();
},
create: function(){
$(this).find("input.focus").focus();
}
});
[% ELSE %]
$('#circ_holds_select').tabs({
active: 1,
activate: function(){
$(this).find("input.focus").focus();
},
create: function(){
$(this).find("input.focus").focus();
}
});
[% END %]
[% SET active = clubs ? 1 : 0 %]
$('#circ_holds_select').tabs({
active: [% active %],
activate: function(){
$(this).find("input.focus").focus();
},
create: function(){
$(this).find("input.focus").focus();
}
});
function ToggleHoldsToPlace() {
if ( $("#requestany").prop('checked') ) {
$("#holds_to_place_count").prop('disabled', false);