Bugzilla – Attachment 153165 Details for
Bug 34131
Plugins page breadcrumbs and side menu not consistent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34131: Add 'current' class on correct side menu link
Bug-34131-Add-current-class-on-correct-side-menu-l.patch (text/plain), 1.58 KB, created by
Jonathan Druart
on 2023-07-07 11:54:53 UTC
(
hide
)
Description:
Bug 34131: Add 'current' class on correct side menu link
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-07 11:54:53 UTC
Size:
1.58 KB
patch
obsolete
>From b05c3c7cfbeb24ac00ab9eb641de1477d5aa837d Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 27 Jun 2023 12:38:09 +0000 >Subject: [PATCH] Bug 34131: Add 'current' class on correct side menu link > >This changes the way we're looking for the correct menu item to set as >active. > >If we don't find an exact match for path+params, we attempt to set >'current' to just matching on path. > >What this does is it sets the 'Plugins' menu item as active, even if >the url is 'plugins-home.pl?method=report > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index 02bc39b8f8a..74af1ad89ae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -144,7 +144,11 @@ $(document).ready(function() { > if ( url.match(/\?(.+)$/) ) { > params = "?" + RegExp.$1; > } >- $("a[href$=\"/" + path + params + "\"]", navmenulist).addClass("current"); >+ if ($("a[href$=\"/" + path + params + "\"]", navmenulist).length == 0){ >+ $("a[href$=\"/" + path + "\"]", navmenulist).addClass("current"); >+ } else { >+ $("a[href$=\"/" + path + params + "\"]", navmenulist).addClass("current"); >+ } > } > > $("#catalog-search-link a").on("mouseenter mouseleave", function(){ >-- >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 34131
:
152727
|
152728
|
152745
|
152746
|
153150
|
153151
|
153152
|
153164
| 153165 |
153166
|
153167