Bugzilla – Attachment 146852 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), 3.22 KB, created by
Andreas Roussos
on 2023-02-17 15:10:37 UTC
(
hide
)
Description:
Bug 32926: Assign unique ids to <h3> elements
Filename:
MIME Type:
Creator:
Andreas Roussos
Created:
2023-02-17 15:10:37 UTC
Size:
3.22 KB
patch
obsolete
>From 75ef97fd8ca116640aafe635e06db490c7430f86 Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Fri, 17 Feb 2023 16:05:20 +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. >4) Clicking on the "View all xxx preferences" links on the > right hand side should take you to the correct System > preferences tab *and* automatically scroll the appropriate > section into view at the top of the page. >--- > .../intranet-tmpl/prog/en/modules/admin/preferences.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 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..701c653a73 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -70,16 +70,16 @@ > <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 ) %] >- <div class="pull-right"><a class="btn btn-link" href="/cgi-bin/koha/admin/preferences.pl?tab=[% TAB.tab_id | html %]#[% LINE.title | $HtmlId %]"><i class="fa fa-list-ul"></i> View all [% LINE.title | html %] preferences</a></div> >+ <div class="pull-right"><a class="btn btn-link" href="/cgi-bin/koha/admin/preferences.pl?tab=[% TAB.tab_id | html %]#[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]"><i class="fa fa-list-ul"></i> View all [% LINE.title | html %] preferences</a></div> > [% END %] > </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