VIVO-532: modified display of language selectors
This commit is contained in:
parent
d9fc640da6
commit
27c62c26cc
5 changed files with 141 additions and 20 deletions
29
webapp/web/js/languageMenuUtils.js
Normal file
29
webapp/web/js/languageMenuUtils.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$(function() {
|
||||
|
||||
$.extend(this, i18nStringsLangMenu);
|
||||
var theText = this.selectLanguage;
|
||||
var imgHTML = "";
|
||||
$("ul.language-dropdown li#language-menu").hover(function(){
|
||||
$("a#lang-link").html(theText);
|
||||
$(this).addClass("hover");
|
||||
$('ul:first',this).css('visibility', 'visible');
|
||||
$("ul.language-dropdown ul.sub_menu li").css('width', ($("ul.language-dropdown").width() - 4) + 'px');
|
||||
|
||||
}, function(){
|
||||
$("a#lang-link").html(imgHTML);
|
||||
$(this).removeClass("hover");
|
||||
$('ul:first',this).css('visibility', 'hidden');
|
||||
});
|
||||
|
||||
$("ul.language-dropdown li ul li:has(ul)").find("a:first").append(" » ");
|
||||
|
||||
$("ul.language-dropdown ul.sub_menu li").each(function() {
|
||||
if ( $(this).attr("status") == "selected" ) {
|
||||
$("a#lang-link").html($(this).children("a").html());
|
||||
imgHTML = $(this).children("a").html();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue