Bugzilla – Attachment 142599 Details for
Bug 31609
JavaScript error on Additional contents main page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31609: JavaScript error on Additional contents main page
Bug-31609-JavaScript-error-on-Additional-contents-.patch (text/plain), 1.98 KB, created by
Marcel de Rooy
on 2022-10-25 06:47:31 UTC
(
hide
)
Description:
Bug 31609: JavaScript error on Additional contents main page
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-10-25 06:47:31 UTC
Size:
1.98 KB
patch
obsolete
>From 0723144400c7d4e5696b62c43fbf50b6ffb1a636 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 23 Sep 2022 14:22:37 +0000 >Subject: [PATCH] Bug 31609: JavaScript error on Additional contents main page >Content-Type: text/plain; charset=utf-8 > >This patch makes a minor modification to the JavaScript >on the Additional contents page to prevent an error when >there are no tabs present on the page. > >The JS needs an additional check so that it doesn't run >when there are no tabs. > >To test you should have more than one language installed. > >- Before the patch, you would see a JavaScript error in > the console: "Uncaught TypeError: can't access property > "hash", firstTab[0] is undefined." >- Apply the patch and go to Tools -> Additional > contents. >- With the patch applied there should be no error on the > additional contents main page. >- Try creating or editing additional contents entries to > confirm that the interface still works correctly. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../intranet-tmpl/prog/en/modules/tools/additional-contents.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index 5520463dd9..4db2b9e5d5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -709,7 +709,7 @@ > <script> > > $(document).ready(function(){ >- if( $("#tabs .tab-pane.active").length < 1 ){ >+ if( $("#tabs").length > 0 && $("#tabs .tab-pane.active").length < 1 ){ > /* Activate first tab and initialize its tinyMCE instance */ > let firstTab = $("#tabs a:first"); > firstTab.tab("show"); >-- >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 31609
:
140919
|
140975
|
142574
| 142599