Bugzilla – Attachment 146440 Details for
Bug 32926
Cannot expand or collapse some System preference sections after a search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32926: Assign unique ids to <h3> elements
Bug-32926-Assign-unique-ids-to-h3-elements.patch (text/plain), 2.46 KB, created by
Andreas Roussos
on 2023-02-09 16:30:01 UTC
(
hide
)
Description:
Bug 32926: Assign unique ids to <h3> elements
Filename:
MIME Type:
Creator:
Andreas Roussos
Created:
2023-02-09 16:30:01 UTC
Size:
2.46 KB
patch
obsolete
>From 574b90026ba63672eac97aae19e227ff19566a5e Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Thu, 9 Feb 2023 17:19:13 +0100 >Subject: [PATCH] Bug 32926: Assign unique ids to <h3> elements > >If you perform a System preferences search for a common word >such as "type", you lose the ability to expand or collapse some >sections. In particular, you cannot expand/collapse the sections >with names that appear more than once in the results page. >All sections except the first one in each group of duplicates >are affected by this. See https://imgur.com/a/NSslIcV for a demo. > >This patch fixes that by prepending the <h3> ids with the >top-level System preference section name to make them unique. > >Test plan: > >1) Perform a System preferences search for a common word such > as "type" or "log". In the results page, the "Policy" section > will appear more than once. Now try to expand/collapse any > "Policy" section but the first one. It won't work, only the > first "Policy" section is toggled. >2) Apply this patch and refresh the page. >3) This time you should be able to expand or collapse all of > the available system preference sections. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >index b219e44983..85b2686a44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -70,7 +70,7 @@ > <div class="page-section"> > <div class="row"> > <div class="col-sm-6"> >- <h3 id="[% LINE.title | $HtmlId %]"><i class="fa fa-caret-down"></i> [% LINE.title | html %]</h3> >+ <h3 id="[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]"><i class="fa fa-caret-down"></i> [% LINE.title | html %]</h3> > </div> > <div class="col-sm-6"> > [% IF ( searchfield ) %] >@@ -79,7 +79,7 @@ > </div> > </div> > >- <table class="preferences" id="collapse_[% LINE.title | $HtmlId %]"> >+ <table class="preferences" id="collapse_[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]"> > <thead><tr><th>Preference</th><th>Value</th></tr></thead> > [% UNLESS ( loop.last ) %]<tbody>[% END %] > [% ELSE %] >-- >2.20.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 32926
:
146440
|
146441
|
146448
|
146852
|
146973
|
146974
|
147197
|
147198
|
147199
|
150739