Bug 34075: Improve JS code
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
6247cd9b5e
commit
4f9fa72828
1 changed files with 9 additions and 9 deletions
|
@ -136,18 +136,18 @@
|
|||
<script>
|
||||
$(document).ready(function() {
|
||||
if( $("#authoritiestabs .tab-pane.active").length < 1 ){
|
||||
let tab_object;
|
||||
|
||||
[% SET DefaultAuthorityTab = Koha.Preference('DefaultAuthorityTab') %]
|
||||
[% IF DefaultAuthorityTab %]
|
||||
let default_tab = "#tab" + [% DefaultAuthorityTab | html %] + "XX-tab";
|
||||
let tab_object = $("#authoritiestabs "+default_tab)
|
||||
if( tab_object.length > 0 ){
|
||||
tab_object.tab("show");
|
||||
} else {
|
||||
$("#authoritiestabs a:first").tab("show");
|
||||
}
|
||||
[% ELSE %]
|
||||
$("#authoritiestabs a:first").tab("show");
|
||||
tab_object = $("#authoritiestabs #tab[% DefaultAuthorityTab | html %]XX-tab");
|
||||
[% END %]
|
||||
|
||||
if( tab_object.length > 0 ){
|
||||
tab_object.tab("show");
|
||||
} else {
|
||||
$("#authoritiestabs a:first").tab("show");
|
||||
}
|
||||
}
|
||||
|
||||
var editAuth = $("#editAuth");
|
||||
|
|
Loading…
Reference in a new issue