More I18n changes.

This commit is contained in:
Paulo Gustavo Veiga 2012-06-30 16:26:31 -03:00
parent cc9f57a153
commit 8e103f44c8
9 changed files with 66 additions and 112 deletions

View File

@ -45,7 +45,6 @@ public class MindMap {
private Set<Collaboration> collaborations = new HashSet<Collaboration>(); private Set<Collaboration> collaborations = new HashSet<Collaboration>();
private User creator; private User creator;
private String properties;
private String tags; private String tags;
private String title; private String title;
private byte[] xml; private byte[] xml;

View File

@ -6,6 +6,7 @@ import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.context.MessageSource; import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.validation.FieldError; import org.springframework.validation.FieldError;
import org.springframework.validation.ObjectError; import org.springframework.validation.ObjectError;
@ -68,11 +69,12 @@ public class RestErrors {
} }
public Map<String, String> getFieldErrors() { public Map<String, String> getFieldErrors() {
Locale locale = LocaleContextHolder.getLocale();
final Map<String, String> result = new HashMap<String, String>(); final Map<String, String> result = new HashMap<String, String>();
if (errors != null) { if (errors != null) {
final List<FieldError> fieldErrors = errors.getFieldErrors(); final List<FieldError> fieldErrors = errors.getFieldErrors();
for (FieldError fieldError : fieldErrors) { for (FieldError fieldError : fieldErrors) {
result.put(fieldError.getField(), messageSource.getMessage(fieldError, Locale.ENGLISH)); result.put(fieldError.getField(), messageSource.getMessage(fieldError, locale));
} }
} }
return result; return result;

View File

@ -71,7 +71,7 @@ public class RestMindmapInfo {
} }
public String getCreator() { public String getCreator() {
return mindmap.getCreator().getUsername(); return mindmap.getCreator().getFullName();
} }
public void setCreator() { public void setCreator() {

View File

@ -1,6 +1,5 @@
NAME=Name NAME=Name
DESCRIPTION=Description DESCRIPTION=Description
FILE_FORMAT=File Format
ADD=Add ADD=Add
VIEWERS=Viewers VIEWERS=Viewers
USER_REGISTRATION=User Registration USER_REGISTRATION=User Registration
@ -40,25 +39,16 @@ SUBJECT=Subject
MSG=Message MSG=Message
PROBLEM_DETAIL=Description PROBLEM_DETAIL=Description
EXPORT=Export EXPORT=Export
EXPORT_MSG=Export
EXPORT_FORMAT=Export Format:
EDIT_PROFILE= Edit your Profile
JPEG_EXPORT_FORMAT=JPEG
PNG_EXPORT_FORMAT=Portable Network Graphics (PNG)
SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG) SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG)
PDF_EXPORT_FORMAT=Portable Document Format (PDF) PDF_EXPORT_FORMAT=Portable Document Format (PDF)
IMG_EXPORT_FORMAT=Image File (PNG/JPEG) IMG_EXPORT_FORMAT=Image File (PNG/JPEG)
FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0) FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0)
WISEMAPPING_EXPORT_FORMAT = WiseMapping WISEMAPPING_EXPORT_FORMAT = WiseMapping
FILE=File
FILE_URL=File URL
STATUS=Status STATUS=Status
LAST_EDITOR=Last Edition
LAST_UPDATE=Last Update LAST_UPDATE=Last Update
LAST_UPDATE_BY=Last Update By LAST_UPDATE_BY=Last Update By
DELETE=Delete DELETE=Delete
EDITOR.LOADING=Loading ...
EDITOR.ERROR_LOADING=An unexpected error has occurred initializing this page. <br/>We'll solve this problem as soon as possible. Please, click <a href="maps/">here</a> to return to your mindmap list. EDITOR.ERROR_LOADING=An unexpected error has occurred initializing this page. <br/>We'll solve this problem as soon as possible. Please, click <a href="maps/">here</a> to return to your mindmap list.
SITE.TITLE=WiseMapping SITE.TITLE=WiseMapping
SITE.SLOGAN=Visual Thinking Evolution SITE.SLOGAN=Visual Thinking Evolution
@ -87,7 +77,6 @@ REGISTRATION_TITLE_MSG=Please, fill the fields and become a member of WiseMappin
CAPTCHA_ERROR=Enter the letters as they are shown in the image above. CAPTCHA_ERROR=Enter the letters as they are shown in the image above.
CREATOR=Creator CREATOR=Creator
CREATION_TIME=Creation Time CREATION_TIME=Creation Time
VIEWS=Views
STATE=State STATE=State
EDITORS=Editors EDITORS=Editors
VIEWER=Viewer VIEWER=Viewer
@ -103,33 +92,23 @@ PUBLISH=Publish
PUBLISH_MSG = What about using your maps in sites and blogs? PUBLISH_MSG = What about using your maps in sites and blogs?
PUBLISH_DETAILS=By publishing the map you make it visible to everyone on the Internet. PUBLISH_DETAILS=By publishing the map you make it visible to everyone on the Internet.
DETAIL=Detail DETAIL=Detail
RECENT_FILES=Recent Maps
INSERT=Insert INSERT=Insert
ACCOUNT_DETAIL=Do you want to change you user options?. Here is the place. ACCOUNT_DETAIL=Do you want to change you user options?. Here is the place.
UNSUPPORTED_BROWSER=Unsupported Browser UNSUPPORTED_BROWSER=Unsupported Browser
FIELD_REQUIRED_MSG=Fields marked with an asterisk <span class="fieldRequired">*</span> are required.
AS_VIEWER=as Viewers
SVG_EXPORT_FORMAT_DETAILS=Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional vector graphics. This format will enable you to print your maps without quality lost at any resolution. SVG_EXPORT_FORMAT_DETAILS=Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional vector graphics. This format will enable you to print your maps without quality lost at any resolution.
PDF_EXPORT_FORMAT_DETAILS=Get your map as Portable Document Format(PDF) to share use in your presentations. PDF_EXPORT_FORMAT_DETAILS=Get your map as Portable Document Format(PDF) to share use in your presentations.
IMG_EXPORT_FORMAT_DETAILS=Get a graphic representation of your map including all colors and shapes to reuse in documents or for archiving IMG_EXPORT_FORMAT_DETAILS=Get a graphic representation of your map including all colors and shapes to reuse in documents or for archiving
FREEMIND_EXPORT_FORMAT_DETAILS = FreeMind is a nice desktop mind mapping application that has the great benefit of being free. FREEMIND_EXPORT_FORMAT_DETAILS = FreeMind is a nice desktop mind mapping application that has the great benefit of being free.
WISEMAPPING_EXPORT_FORMAT_DETAILS = Export your map as WiseMapping document format. WISEMAPPING_EXPORT_FORMAT_DETAILS = Export your map as WiseMapping document format.
DELETE_MAP=Delete Confirmation
TERMSOFUSE=Terms of Use TERMSOFUSE=Terms of Use
PRIVACYPOLICY= Privacy Policy PRIVACYPOLICY= Privacy Policy
EXPORT_DETAILS=Export this map in the format that you want and start using it in your presentations or sharing by email EXPORT_DETAILS=Export this map in the format that you want and start using it in your presentations or sharing by email
PUBLIC_MAP_VIEW=Public Map Info
HERE=here HERE=here
DETAILS=Details
PUBLIC_VIEW_TITLE={0} Map View
WHO_ARE_WE=Who are we? WHO_ARE_WE=Who are we?
MEMBERS=Members MEMBERS=Members
WELCOME=Welcome WELCOME=Welcome
RENAME=Rename RENAME=Rename
RENAME_DETAILS=Change map's name and description
MAX_CHARACTER_SIZE= Maximum allowed message length of 512 characters. MAX_CHARACTER_SIZE= Maximum allowed message length of 512 characters.
PUBLISH_MAP_TO_INTERNET=Publish map to the Internet
URL=URL URL=URL
DIRECT_LINK=Direct Link DIRECT_LINK=Direct Link
BLOG_INCLUSION=You can customize the code snippet to embed this map on your blog or website. Make sure you enter the correct dimensions of the content area of your blog so that the map fits nicely BLOG_INCLUSION=You can customize the code snippet to embed this map on your blog or website. Make sure you enter the correct dimensions of the content area of your blog so that the map fits nicely
@ -176,18 +155,11 @@ IMPORT_MINDMAP_INFO=You can import FreeMind 0.9 and WiseMapping maps to your lis
PRINT=Print PRINT=Print
IMPORT_MAP_ERROR=FreeMind file could not be imported. {0} IMPORT_MAP_ERROR=FreeMind file could not be imported. {0}
MAP_TITLE_ALREADY_EXISTS=You have already a map with the same name MAP_TITLE_ALREADY_EXISTS=You have already a map with the same name
EMBEDDED_VIEWER=Embed a map viewer in your own web site, blog or post!
EMBEDDED_VIEWER_MESSAGE=Once you make your map public, you will be able to embed a mind map viewer in your own web site, blog or post just as we did it here!<br/>Try it!!, you can drag nodes, pan the map, and zoom in and out. EMBEDDED_VIEWER_MESSAGE=Once you make your map public, you will be able to embed a mind map viewer in your own web site, blog or post just as we did it here!<br/>Try it!!, you can drag nodes, pan the map, and zoom in and out.
FREEMIND_EXPORT_IMPORT=Import and Export maps from/to FreeMind
EDITOR_TOOLBAR_IMPROVED=Usability Improvement: The editor toolbar has been redesign
EDITOR_TOOLBAR_IMPROVED_MESSAGE= The toolbar has been redesign to improve its usability.
COLLABORATE=Collaborate COLLABORATE=Collaborate
GO_TO= Go to my maps GO_TO= Go to my maps
JOIN_WISEMAPPING=Join WiseMapping JOIN_WISEMAPPING=Join WiseMapping
IT_IS_FREE=It's free! IT_IS_FREE=It's free!
EDITOR_HELP=A Help button has been placed at the bottom-left corner of the editor. From there you can see all the editor keyboard shortcuts you can use while editing your maps, and a quick tutorial on how to use the editor.
EDITOR_LINKS=Mind Map feature: Add links to the topics
EDITOR_LINKS_SHORT=Add links to the topics
#####FOOTER #####FOOTER
COPYRIGHT=Powered by WiseMapping COPYRIGHT=Powered by WiseMapping
TERMS_AND_CONDITIONS=Terms and Conditions TERMS_AND_CONDITIONS=Terms and Conditions
@ -225,7 +197,6 @@ DELETE_MINDMAP=Delete
DUPLICATE=Duplicate DUPLICATE=Duplicate
CREATE=Create CREATE=Create
LANGUAGE=Language LANGUAGE=Language
IMPORT_MINDMAP=Import Map
FILTERS=Filter FILTERS=Filter
MORE=More MORE=More
ADD_NEW_MAP=Add New Map ADD_NEW_MAP=Add New Map
@ -262,4 +233,7 @@ EMAIL_NOTIFICATION_MESSAGE=Customize Email Notification
ADD_MESSAGE=Add message ADD_MESSAGE=Add message
WHO_CAN_ACCESS=Who has access WHO_CAN_ACCESS=Who has access
IS_OWNER=Is Owner IS_OWNER=Is Owner
OPTIONAL_CUSTOM_MESSAGE=Optional\: Include a personal message OPTIONAL_CUSTOM_MESSAGE=Optional\: Include a personal message
VIEW=view
YOU=You
INFO_UPDATE_SUCCESS=Your info has been changed successfully

View File

@ -20,13 +20,11 @@ SIGN_IN=Ingresar
SIGN_UP=Registrate SIGN_UP=Registrate
ACCOUNT=Mi Cuenta ACCOUNT=Mi Cuenta
USERNAME=Nombre de usuario USERNAME=Nombre de usuario
BACK=Atr&aacute;s
CLOSE=Cerrar CLOSE=Cerrar
NOT_READY_A_USER=Todav&iacute;a no usa WiseMapping? NOT_READY_A_USER=Todav&iacute;a no usa WiseMapping?
NOT_READY_A_USER_MESSAGE=La registraci&oacute;n es r&aacute;pida y gratuita. NOT_READY_A_USER_MESSAGE=La registraci&oacute;n es r&aacute;pida y solo toma un momento.
JOIN_NOW=Inscribete Ahora ! JOIN_NOW=Inscribete Ahora !
MINDMAP=Mindmap MINDMAP=Mindmap
ROLE=Rol
FORGOT_PASSWORD=Se olvid&oacute; la contrase\u00f1a ? FORGOT_PASSWORD=Se olvid&oacute; la contrase\u00f1a ?
CHANGE_PASSWORD=Cambiar la Contrase\u00f1a CHANGE_PASSWORD=Cambiar la Contrase\u00f1a
FAQ=Preguntas Frecuentes FAQ=Preguntas Frecuentes
@ -36,14 +34,10 @@ MSG=Mensaje
PROBLEM_DETAIL=Descripci&oacute;n PROBLEM_DETAIL=Descripci&oacute;n
MIND_FILE=Archivo MIND_FILE=Archivo
EXPORT=Exportar EXPORT=Exportar
EDIT_PROFILE= Editar perfil
PNG_EXPORT_FORMAT=Portable Network Graphics (PNG)
SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG) SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG)
PDF_EXPORT_FORMAT=Portable Document Format (PDF) PDF_EXPORT_FORMAT=Portable Document Format (PDF)
IMG_EXPORT_FORMAT=Imagen IMG_EXPORT_FORMAT=Imagen (PNG/JPEG)
FREEMIND_EXPORT_FORMAT = COMPLETE FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0)
FILE=Archivo
FILE_URL=URL del archivo
STATUS=Estado STATUS=Estado
DELETE=Borrar DELETE=Borrar
SAVE=Guardar SAVE=Guardar
@ -66,10 +60,8 @@ WISEMAPPING_ACCOUNT_MESSAGE=Por favor, verifique la informacion que ha ingresado
REGISTRATION_CLICK_ADVICE= Seleccionando 'Registraci&oacute;n' esta aceptando las condiciones de uso de arriba y la politica de privacidad. REGISTRATION_CLICK_ADVICE= Seleccionando 'Registraci&oacute;n' esta aceptando las condiciones de uso de arriba y la politica de privacidad.
REGISTRATION_TITLE_MSG=Complete el siguiente formulario para convertirse en un miembro de la comunidad de WiseMapping. </br>La registraci\u00f3n es <strong>Gratis</strong> y solo toma un momento. REGISTRATION_TITLE_MSG=Complete el siguiente formulario para convertirse en un miembro de la comunidad de WiseMapping. </br>La registraci\u00f3n es <strong>Gratis</strong> y solo toma un momento.
CAPTCHA_ERROR=Enter the letters as they are shown in the image above. CAPTCHA_ERROR=Enter the letters as they are shown in the image above.
DETAIL_INFORMATION=Detalles
CREATOR=Creador CREATOR=Creador
CREATION_TIME=Fecha de creaci&oacute;n CREATION_TIME=Fecha de creaci&oacute;n
VIEWS=Vistas
STATE=Estado STATE=Estado
EDITORS=Editores EDITORS=Editores
PUBLIC=P&uacute;blico PUBLIC=P&uacute;blico
@ -77,28 +69,12 @@ SHARED=Compartido
ONLY_VIEW_PRIVATE = Este documento solo puede ser visualizado por usted. ONLY_VIEW_PRIVATE = Este documento solo puede ser visualizado por usted.
ALL_VIEW_PUBLIC = Este documento puede ser visualizado por cualquier usuario. ALL_VIEW_PUBLIC = Este documento puede ser visualizado por cualquier usuario.
NEW_MAP_MSG=Crear un nuevo mapa NEW_MAP_MSG=Crear un nuevo mapa
TAG=Etiqueta
PUBLISH=Publicar PUBLISH=Publicar
PUBLISH_MSG = Que le parece usar sus mapas desde sus sitios y blogs?
PUBLISH_DETAILS=Publicando el mapa hara que el mismo sea visible por cualquier persona que utlice Internet. Copie el c&oacute;digo de abajo para integrar el mapa con su sitio web o blog. PUBLISH_DETAILS=Publicando el mapa hara que el mismo sea visible por cualquier persona que utlice Internet. Copie el c&oacute;digo de abajo para integrar el mapa con su sitio web o blog.
DETAIL=Detalle
RECENT_FILES=Mapas Recientes
MINDMAP_DETAIL = Detalle de Mind Map
EDIT=Editar
INSERT=Insertar INSERT=Insertar
EDITOR.LAST_SAVED=ultima modificaci\u00f3n hecha por {0}
SHARE_IT=Compartilo
ACCOUNT_DETAIL=Desea cambiar sus preferencias? Este es el lugar. ACCOUNT_DETAIL=Desea cambiar sus preferencias? Este es el lugar.
UNSUPPORTED_BROWSER=Navegador no soportado UNSUPPORTED_BROWSER=Navegador no soportado
FIELD_REQUIRED_MSG=Fields marked with an asterisk <span class="fieldRequired">*</span> are required. SVG_EXPORT_FORMAT_DETAILS=Scalable Vector Graphics (SVG) es un XML markup language para describir gr\u00e1ficos vectoriale de dos dimensiones. Este formato le permitira imprimir sus mapas sin perdida de calidad o resoluci&oacute;n.
INVITE_USERS=Invitar usuarios
AS_COLLABORATOR=como Colaborador
AS_VIEWER=como Lector
CUSTOMIZE_INVITATION=Editar Invitaci&oacute;n
INVITATION=Invitaci&oacute;n
INVITATION_MSG= Acabo de compartir un mapa mental con usted.\nIngrese a www.wisemapping.com y podra visualizarlo en su lista de mapas.
SVG_EXPORT_FORMAT_DETAILS=Scalable Vector Graphics (SVG) es un XML markup language para describir greficos vectoriale de dos dimensiones. Este formato le permitira imprimir sus mapas sin perdida de calidad o resoluci&oacute;n.
PDF_EXPORT_FORMAT_DETAILS=Obtenga su mapa como un documento (PDF) para compartirlo y usarlo en sus presentaciones. PDF_EXPORT_FORMAT_DETAILS=Obtenga su mapa como un documento (PDF) para compartirlo y usarlo en sus presentaciones.
IMG_EXPORT_FORMAT_DETAILS=Obtenga una representaci&oacute;n grafica de su mapa incluyendo todo los colores y formas para reusarlo en documentos o para ser archivado IMG_EXPORT_FORMAT_DETAILS=Obtenga una representaci&oacute;n grafica de su mapa incluyendo todo los colores y formas para reusarlo en documentos o para ser archivado
FREEMIND_EXPORT_FORMAT_DETAILS = FreeMind un aplicaci&oacute;n de escritorio gratuita de diseno de mapas mentales FREEMIND_EXPORT_FORMAT_DETAILS = FreeMind un aplicaci&oacute;n de escritorio gratuita de diseno de mapas mentales
@ -113,7 +89,6 @@ WELCOME=Bienvenido
NO_HISTORY_RESULTS=No existen cambios registrados para el mapa seleccionado NO_HISTORY_RESULTS=No existen cambios registrados para el mapa seleccionado
RENAME=Renombrar RENAME=Renombrar
BLOG_SNIPPET=Copie el pedazo de c\u00f3digo para embeber el map en un blog o en una p\u00e1gina. BLOG_SNIPPET=Copie el pedazo de c\u00f3digo para embeber el map en un blog o en una p\u00e1gina.
RENAME_DETAILS=Cambiar el nombre y descripci&oacute;n del mapa
MAX_CHARACTER_SIZE= El m&aacute;ximo mensaje permitido puede contener 512 caracteres. MAX_CHARACTER_SIZE= El m&aacute;ximo mensaje permitido puede contener 512 caracteres.
URL=URL URL=URL
DIRECT_LINK=Enlace directo DIRECT_LINK=Enlace directo
@ -155,12 +130,11 @@ CONTACT=Contacto
KEYBOARD=Atajos de Teclado KEYBOARD=Atajos de Teclado
KEYBOARD_MSG=Estos son los atajos de teclado que puede utilizar en el editor! KEYBOARD_MSG=Estos son los atajos de teclado que puede utilizar en el editor!
FIRST_STEPS=Los Primeros Pasos en el Editor
FIRST_STEPS_MSG=Haga estos primeros pacitos en 2 minutos, y comience a correr en 5!
BROWSER=Browse BROWSER=Browse
UNDO_EDITION=Undo Edition UNDO_EDITION=Undo Edition
REDO_EDITION=Redo Edition REDO_EDITION=Redo Edition
REVERT=revert REVERT=revertir
EXPORT_FORMAT_RESTRICTIONS=Important: Exporting to Image, PDF or SVG is available only in the editor toolbar. EXPORT_FORMAT_RESTRICTIONS=Important: Exporting to Image, PDF or SVG is available only in the editor toolbar.
STARRED=Importantes STARRED=Importantes
LINK=URL LINK=URL
@ -223,9 +197,9 @@ ACCOUNT_DOES_NOT_EXISTS_SUPPORT=Si el problema persiste, env\u00ede un e-mail a
SENDING=Enviando ... SENDING=Enviando ...
SIGN_ING=Ingresando ... SIGN_ING=Ingresando ...
ENABLE_PUBLISHING=Habilitar publicaci\u00f3n ENABLE_PUBLISHING=Habilitar publicaci\u00f3n
FRAME_HEIGHT=Frame height FRAME_HEIGHT=Alto
FRAME_WIDTH=Frame width FRAME_WIDTH=Ancho
EMBED=Embed EMBED=Embeber
PUBLIC_URL=Direcci\u00f3n URL PUBLIC_URL=Direcci\u00f3n URL
ADD_PEOPLE=Agregar Colaboradores ADD_PEOPLE=Agregar Colaboradores
COLLABORATORS_SEPARATED_BY_COMA=Ingrese una lista de e-mails de colaboradores separada por comas COLLABORATORS_SEPARATED_BY_COMA=Ingrese una lista de e-mails de colaboradores separada por comas
@ -235,6 +209,9 @@ EMAIL_NOTIFICATION_MESSAGE=Personalizar e-mail
ADD_MESSAGE=Agregar un mensaje ADD_MESSAGE=Agregar un mensaje
WHO_CAN_ACCESS=Quienes pueden acceder WHO_CAN_ACCESS=Quienes pueden acceder
IS_OWNER=Es due\u00f1o IS_OWNER=Es due\u00f1o
OPTIONAL_CUSTOM_MESSAGE=Optional\: Include a personal message OPTIONAL_CUSTOM_MESSAGE=Opcional\: Incluir un mensaje personalizado
IMPORT_MINDMAP_INFO=Es posible importar mapas en formato FreeMind 0.9 and WiseMapping. Seleccione el file a importar IMPORT_MINDMAP_INFO=Es posible importar mapas en formato FreeMind 0.9 and WiseMapping. Seleccione el archivo a importar.
VIEW=ver
YOU=Vos
INFO_UPDATE_SUCCESS=Your info has been changed successfully

View File

@ -111,15 +111,15 @@
var fistname = $('#changeUserForm #firstname').val(); var fistname = $('#changeUserForm #firstname').val();
var lastname = $('#changeUserForm #lastname').val(); var lastname = $('#changeUserForm #lastname').val();
postChange("service/account/firstname", fistname, 'changeInfoMsg', 'Your info has been changed successfully'); postChange("service/account/firstname", fistname, 'changeInfoMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
postChange("service/account/lastname", lastname, 'changeInfoMsg', 'Your info has been changed successfully'); postChange("service/account/lastname", lastname, 'changeInfoMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
event.preventDefault(); event.preventDefault();
}); });
$('#languageForm').submit(function (event) { $('#languageForm').submit(function (event) {
var locale = $('#languageForm option:selected').val(); var locale = $('#languageForm option:selected').val();
postChange("service/account/locale", locale, 'languageMsg', 'Your info has been changed successfully'); postChange("service/account/locale", locale, 'languageMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
event.preventDefault(); event.preventDefault();
}); });
</script> </script>

View File

@ -81,7 +81,7 @@
<div id="headerLogo"></div> <div id="headerLogo"></div>
</a> </a>
<div id="headerMapTitle">Title: <span>${mindmap.title}</span></div> <div id="headerMapTitle"><spring:message code="NAME"/>: <span>${mindmap.title}</span></div>
</div> </div>
<%@ include file="/jsp/mindmapEditorToolbar.jsf" %> <%@ include file="/jsp/mindmapEditorToolbar.jsf" %>
</div> </div>

View File

@ -38,8 +38,8 @@
<tr data-history-id="' + this.id + '">\ <tr data-history-id="' + this.id + '">\
<td>' + this.creator + '</td>\ <td>' + this.creator + '</td>\
<td><abbr class="timeago" title="' + this.creationTime + '">' + jQuery.timeago(this.creationTime) + '</abbr></td>\ <td><abbr class="timeago" title="' + this.creationTime + '">' + jQuery.timeago(this.creationTime) + '</abbr></td>\
<td><a class="view" href="#">view</a></td>\ <td><a class="view" href="#"><spring:message code="VIEW"/></a></td>\
<td><a class="revert" href="#">revert</a></td>\ <td><a class="revert" href="#"><spring:message code="REVERT"/></a></td>\
</tr>'); </tr>');
}); });
} else { } else {
@ -64,7 +64,7 @@
}, },
error:function (jqXHR, textStatus, errorThrown) { error:function (jqXHR, textStatus, errorThrown) {
console.log(textStatus); console.l(textStatus);
} }
}); });
</script> </script>

View File

@ -15,7 +15,7 @@
} }
#collabEmails { #collabEmails {
width: 300px; width: 250px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-bottom: 0; margin-bottom: 0;
@ -44,9 +44,9 @@
<div id="sharingContainer"> <div id="sharingContainer">
<table class="table" id="collabsTable"> <table class="table" id="collabsTable">
<colgroup> <colgroup>
<col width="70%"/> <col width="65%"/>
<col width="20%"/> <col width="30%"/>
<col width="10%"/> <col width="5%"/>
</colgroup> </colgroup>
</table> </table>
</div> </div>
@ -72,7 +72,9 @@
<button id="addBtn" class="btn btn-primary"><spring:message code="ADD"/></button> <button id="addBtn" class="btn btn-primary"><spring:message code="ADD"/></button>
</div> </div>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<p><strong><spring:message code="EMAIL_NOTIFICATION_MESSAGE"/></strong> - <a href="#" id="addMessageLink"><spring:message code="ADD_MESSAGE"/></a></p> <p><strong><spring:message code="EMAIL_NOTIFICATION_MESSAGE"/></strong> - <a href="#"
id="addMessageLink"><spring:message
code="ADD_MESSAGE"/></a></p>
<textarea cols="4" id="collabMessage" placeholder="<spring:message code="OPTIONAL_CUSTOM_MESSAGE"/>"> <textarea cols="4" id="collabMessage" placeholder="<spring:message code="OPTIONAL_CUSTOM_MESSAGE"/>">
</textarea> </textarea>
@ -85,15 +87,15 @@
$("#errorMsg").hide(); $("#errorMsg").hide();
$("#collabMessage").hide(); $("#collabMessage").hide();
$("#addMessageLink").click(function(event) { $("#addMessageLink").click(function (event) {
$("#collabMessage").toggle().val(""); $("#collabMessage").toggle().val("");
event.preventDefault(); event.preventDefault();
}); });
var messages = { var messages = {
owner: '<spring:message code="IS_OWNER"/>', owner:'<spring:message code="IS_OWNER"/>',
editor: '<spring:message code="CAN_EDIT"/>', editor:'<spring:message code="CAN_EDIT"/>',
viewer: '<spring:message code="CAN_VIEW"/>'}; viewer:'<spring:message code="CAN_VIEW"/>'};
function onClickShare(aElem) { function onClickShare(aElem) {
var role = $(aElem).attr('data-role'); var role = $(aElem).attr('data-role');
@ -130,7 +132,7 @@ function addCollaboration(email, role, changeType) {
// Register change role event ... // Register change role event ...
var rowElem = $("#collabsTable tr:last"); var rowElem = $("#collabsTable tr:last");
$(rowElem.find(".dropdown-menu a").click(function() { $(rowElem.find(".dropdown-menu a").click(function () {
reportError(null); reportError(null);
var role = onClickShare(this); var role = onClickShare(this);
rowElem.attr('data-role', role); rowElem.attr('data-role', role);
@ -139,7 +141,7 @@ function addCollaboration(email, role, changeType) {
rowElem.find('.dropdown-menu a[data-role="' + role + '"]').click(); rowElem.find('.dropdown-menu a[data-role="' + role + '"]').click();
// Register remove event ... // Register remove event ...
rowElem.find("td:last a").click(function(event) { rowElem.find("td:last a").click(function (event) {
reportError(null); reportError(null);
var email = rowElem.attr('data-collab'); var email = rowElem.attr('data-collab');
removeCollab(email); removeCollab(email);
@ -147,7 +149,7 @@ function addCollaboration(email, role, changeType) {
}); });
} else { } else {
rowStr = '<tr data-collab=' + email + ' data-role="' + role + '">\ rowStr = '<tr data-collab=' + email + ' data-role="' + role + '">\
<td>' + email + ' (You)</td>\ <td>' + email + ' (<spring:message code="YOU"/>)</td>\
<td><button class="btn btn-secondary">' + messages[role] + '</button></td>\ <td><button class="btn btn-secondary">' + messages[role] + '</button></td>\
<td></td>\ <td></td>\
</tr>'; </tr>';
@ -156,20 +158,20 @@ function addCollaboration(email, role, changeType) {
} }
} }
var removeCollab = function(email) { var removeCollab = function (email) {
// Remove html entry ... // Remove html entry ...
$('#collabsTable tr[data-collab="' + email + '"]').detach(); $('#collabsTable tr[data-collab="' + email + '"]').detach();
}; };
$(function() { $(function () {
jQuery.ajax("service/maps/${mindmap.id}/collabs", { jQuery.ajax("service/maps/${mindmap.id}/collabs", {
async:false, async:false,
dataType: 'json', dataType:'json',
type: 'GET', type:'GET',
contentType:"text/plain", contentType:"text/plain",
success : function(data, textStatus, jqXHR) { success:function (data, textStatus, jqXHR) {
// Owner roles is the first in the table ... // Owner roles is the first in the table ...
var collabs = data.collaborations.sort(function(a, b) { var collabs = data.collaborations.sort(function (a, b) {
return a.role <= b.role; return a.role <= b.role;
}); });
@ -180,14 +182,14 @@ $(function() {
} }
}, },
error:function(jqXHR, textStatus, errorThrown) { error:function (jqXHR, textStatus, errorThrown) {
alert(textStatus); alert(textStatus);
} }
}); });
}); });
$("#addBtn").click(function(event) { $("#addBtn").click(function (event) {
var i,email; var i, email;
var emailsStr = $("#collabEmails").val(); var emailsStr = $("#collabEmails").val();
var role = $("#shareRole").attr('data-role'); var role = $("#shareRole").attr('data-role');
@ -196,7 +198,7 @@ $("#addBtn").click(function(event) {
// Split emails ... // Split emails ...
var valid = true; var valid = true;
if (emailsStr.length > 0) { if (emailsStr.length > 0) {
var emails = jQuery.grep(emailsStr.split(/[;|,|\s]/), function(val) { var emails = jQuery.grep(emailsStr.split(/[;|,|\s]/), function (val) {
return val.length > 0 return val.length > 0
}); });
@ -210,7 +212,7 @@ $("#addBtn").click(function(event) {
// Is there a collab with the same email ? // Is there a collab with the same email ?
var useExists = jQuery.grep(model.collaborations, var useExists = jQuery.grep(model.collaborations,
function(val) { function (val) {
return val.email.trim() == email.trim(); return val.email.trim() == email.trim();
}).length > 0; }).length > 0;
@ -231,13 +233,13 @@ $("#addBtn").click(function(event) {
$("#collabEmails").val(""); $("#collabEmails").val("");
for (i = 0; i < emails.length; i++) { for (i = 0; i < emails.length; i++) {
email = emails[i]; email = emails[i];
addCollaboration(email, role, 'New'); addCollaboration(email, role, '<spring:message code="NEW"/>');
} }
} }
}); });
// Register change event ... // Register change event ...
$("#shareRole a").click(function() { $("#shareRole a").click(function () {
var role = onClickShare(this); var role = onClickShare(this);
$(this).parent().attr('data-role', role); $(this).parent().attr('data-role', role);
@ -259,10 +261,10 @@ function reportError(msg) {
} }
function buildCollabModel() { function buildCollabModel() {
var collabs = $('#collabsTable tr').map(function() { var collabs = $('#collabsTable tr').map(function () {
return { return {
email: $(this).attr('data-collab'), email:$(this).attr('data-collab'),
role: $(this).attr('data-role') role:$(this).attr('data-role')
}; };
}); });
collabs = jQuery.makeArray(collabs); collabs = jQuery.makeArray(collabs);
@ -274,24 +276,24 @@ function buildCollabModel() {
} }
// Hook for interaction with the main parent window ... // Hook for interaction with the main parent window ...
var submitDialogForm = function() { var submitDialogForm = function () {
var collabs = buildCollabModel(); var collabs = buildCollabModel();
collabs.collaborations = jQuery.grep(collabs.collaborations, function() { collabs.collaborations = jQuery.grep(collabs.collaborations, function () {
return this.role != 'owner'; return this.role != 'owner';
}); });
collabs['message'] = $("#collabMessage").val(); collabs['message'] = $("#collabMessage").val();
jQuery.ajax("service/maps/${mindmap.id}/collabs", { jQuery.ajax("service/maps/${mindmap.id}/collabs", {
async:false, async:false,
dataType: 'json', dataType:'json',
type: 'PUT', type:'PUT',
data: JSON.stringify(collabs), data:JSON.stringify(collabs),
contentType:"application/json", contentType:"application/json",
success : function(data, textStatus, jqXHR) { success:function (data, textStatus, jqXHR) {
$('#share-dialog-modal').modal('hide'); $('#share-dialog-modal').modal('hide');
}, },
error: function(jqXHR, textStatus, errorThrown) { error:function (jqXHR, textStatus, errorThrown) {
reportError(textStatus); reportError(textStatus);
} }
}); });