Bugzilla – Attachment 150535 Details for
Bug 33622
Notice content does not show on default tab if TranslateNotices enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33622: Notice content does not show on default tab if TranslateNotices enabled
Bug-33622-Notice-content-does-not-show-on-default-.patch (text/plain), 3.51 KB, created by
Aleisha Amohia
on 2023-05-02 20:25:58 UTC
(
hide
)
Description:
Bug 33622: Notice content does not show on default tab if TranslateNotices enabled
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-05-02 20:25:58 UTC
Size:
3.51 KB
patch
obsolete
>From 5aecf6a57155c2d4d1322f08ecc0901c19f6f399 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 2 May 2023 17:24:08 +0000 >Subject: [PATCH] Bug 33622: Notice content does not show on default tab if > TranslateNotices enabled > >This patch fixes a conflict between the template-generated markup and >Bootstrap JS which were both competing to show the correct default tab. >It's simpler to rely on JavaScript. > >To test, apply the patch and enable the TranslateNotices system >preference if necessary. > >- Go to Tools -> Notices & slips >- Go to edit any notice e.g. DUEDGST >- The page should load with the "Default" tab selected by default. >- Enter unique titles and contents under each tab to confirm that the > data you see under the "Default" or "English (en)" tab is being shown > in the right place. >- Save your modified notice and edit it again to confirm that the tabs > correspond correctly to your data. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 9 ++------- > koha-tmpl/intranet-tmpl/prog/js/letter.js | 2 +- > 2 files changed, 3 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 910deebfef5..fa4095657b8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -452,7 +452,7 @@ > <div style="clear:both"></div> > [% WRAPPER tabs id= "tabs" %] > [% WRAPPER tabs_nav %] >- [% WRAPPER tab_item tabname= "lang_default" bt_active= 1 %] <span>Default</span> [% END %] >+ [% WRAPPER tab_item tabname= "lang_default" %] <span>Default</span> [% END %] > [% FOR language IN languages %] > [% FOR sublanguage IN language.sublanguages_loop %] > [% IF language.plural %] >@@ -466,12 +466,7 @@ > > [% WRAPPER tab_panels %] > [% FOREACH lang IN letters.keys %] >- [% IF( loop.first ) %] >- [% SET bt_active = 1 %] >- [% ELSE %] >- [% SET bt_active = 0 %] >- [% END %] >- [% WRAPPER tab_panel tabname="lang_${lang}" bt_active= bt_active %] >+ [% WRAPPER tab_panel tabname="lang_${lang}" %] > [% PROCESS message_templates %] > [% END # /WRAPPER tab_panel %] > [% END # /FOREACH lang %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/letter.js b/koha-tmpl/intranet-tmpl/prog/js/letter.js >index fd03c0dc431..8a1894a1f79 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/letter.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/letter.js >@@ -176,7 +176,7 @@ $(document).ready(function() { > if( langtab != "" ){ > $("#tabs a[href='#" + langtab + "']").tab("show"); > } else { >- $("#tabs a:first").tab("show"); >+ $("#tabs a[href='#lang_default_panel']").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 33622
:
150529
|
150533
| 150535