VIVO-532: modified display of language selectors

This commit is contained in:
Tim Worrall 2014-08-13 12:17:05 -04:00
parent d9fc640da6
commit 27c62c26cc
5 changed files with 141 additions and 20 deletions

View 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();
}
});
});