Bugzilla – Attachment 157566 Details for
Bug 35110
Authorities editor with JS error when only one tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35110: Authorities editor with JS error when only one tab
Bug-35110-Authorities-editor-with-JS-error-when-on.patch (text/plain), 1.81 KB, created by
Katrin Fischer
on 2023-10-20 19:57:06 UTC
(
hide
)
Description:
Bug 35110: Authorities editor with JS error when only one tab
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-20 19:57:06 UTC
Size:
1.81 KB
patch
obsolete
>From 06c875631f7f76bc53de53621c635b97008855fe Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 19 Oct 2023 09:17:57 -1000 >Subject: [PATCH] Bug 35110: Authorities editor with JS error when only one tab > >Exactly like Bug 34251 for biblios : >When using the an authorities framework with all fields in the same tab, there is thrown a JS error in selectTab( "#tab0XX_panel" ); >This is because no nav tabs are build in authorities/authorities.tt as BIG_LOOP has a length(size) of 1 > >Test plan : >1) Edit an authority framework, for example 'Meeting Name', to set all sufields in tab 0 > You may use SQL : UPDATE auth_subfield_structure SET tab=0 WHERE authtypecode='MEETI_NAME' > Don't forget to restart memcached >2) Go to 'Authorities' >3) Click on 'New authority' then 'Meeting Name' >4) Check you don't see any JavaScript error >5) Check you can save > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/modules/authorities/authorities.tt | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index 4e8a81ed39..cbae792256 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -129,6 +129,10 @@ > }); > > function selectTab( tablink ){ >+ /* return if no tabs displayed (BIG_LOOP.size <= 1) */ >+ if ($(".toolbar-tabs-container .nav-tabs li").length === 0){ >+ return; >+ } > let a = $("a[href='" + tablink + "']"); > $(".toolbar-tabs-container .nav-tabs li").removeClass("selected"); > a.tab("show").parent().addClass("selected"); >-- >2.30.2
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 35110
:
157477
|
157478
|
157554
|
157555
| 157566 |
157567