From 27c62c26cc6b832d485ed3ab8f60a81bc8e10c5f Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Wed, 13 Aug 2014 12:17:05 -0400 Subject: [PATCH] VIVO-532: modified display of language selectors --- .../languages/es_GO/i18n/all_es_GO.properties | 14 ++-- webapp/web/css/vitro.css | 79 +++++++++++++++++++ webapp/web/i18n/all.properties | 16 ++-- webapp/web/js/languageMenuUtils.js | 29 +++++++ .../page/partials/languageSelector.ftl | 23 ++++-- 5 files changed, 141 insertions(+), 20 deletions(-) create mode 100644 webapp/web/js/languageMenuUtils.js diff --git a/webapp/languages/es_GO/i18n/all_es_GO.properties b/webapp/languages/es_GO/i18n/all_es_GO.properties index 55236387c..d13f62fa5 100644 --- a/webapp/languages/es_GO/i18n/all_es_GO.properties +++ b/webapp/languages/es_GO/i18n/all_es_GO.properties @@ -226,7 +226,8 @@ verbose_turn_on = Encender verbose_turn_off = Apagar resource_uri = URI de recursos -individual_not_found = Individual no encontrado +individual_not_found = Individual no encontrado: +entity_to_query_for = Este id es el identificador de la entidad para consultar. netid también funciona. menu_ordering = Menú pedidos refresh_page_after_reordering = Actualizar la página después de los artículos de menú reordenar @@ -323,11 +324,11 @@ we_have_an_error = Se produjo un error en el sistema. error_was_reported = Este error se ha informado que la administración del sitio. error_message = Mensaje de error stack_trace = Seguimiento de la pila -trace_available = completa rastro disponibles en el registro {0} +trace_available = completa rastro disponibles en el registro vivo caused_by = Causada por requested_url = URL solicitada -error_occurred = Se ha producido un error en el sitio {0} -error_occurred_at = Se ha producido un error en su sitio {0} en {1}. +error_occurred = Se ha producido un error en el sitio VIVO +error_occurred_at = Se ha producido un error en su sitio VIVO en {0}. # # login templates ( /templates/freemarker/body/login ) @@ -413,7 +414,7 @@ undo_camelcasing = Uncamelcasing run_sdb_setup = Ejecutar la instalación SDB unrecognized_user = Usuario no reconocido -no_individual_associated_with_id = Por alguna razón, no hay ninguna persona en {0} que se asocia con su ID de red. Tal vez usted debería ponerse en contacto con el administrador de {0}. +no_individual_associated_with_id = Por alguna razón, no hay ninguna persona en VIVO que se asocia con su ID de red. Tal vez usted debería ponerse en contacto con el administrador de VIVO. # # site admin templates ( /templates/freemarker/body/siteAdmin ) @@ -588,7 +589,7 @@ operation_successful = La operación se ha realizado correctamente. operation_unsuccessful = La operación no tuvo éxito. Los detalles completos se pueden encontrar en el registro del sistema. relate_editors_profiles = Relacionar editores de perfil y los perfiles info_icon = info icon -profile_editing_title = Los editores que seleccione en el lado izquierdo tendrá la posibilidad de editar los perfiles {0} seleccione en el lado derecho. Puede seleccionar varios editores y varios perfiles, pero debe seleccionar un mínimo de 1 cada uno. +profile_editing_title = Los editores que seleccione en el lado izquierdo tendrá la posibilidad de editar los perfiles VIVO seleccione en el lado derecho. Puede seleccionar varios editores y varios perfiles, pero debe seleccionar un mínimo de 1 cada uno. select_editors = Seleccione editores select_last_name = Seleccione un apellido existente processing_indicator = Indicador de tiempo de procesamiento @@ -865,3 +866,4 @@ view_labels_for = Ver Etiquetas de select_an_existing_document = Seleccione un documento existente datetime_year_required = Intervalos de fecha / hora deben empezar por un año. Ingrese una Fecha de inicio, un fin de año o los dos. +select_a_language = Seleccione un idioma \ No newline at end of file diff --git a/webapp/web/css/vitro.css b/webapp/web/css/vitro.css index e37c1de45..c64dc9db0 100644 --- a/webapp/web/css/vitro.css +++ b/webapp/web/css/vitro.css @@ -247,6 +247,85 @@ ul.dropdown ul ul { ul.dropdown li:hover > ul { visibility: visible; } +/* -------------------------------------------------> */ +/* DROP DOWN LANGUAGE MENU ------------------------> */ +/* -------------------------------------------------> */ +ul.language-dropdown { + position: relative; +} +ul.language-dropdown li { + float: left; + zoom: 1; + padding: 0 !important; +} +ul.language-dropdown li a { + display: block; + font-size: 1.4em; +} +ul.language-dropdown li#language-menu { + background: url(../images/arrowDownOverAccount.gif) right 9px no-repeat; + min-width:110px; + position: relative; + margin-right: -10px !important; +} +ul.language-dropdown li#language-menu a { + margin-right: 28px; + margin-left:10px; +} +ul.language-dropdown li#language-menu.hover, +ul.language-dropdown li#language-menu:hover { + color: #000 !important; + position: relative; + background: #fff url(../images/arrowDownAccount.gif) right 9px no-repeat; + border-bottom: 1px solid #cdcfcf; +} +ul.language-dropdown li.hover a, +ul.language-dropdown li:hover a { + color: #000 !important; + margin-left:10px; +} +/* LEVEL TWO */ +ul.language-dropdown ul.sub_menu { + font-size: 1.4em; + visibility: hidden; + position: absolute; + top: 100%; + right: 0; + z-index: 999; + color: #000; + width: 100%; +} +ul.language-dropdown ul.sub_menu li { + float: none; + clear: both; + padding-left: 14px !important; + width: 100%; + border-right: none !important; + border-bottom: 1px solid #cdcfcf; + background: #fff url('../images/arrowMenuAccount.gif') no-repeat scroll 7px 8px ; +} +/* IE 6 & 7 Needs Inline Block */ +/* ADD IN IE6.css and IE7.css*/ +ul.language-dropdown ul.sub_menu li a { + width: 90%; + display: inline-block; + color: #000 !important; + background-color: #fff url('../images/arrowMenuAccount.gif') no-repeat scroll 7px 8px ; + padding: 0; + padding-left: 0; + height: 24px; +} +ul.language-dropdown ul.sub_menu li.inactive { + color: #aab0ae !important; + font-size: 1em !important; + width: 88px; */ +} +ul.language-dropdown ul.sub_menu li a:hover, +ul.language-dropdown ul.sub_menu li a.hover { + color: #999 !important; + opacity: 0.6; + filter: alpha(opacity=60); /* For IE8 and earlier */ +} /* ------ MANAGE LABELS ------ */ section#rdfsLabels { margin-left:20px; diff --git a/webapp/web/i18n/all.properties b/webapp/web/i18n/all.properties index 85becab28..22b7ec72a 100644 --- a/webapp/web/i18n/all.properties +++ b/webapp/web/i18n/all.properties @@ -238,7 +238,8 @@ verbose_turn_on = Turn on verbose_turn_off = Turn off resource_uri = Resource URI -individual_not_found = Individual Not Found +individual_not_found = Individual not found: +entity_to_query_for = This id is the id of the entity to query for. netid also works. menu_ordering = Menu Ordering refresh_page_after_reordering = Refresh page after reordering menu items @@ -335,11 +336,11 @@ we_have_an_error = There was an error in the system. error_was_reported = This error has been reported to the site administrator. error_message = Error message stack_trace = Stack trace -trace_available = full trace available in the {0} log +trace_available = full trace available in the vivo log caused_by = Caused by requested_url = Requested url -error_occurred = An error occurred on the {0} site -error_occurred_at = An error occurred on your {0} site at {1}. +error_occurred = An error occurred on the VIVO site +error_occurred_at = An error occurred on your VIVO site at {0}. # # login templates ( /templates/freemarker/body/login ) @@ -425,7 +426,7 @@ undo_camelcasing = Uncamelcasing run_sdb_setup = Run SDB Setup unrecognized_user = Unrecognized user -no_individual_associated_with_id = For some reason, there is no individual in {0} that is associated with your Net ID. Perhaps you should contact your {0} administrator. +no_individual_associated_with_id = For some reason, there is no individual in VIVO that is associated with your Net ID. Perhaps you should contact your VIVO administrator. # # site admin templates ( /templates/freemarker/body/siteAdmin ) @@ -601,7 +602,7 @@ operation_successful = The operation was successful. operation_unsuccessful = The operation was unsuccessful. Full details can be found in the system log. relate_editors_profiles = Relate profile editors and profiles info_icon = info icon -profile_editing_title = The editors you select on the left hand side will have the ability to edit the {0} profiles you select on the right hand side. You can select multiple editors and multiple profiles, but you must select a minimum of 1 each. +profile_editing_title = The editors you select on the left hand side will have the ability to edit the VIVO profiles you select on the right hand side. You can select multiple editors and multiple profiles, but you must select a minimum of 1 each. select_editors = Select editors select_last_name = Select an existing last name processing_indicator = processing time indicator @@ -877,4 +878,5 @@ view_labels_for = View Labels for select_an_existing_document = Select an existing document -datetime_year_required = Date/time intervals must begin with a year. Enter either a Start Year, an End Year or both. \ No newline at end of file +datetime_year_required = Date/time intervals must begin with a year. Enter either a Start Year, an End Year or both. +select_a_language = Select a language \ No newline at end of file diff --git a/webapp/web/js/languageMenuUtils.js b/webapp/web/js/languageMenuUtils.js new file mode 100644 index 000000000..56e665074 --- /dev/null +++ b/webapp/web/js/languageMenuUtils.js @@ -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(); + } + }); + +}); \ No newline at end of file diff --git a/webapp/web/templates/freemarker/page/partials/languageSelector.ftl b/webapp/web/templates/freemarker/page/partials/languageSelector.ftl index 5238d6251..856688dc9 100644 --- a/webapp/web/templates/freemarker/page/partials/languageSelector.ftl +++ b/webapp/web/templates/freemarker/page/partials/languageSelector.ftl @@ -7,14 +7,16 @@ --> <#-- This is included by identity.ftl --> -<#if selectLocale??> +<#if selectLocale??> +
  • <#-- @@ -26,4 +28,11 @@ * -- label (tooltip relative to the current Locale) * -- imageUrl * -- selected (boolean) ---> \ No newline at end of file +--> + + +${scripts.add('')}