Bugzilla – Attachment 153627 Details for
Bug 34075
Allow specifying default tab view for authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34075: Improve JS code
Bug-34075-Improve-JS-code.patch (text/plain), 1.88 KB, created by
Jonathan Druart
on 2023-07-19 07:32:51 UTC
(
hide
)
Description:
Bug 34075: Improve JS code
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-19 07:32:51 UTC
Size:
1.88 KB
patch
obsolete
>From 540f03aa090f49a5f2503cfd029b1adaf7ddb8f8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 19 Jul 2023 09:32:15 +0200 >Subject: [PATCH] Bug 34075: Improve JS code > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/authorities/detail.tt | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >index 1afe9c321e1..2607467f308 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >@@ -133,18 +133,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"); >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34075
:
152518
|
152582
|
152584
|
152633
|
153625
|
153626
| 153627