From 86564f8e95ff1d852e4c5e3dada997fbb704e520 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 28 Jul 2014 12:11:33 -0400 Subject: [PATCH] [Signed-off] Bug 12597 - Give better visual indication of currently-selected language in the staff client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is currently no visual feedback to the user reflecting which of multiple installed translations is currently selected. I think some necessary styling didn't make it into the conversion to Bootstrap menus. This patch attempts to improve things. Most of the changes are to bring back the previous style of highlighting the currently selected language. A new change is the addition of the sub-language code to the display of the menu label if one of that menu item's sub-languages is selected. This patch also removes some obsolete CSS which referred to the old menu system. To test, apply the patch and install or update multiple languages, including at least two sub-languages. In my test I used en, en-GB and de-DE. Clear your browser cache if necessary. Enable all these languages and test the functionality of the language selection menu in the footer. - Non-enabled languages should appear as non-bold links. - When a single language (with no sub-languages) is enabled it should appear as bold text. - When one of multiple sub-languages is enabled that selection in the pop-up menu should appear as bold text. The menu label should show in bold the language code of the selected sub-language. Tested with de-DE and de-CH, works as expected Signed-off-by: Marc VĂ©ron --- .../intranet-tmpl/prog/en/css/staff-global.css | 149 +++++--------------- .../prog/en/includes/intranet-bottom.inc | 31 ++-- 2 files changed, 55 insertions(+), 125 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index d830a4d..a4ef390 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1646,122 +1646,6 @@ ul#toplevelmenu { padding : 0; } -/*#toplevelnav { - float : left; - margin-left : .5em; - width: 40%; -} - -ul#toplevelmenu li { - display: inline; - padding : 0 .6em; -} - -ul#toplevelmenu li.more a { - background-image:url(../../img/more-arrow.gif); - background-position:right center; - background-repeat:no-repeat; - padding-right:13px; -} - -ul#toplevelmenu li.more ul li a { - background-image : none; - padding-right : 20px; -} - -ul#toplevelmenu li.more ul li a.yuimenuitemlabel { - padding: .2em 20px .2em 20px; -} - -ul#toplevelmenu li a { - text-decoration : none; -} -ul#toplevelmenu li ul li { - display :block; - padding :0; -} -ul#toplevelmenu li ul li a { - text-decoration : none; -} - -ul#i18nMenu { - margin : 0; - padding : .2em 0; - } - -ul#i18nMenu li { - border-left : 1px solid #CCC; - display : inline; - float: left; - list-style : none; - padding : 0 10px; -} - -ul#i18nMenu li.yuimenuitem { - float: none; -} - -ul#i18nMenu li:first-child { - border-left : 0; - } - -ul#i18nMenu li ul li { - border : 0; - display : block; - padding : 0; - } - -ul#i18nMenu li.more a { - background-image:url(../../img/more-up-arrow.gif); - background-position:right center; - background-repeat:no-repeat; - padding-right:13px; -} - -ul#i18nMenu li.more ul li a { - background-image : none; - padding-right : 20px; -} - -div.lang { - float:left; -} - - div#changelanguage{ - background-color: #fff; - border-top: 1px solid #CCC; - position:absolute; - bottom:0; - left:0; - width:100%; - height: 2em; - } - - @media screen{ - body>div#changelanguage { - position: fixed; - } - } - - * html body{ - overflow:hidden; - } - - * html div#doc1{ - height:100%; - overflow:auto; - } - - * html div#doc2{ - height:100%; - overflow:auto; - } - - * html div#doc3{ - height:100%; - overflow:auto; - }*/ - table > caption span.actions { font-size: 66%; font-weight : normal; @@ -2776,3 +2660,36 @@ span.browse-button { #transport-types { padding-top: 0.5px; } + +#i18nMenu .navbar-text .currentlanguage { + color : #000; + font-weight: bold; +} + +#i18nMenu a.currentlanguage:link, +#i18nMenu a.currentlanguage:visited { + font-weight: bold; +} + +#i18nMenu a, +#i18nMenu a:link, +#i18nMenu a:visited { + color : #004d99; + font-weight: normal; +} + +#i18nMenu a:hover, +#i18nMenu a:active { + color : #538200; + font-weight: normal; +} + +#i18nMenu a .sublanguage-selected { + color: #000; + font-weight: bold; +} + +#i18nMenu .dropdown-menu a:hover, +#i18nMenu .dropdown-menu a:focus { + color : #FFF; +} \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc index 442a7bb..d937656 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -9,28 +9,41 @@ [% IF ( languages_loo.group_enabled ) %] [% IF ( languages_loo.plural ) %] - [% ELSE %] - [% IF ( languages_loo.group_enabled ) %] + [% IF ( languages_loo.group_enabled ) %] [% IF ( languages_loo.current ) %] [% ELSE %] @@ -42,7 +55,7 @@ [% END %] [% END %] - [% END %] + [% END %] [% END %] [% END %] -- 1.7.10.4