Bugzilla – Attachment 73335 Details for
Bug 20217
Make header's catalog search menu into a split button
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20217: Make header's catalog search menu into a split button
Bug-20217-Make-headers-catalog-search-menu-into-a-.patch (text/plain), 4.00 KB, created by
Owen Leonard
on 2018-03-27 16:36:03 UTC
(
hide
)
Description:
Bug 20217: Make header's catalog search menu into a split button
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-03-27 16:36:03 UTC
Size:
4.00 KB
patch
obsolete
>From 136de04c77c29f3c211ae6bf6f00dbf7e0fb47d2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 27 Mar 2018 16:31:52 +0000 >Subject: [PATCH] Bug 20217: Make header's catalog search menu into a split > button > >This patch modifies the markup for the staff client header's catalog >search menu so that it mimics the behavior of a Bootstrap split button >(As seen on the cataloging home page's 'New from Z39.50' button). > >To test, apply the patch, run 'yarn build' to regenerate the staff >client's CSS, and clear your browser cache. > >- View any page in the staff client. >- Hover your mouse over the "Search" link in the header. It should > trigger a hover affect on the adjacent menu link. >- Clicking the "Search" link should take you directly to the advanced > search page. >- Clicking the adjacent menu link should display a menu containing links > to advanced search and item search. >--- > .../intranet-tmpl/prog/css/src/staff-global.scss | 23 ++++++++++++++++++++++ > .../intranet-tmpl/prog/en/includes/header.inc | 7 +++++-- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 4 ++++ > 3 files changed, 32 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index e4bd5f1..cf706cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -3899,6 +3899,29 @@ span { > } > } > >+#catalog-search-link { >+ border-right: 1px solid lighten(#E6F0F2, 5%); >+} >+ >+#catalog-search-dropdown { >+ padding: 0; >+ >+ & > a { >+ border-left: 1px solid darken(#E6F0F2, 5%); >+ padding: .4em .6em; >+ >+ &:hover, >+ &.catalog-search-dropdown-hover { >+ background-color: darken(#E6F0F2, 5%); >+ border-left: 1px solid darken(#E6F0F2, 15%); >+ } >+ } >+ >+ .caret { >+ margin-left: 0; >+ } >+} >+ > @media (min-width: 200px) { > .navbar-nav > li { > float: left; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index 46d8db8..dc419a8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -4,8 +4,11 @@ > <ul id="toplevelmenu" class="nav navbar-nav"> > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li>[% END %] > [% IF CAN_user_borrowers_edit_borrowers %]<li><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li>[% END %] >- <li class="dropdown"> >- <a href="/cgi-bin/koha/catalogue/search.pl" class="dropdown-toggle" data-toggle="dropdown">Search <b class="caret"></b></a> >+ <li id="catalog-search-link"> >+ <a href="/cgi-bin/koha/catalogue/search.pl">Search</a> >+ </li> >+ <li class="dropdown" id="catalog-search-dropdown"> >+ <a href="/cgi-bin/koha/catalogue/search.pl" class="dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></a> > <ul class="dropdown-menu dropdown-menu-right"> > [% IF ( CAN_user_catalogue ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl">Advanced search</a></li> > <li><a href="/cgi-bin/koha/catalogue/itemsearch.pl">Item search</a></li>[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index cd586da..043abd3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -62,6 +62,10 @@ $.fn.selectTabByID = function (tabID) { > e.preventDefault(); > $( $(this).data("element") ).toggle(); > }); >+ >+ $("#catalog-search-link a").on("hover", function(){ >+ $("#catalog-search-dropdown a").toggleClass("catalog-search-dropdown-hover"); >+ }); > }); > > // http://jennifermadden.com/javascript/stringEnterKeyDetector.html >-- >2.1.4
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 20217
:
71674
|
72688
|
73335
|
73336
|
74807
|
74808
|
75299
|
77668
|
77679