From 7ba290b0df5494556e13d110af0ab0e3d95e1584 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 5 Feb 2018 15:30:48 +0000 Subject: [PATCH] Bug 20135: Staff client language choose pop-up can appear off-screen This patch fixes a bug which was introduced by Bug 19851 ("Improve responsive layout handling of staff client menu bar."). The changes in that patch did not take into account the effects it would have on the language menus in the footer. This patch adds some additional classes to some menus and adds some CSS for those classes so that menus are correctly aligned left or right based on their position on the screen. To test, apply the patch and clear your cache if necessary. You should have multiple translations installed and enabled, at least one of which should have more than one "sub-language" (e.g. en-GB and en-US). In the staff client, test the appearance of various drop-down menus with the browser width above and below 800 pixels wide: - Search and More menus in the header - User/Library menu in the header - Language selection in the footer - Language selection in the header In all cases, menus should look correct and should not be aligned in such a way that they disappear off the left or right sides of the screen. --- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 38 +++++++++++++--------- .../intranet-tmpl/prog/en/includes/header.inc | 6 ++-- .../prog/en/includes/intranet-bottom.inc | 2 +- .../prog/en/includes/langmenu-staff-top.inc | 4 +-- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index 85a60ca..3dea450 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -2913,21 +2913,6 @@ span.browse-button { font-weight: bold; } -#i18nMenu a, -#i18nMenu a:link, -#i18nMenu a:visited { - color : #004d99; - font-weight: normal; -} - -#i18nMenu a:hover, -#i18nMenu a:active, -#i18nMenu .dropdown-menu a:hover, -#i18nMenu .dropdown-menu a:focus { - color : #538200; - font-weight: normal; -} - #i18nMenu a .sublanguage-selected { color: #000; font-weight: bold; @@ -3180,7 +3165,7 @@ table#ill-requests { margin: 0; } - .navbar-nav .open .dropdown-menu { + .navbar-nav .open .dropdown-menu.dropdown-menu-left { position: absolute; float: left; left: auto; @@ -3190,6 +3175,27 @@ table#ill-requests { border: 1px solid rgba(0,0,0,0.15); box-shadow: 0 6px 12px rgba(0,0,0,0.175); } + + .navbar-nav .open .dropdown-menu.dropdown-menu-right { + position: absolute; + float: left; + left: ; + right: auto; + width: auto; + background-color: #fff; + border: 1px solid rgba(0,0,0,0.15); + box-shadow: 0 6px 12px rgba(0,0,0,0.175); + } + + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + background-color: #0081c2; + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + color: #ffffff; + text-decoration: none; + } + } @media (min-width: 800px) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 8e11080..918a1b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -6,7 +6,7 @@ [% IF ( CAN_user_borrowers ) %]
  • Patrons
  • [% END %]