Bugzilla – Attachment 149224 Details for
Bug 33422
ERM - Search header should change to match the section you are in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33422: (bug 32728 follow-up) ERM - Update search header depending on navigation
Bug-33422-bug-32728-follow-up-ERM---Update-search-.patch (text/plain), 4.12 KB, created by
Jonathan Druart
on 2023-04-06 06:54:56 UTC
(
hide
)
Description:
Bug 33422: (bug 32728 follow-up) ERM - Update search header depending on navigation
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-04-06 06:54:56 UTC
Size:
4.12 KB
patch
obsolete
>From db19b82611e8cc817466eb3454eeb3c2773eb779 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 5 Apr 2023 15:30:58 +0000 >Subject: [PATCH] Bug 33422: (bug 32728 follow-up) ERM - Update search header > depending on navigation > >This patch removes reference to a non-existent id ("ui-id-X") and replaces it with new ids specific to agreements, titles and packages. > >Test plan: >1) Apply patch >2) Navigate between Agreements, Packages, Titles using the sidebar. The search bar should change each time to match the section >3) Add some agreemens, packages, titles >4) Perform a search using the different search bar options. Each time it should take you to the correct page with the search activated in the KohaTable. The navbar should also be highlighted to match the correct section and the top search bar should also show the correct section > >Signed-off-by: David Nind <david@davidnind.com> > >JD Amended commit message: link with 32728 >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../intranet-tmpl/prog/en/includes/erm-search.inc | 6 +++--- > koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts | 10 ++++++---- > 2 files changed, 9 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc >index 471add266db..4a5235f05e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc >@@ -41,13 +41,13 @@ > > <ul class="nav nav-tabs" role="tablist"> > <li role="presentation" class="active"> >- <a title="Search agreements" href="#agreement_search" aria-controls="agreement_search" role="tab" aria-expanded="true" data-toggle="tab" class="keep_text"><i class="fa fa-check-circle-o"></i> <span class="tab-title">Search agreements</span></a> >+ <a id="agreement_search_tab" title="Search agreements" href="#agreement_search" aria-controls="agreement_search" role="tab" aria-expanded="true" data-toggle="tab" class="keep_text"><i class="fa fa-check-circle-o"></i> <span class="tab-title">Search agreements</span></a> > </li> > <li role="presentation"> >- <a title="Search packages" href="#package_search" aria-controls="package_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-archive"></i> <span class="tab-title">Search packages</span></a> >+ <a id="package_search_tab" title="Search packages" href="#package_search" aria-controls="package_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-archive"></i> <span class="tab-title">Search packages</span></a> > </li> > <li role="presentation"> >- <a title="Search titles" href="#title_search" aria-controls="title_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-sort-alpha-asc"></i> <span class="tab-title">Search titles</span></a> >+ <a id="title_search_tab" title="Search titles" href="#title_search" aria-controls="title_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-sort-alpha-asc"></i> <span class="tab-title">Search titles</span></a> > </li> > </ul> > </div><!-- /#header_search --> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts >index e4290931dfd..5d160072bdf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts >@@ -62,13 +62,15 @@ router.beforeEach((to, from) => { > removeMessages(); // This will actually flag the messages as displayed already > }); > router.afterEach((to, from) => { >- let tab_id = 1; // Agreements >+ let tab_id = 'agreement'; // Agreements >+ > if (to.path.match(/\/erm\/eholdings\/local\/packages/)) { >- tab_id = 2; >+ tab_id = 'package'; > } else if (to.path.match(/\/erm\/eholdings\/local\/titles/)) { >- tab_id = 3; >+ tab_id = 'title'; > } >- let node = document.getElementById("ui-id-" + tab_id); >+ let node = document.getElementById(`${tab_id}_search_tab`); >+ > if (node) { > node.click(); > } >-- >2.25.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 33422
:
149220
|
149221
| 149224 |
149227