mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-08-20 04:30:42 +02:00
More I18n changes.
This commit is contained in:
parent
cc9f57a153
commit
8e103f44c8
@ -45,7 +45,6 @@ public class MindMap {
|
||||
private Set<Collaboration> collaborations = new HashSet<Collaboration>();
|
||||
|
||||
private User creator;
|
||||
private String properties;
|
||||
private String tags;
|
||||
private String title;
|
||||
private byte[] xml;
|
||||
|
@ -6,6 +6,7 @@ import org.codehaus.jackson.annotate.JsonIgnore;
|
||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.validation.Errors;
|
||||
import org.springframework.validation.FieldError;
|
||||
import org.springframework.validation.ObjectError;
|
||||
@ -68,11 +69,12 @@ public class RestErrors {
|
||||
}
|
||||
|
||||
public Map<String, String> getFieldErrors() {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
final Map<String, String> result = new HashMap<String, String>();
|
||||
if (errors != null) {
|
||||
final List<FieldError> fieldErrors = errors.getFieldErrors();
|
||||
for (FieldError fieldError : fieldErrors) {
|
||||
result.put(fieldError.getField(), messageSource.getMessage(fieldError, Locale.ENGLISH));
|
||||
result.put(fieldError.getField(), messageSource.getMessage(fieldError, locale));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -71,7 +71,7 @@ public class RestMindmapInfo {
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return mindmap.getCreator().getUsername();
|
||||
return mindmap.getCreator().getFullName();
|
||||
}
|
||||
|
||||
public void setCreator() {
|
||||
|
@ -1,6 +1,5 @@
|
||||
NAME=Name
|
||||
DESCRIPTION=Description
|
||||
FILE_FORMAT=File Format
|
||||
ADD=Add
|
||||
VIEWERS=Viewers
|
||||
USER_REGISTRATION=User Registration
|
||||
@ -40,25 +39,16 @@ SUBJECT=Subject
|
||||
MSG=Message
|
||||
PROBLEM_DETAIL=Description
|
||||
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)
|
||||
PDF_EXPORT_FORMAT=Portable Document Format (PDF)
|
||||
IMG_EXPORT_FORMAT=Image File (PNG/JPEG)
|
||||
FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0)
|
||||
WISEMAPPING_EXPORT_FORMAT = WiseMapping
|
||||
FILE=File
|
||||
FILE_URL=File URL
|
||||
STATUS=Status
|
||||
LAST_EDITOR=Last Edition
|
||||
LAST_UPDATE=Last Update
|
||||
LAST_UPDATE_BY=Last Update By
|
||||
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.
|
||||
SITE.TITLE=WiseMapping
|
||||
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.
|
||||
CREATOR=Creator
|
||||
CREATION_TIME=Creation Time
|
||||
VIEWS=Views
|
||||
STATE=State
|
||||
EDITORS=Editors
|
||||
VIEWER=Viewer
|
||||
@ -103,33 +92,23 @@ PUBLISH=Publish
|
||||
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.
|
||||
DETAIL=Detail
|
||||
RECENT_FILES=Recent Maps
|
||||
INSERT=Insert
|
||||
ACCOUNT_DETAIL=Do you want to change you user options?. Here is the place.
|
||||
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.
|
||||
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
|
||||
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.
|
||||
DELETE_MAP=Delete Confirmation
|
||||
TERMSOFUSE=Terms of Use
|
||||
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
|
||||
PUBLIC_MAP_VIEW=Public Map Info
|
||||
HERE=here
|
||||
DETAILS=Details
|
||||
PUBLIC_VIEW_TITLE={0} Map View
|
||||
WHO_ARE_WE=Who are we?
|
||||
MEMBERS=Members
|
||||
WELCOME=Welcome
|
||||
|
||||
RENAME=Rename
|
||||
RENAME_DETAILS=Change map's name and description
|
||||
MAX_CHARACTER_SIZE= Maximum allowed message length of 512 characters.
|
||||
PUBLISH_MAP_TO_INTERNET=Publish map to the Internet
|
||||
URL=URL
|
||||
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
|
||||
@ -176,18 +155,11 @@ IMPORT_MINDMAP_INFO=You can import FreeMind 0.9 and WiseMapping maps to your lis
|
||||
PRINT=Print
|
||||
IMPORT_MAP_ERROR=FreeMind file could not be imported. {0}
|
||||
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.
|
||||
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
|
||||
GO_TO= Go to my maps
|
||||
JOIN_WISEMAPPING=Join WiseMapping
|
||||
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
|
||||
COPYRIGHT=Powered by WiseMapping
|
||||
TERMS_AND_CONDITIONS=Terms and Conditions
|
||||
@ -225,7 +197,6 @@ DELETE_MINDMAP=Delete
|
||||
DUPLICATE=Duplicate
|
||||
CREATE=Create
|
||||
LANGUAGE=Language
|
||||
IMPORT_MINDMAP=Import Map
|
||||
FILTERS=Filter
|
||||
MORE=More
|
||||
ADD_NEW_MAP=Add New Map
|
||||
@ -262,4 +233,7 @@ EMAIL_NOTIFICATION_MESSAGE=Customize Email Notification
|
||||
ADD_MESSAGE=Add message
|
||||
WHO_CAN_ACCESS=Who has access
|
||||
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
|
@ -20,13 +20,11 @@ SIGN_IN=Ingresar
|
||||
SIGN_UP=Registrate
|
||||
ACCOUNT=Mi Cuenta
|
||||
USERNAME=Nombre de usuario
|
||||
BACK=Atrás
|
||||
CLOSE=Cerrar
|
||||
NOT_READY_A_USER=Todavía no usa WiseMapping?
|
||||
NOT_READY_A_USER_MESSAGE=La registración es rápida y gratuita.
|
||||
NOT_READY_A_USER_MESSAGE=La registración es rápida y solo toma un momento.
|
||||
JOIN_NOW=Inscribete Ahora !
|
||||
MINDMAP=Mindmap
|
||||
ROLE=Rol
|
||||
FORGOT_PASSWORD=Se olvidó la contrase\u00f1a ?
|
||||
CHANGE_PASSWORD=Cambiar la Contrase\u00f1a
|
||||
FAQ=Preguntas Frecuentes
|
||||
@ -36,14 +34,10 @@ MSG=Mensaje
|
||||
PROBLEM_DETAIL=Descripción
|
||||
MIND_FILE=Archivo
|
||||
EXPORT=Exportar
|
||||
EDIT_PROFILE= Editar perfil
|
||||
PNG_EXPORT_FORMAT=Portable Network Graphics (PNG)
|
||||
SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG)
|
||||
PDF_EXPORT_FORMAT=Portable Document Format (PDF)
|
||||
IMG_EXPORT_FORMAT=Imagen
|
||||
FREEMIND_EXPORT_FORMAT = COMPLETE
|
||||
FILE=Archivo
|
||||
FILE_URL=URL del archivo
|
||||
IMG_EXPORT_FORMAT=Imagen (PNG/JPEG)
|
||||
FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0)
|
||||
STATUS=Estado
|
||||
DELETE=Borrar
|
||||
SAVE=Guardar
|
||||
@ -66,10 +60,8 @@ WISEMAPPING_ACCOUNT_MESSAGE=Por favor, verifique la informacion que ha ingresado
|
||||
REGISTRATION_CLICK_ADVICE= Seleccionando 'Registració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.
|
||||
CAPTCHA_ERROR=Enter the letters as they are shown in the image above.
|
||||
DETAIL_INFORMATION=Detalles
|
||||
CREATOR=Creador
|
||||
CREATION_TIME=Fecha de creación
|
||||
VIEWS=Vistas
|
||||
STATE=Estado
|
||||
EDITORS=Editores
|
||||
PUBLIC=Público
|
||||
@ -77,28 +69,12 @@ SHARED=Compartido
|
||||
ONLY_VIEW_PRIVATE = Este documento solo puede ser visualizado por usted.
|
||||
ALL_VIEW_PUBLIC = Este documento puede ser visualizado por cualquier usuario.
|
||||
NEW_MAP_MSG=Crear un nuevo mapa
|
||||
|
||||
TAG=Etiqueta
|
||||
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ó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
|
||||
EDITOR.LAST_SAVED=ultima modificaci\u00f3n hecha por {0}
|
||||
SHARE_IT=Compartilo
|
||||
ACCOUNT_DETAIL=Desea cambiar sus preferencias? Este es el lugar.
|
||||
UNSUPPORTED_BROWSER=Navegador no soportado
|
||||
FIELD_REQUIRED_MSG=Fields marked with an asterisk <span class="fieldRequired">*</span> are required.
|
||||
INVITE_USERS=Invitar usuarios
|
||||
AS_COLLABORATOR=como Colaborador
|
||||
AS_VIEWER=como Lector
|
||||
CUSTOMIZE_INVITATION=Editar Invitación
|
||||
INVITATION=Invitació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ón.
|
||||
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ón.
|
||||
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ó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ó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
|
||||
RENAME=Renombrar
|
||||
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ón del mapa
|
||||
MAX_CHARACTER_SIZE= El máximo mensaje permitido puede contener 512 caracteres.
|
||||
URL=URL
|
||||
DIRECT_LINK=Enlace directo
|
||||
@ -155,12 +130,11 @@ CONTACT=Contacto
|
||||
|
||||
KEYBOARD=Atajos de Teclado
|
||||
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
|
||||
UNDO_EDITION=Undo 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.
|
||||
STARRED=Importantes
|
||||
LINK=URL
|
||||
@ -223,9 +197,9 @@ ACCOUNT_DOES_NOT_EXISTS_SUPPORT=Si el problema persiste, env\u00ede un e-mail a
|
||||
SENDING=Enviando ...
|
||||
SIGN_ING=Ingresando ...
|
||||
ENABLE_PUBLISHING=Habilitar publicaci\u00f3n
|
||||
FRAME_HEIGHT=Frame height
|
||||
FRAME_WIDTH=Frame width
|
||||
EMBED=Embed
|
||||
FRAME_HEIGHT=Alto
|
||||
FRAME_WIDTH=Ancho
|
||||
EMBED=Embeber
|
||||
PUBLIC_URL=Direcci\u00f3n URL
|
||||
ADD_PEOPLE=Agregar Colaboradores
|
||||
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
|
||||
WHO_CAN_ACCESS=Quienes pueden acceder
|
||||
IS_OWNER=Es due\u00f1o
|
||||
OPTIONAL_CUSTOM_MESSAGE=Optional\: Include a personal message
|
||||
IMPORT_MINDMAP_INFO=Es posible importar mapas en formato FreeMind 0.9 and WiseMapping. Seleccione el file a importar
|
||||
OPTIONAL_CUSTOM_MESSAGE=Opcional\: Incluir un mensaje personalizado
|
||||
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
|
||||
|
||||
|
@ -111,15 +111,15 @@
|
||||
|
||||
var fistname = $('#changeUserForm #firstname').val();
|
||||
var lastname = $('#changeUserForm #lastname').val();
|
||||
postChange("service/account/firstname", fistname, 'changeInfoMsg', 'Your info has been changed successfully');
|
||||
postChange("service/account/lastname", lastname, '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', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$('#languageForm').submit(function (event) {
|
||||
|
||||
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();
|
||||
});
|
||||
</script>
|
||||
|
@ -81,7 +81,7 @@
|
||||
<div id="headerLogo"></div>
|
||||
</a>
|
||||
|
||||
<div id="headerMapTitle">Title: <span>${mindmap.title}</span></div>
|
||||
<div id="headerMapTitle"><spring:message code="NAME"/>: <span>${mindmap.title}</span></div>
|
||||
</div>
|
||||
<%@ include file="/jsp/mindmapEditorToolbar.jsf" %>
|
||||
</div>
|
||||
|
@ -38,8 +38,8 @@
|
||||
<tr data-history-id="' + this.id + '">\
|
||||
<td>' + this.creator + '</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="revert" href="#">revert</a></td>\
|
||||
<td><a class="view" href="#"><spring:message code="VIEW"/></a></td>\
|
||||
<td><a class="revert" href="#"><spring:message code="REVERT"/></a></td>\
|
||||
</tr>');
|
||||
});
|
||||
} else {
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
},
|
||||
error:function (jqXHR, textStatus, errorThrown) {
|
||||
console.log(textStatus);
|
||||
console.l(textStatus);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -15,7 +15,7 @@
|
||||
}
|
||||
|
||||
#collabEmails {
|
||||
width: 300px;
|
||||
width: 250px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 0;
|
||||
@ -44,9 +44,9 @@
|
||||
<div id="sharingContainer">
|
||||
<table class="table" id="collabsTable">
|
||||
<colgroup>
|
||||
<col width="70%"/>
|
||||
<col width="20%"/>
|
||||
<col width="10%"/>
|
||||
<col width="65%"/>
|
||||
<col width="30%"/>
|
||||
<col width="5%"/>
|
||||
</colgroup>
|
||||
</table>
|
||||
</div>
|
||||
@ -72,7 +72,9 @@
|
||||
<button id="addBtn" class="btn btn-primary"><spring:message code="ADD"/></button>
|
||||
</div>
|
||||
<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>
|
||||
@ -85,15 +87,15 @@
|
||||
$("#errorMsg").hide();
|
||||
$("#collabMessage").hide();
|
||||
|
||||
$("#addMessageLink").click(function(event) {
|
||||
$("#addMessageLink").click(function (event) {
|
||||
$("#collabMessage").toggle().val("");
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
var messages = {
|
||||
owner: '<spring:message code="IS_OWNER"/>',
|
||||
editor: '<spring:message code="CAN_EDIT"/>',
|
||||
viewer: '<spring:message code="CAN_VIEW"/>'};
|
||||
owner:'<spring:message code="IS_OWNER"/>',
|
||||
editor:'<spring:message code="CAN_EDIT"/>',
|
||||
viewer:'<spring:message code="CAN_VIEW"/>'};
|
||||
|
||||
function onClickShare(aElem) {
|
||||
var role = $(aElem).attr('data-role');
|
||||
@ -130,7 +132,7 @@ function addCollaboration(email, role, changeType) {
|
||||
|
||||
// Register change role event ...
|
||||
var rowElem = $("#collabsTable tr:last");
|
||||
$(rowElem.find(".dropdown-menu a").click(function() {
|
||||
$(rowElem.find(".dropdown-menu a").click(function () {
|
||||
reportError(null);
|
||||
var role = onClickShare(this);
|
||||
rowElem.attr('data-role', role);
|
||||
@ -139,7 +141,7 @@ function addCollaboration(email, role, changeType) {
|
||||
rowElem.find('.dropdown-menu a[data-role="' + role + '"]').click();
|
||||
|
||||
// Register remove event ...
|
||||
rowElem.find("td:last a").click(function(event) {
|
||||
rowElem.find("td:last a").click(function (event) {
|
||||
reportError(null);
|
||||
var email = rowElem.attr('data-collab');
|
||||
removeCollab(email);
|
||||
@ -147,7 +149,7 @@ function addCollaboration(email, role, changeType) {
|
||||
});
|
||||
} else {
|
||||
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></td>\
|
||||
</tr>';
|
||||
@ -156,20 +158,20 @@ function addCollaboration(email, role, changeType) {
|
||||
}
|
||||
}
|
||||
|
||||
var removeCollab = function(email) {
|
||||
var removeCollab = function (email) {
|
||||
// Remove html entry ...
|
||||
$('#collabsTable tr[data-collab="' + email + '"]').detach();
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$(function () {
|
||||
jQuery.ajax("service/maps/${mindmap.id}/collabs", {
|
||||
async:false,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
dataType:'json',
|
||||
type:'GET',
|
||||
contentType:"text/plain",
|
||||
success : function(data, textStatus, jqXHR) {
|
||||
success:function (data, textStatus, jqXHR) {
|
||||
// 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;
|
||||
});
|
||||
|
||||
@ -180,14 +182,14 @@ $(function() {
|
||||
}
|
||||
|
||||
},
|
||||
error:function(jqXHR, textStatus, errorThrown) {
|
||||
error:function (jqXHR, textStatus, errorThrown) {
|
||||
alert(textStatus);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#addBtn").click(function(event) {
|
||||
var i,email;
|
||||
$("#addBtn").click(function (event) {
|
||||
var i, email;
|
||||
var emailsStr = $("#collabEmails").val();
|
||||
var role = $("#shareRole").attr('data-role');
|
||||
|
||||
@ -196,7 +198,7 @@ $("#addBtn").click(function(event) {
|
||||
// Split emails ...
|
||||
var valid = true;
|
||||
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
|
||||
});
|
||||
|
||||
@ -210,7 +212,7 @@ $("#addBtn").click(function(event) {
|
||||
|
||||
// Is there a collab with the same email ?
|
||||
var useExists = jQuery.grep(model.collaborations,
|
||||
function(val) {
|
||||
function (val) {
|
||||
return val.email.trim() == email.trim();
|
||||
}).length > 0;
|
||||
|
||||
@ -231,13 +233,13 @@ $("#addBtn").click(function(event) {
|
||||
$("#collabEmails").val("");
|
||||
for (i = 0; i < emails.length; i++) {
|
||||
email = emails[i];
|
||||
addCollaboration(email, role, 'New');
|
||||
addCollaboration(email, role, '<spring:message code="NEW"/>');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Register change event ...
|
||||
$("#shareRole a").click(function() {
|
||||
$("#shareRole a").click(function () {
|
||||
var role = onClickShare(this);
|
||||
$(this).parent().attr('data-role', role);
|
||||
|
||||
@ -259,10 +261,10 @@ function reportError(msg) {
|
||||
}
|
||||
|
||||
function buildCollabModel() {
|
||||
var collabs = $('#collabsTable tr').map(function() {
|
||||
var collabs = $('#collabsTable tr').map(function () {
|
||||
return {
|
||||
email: $(this).attr('data-collab'),
|
||||
role: $(this).attr('data-role')
|
||||
email:$(this).attr('data-collab'),
|
||||
role:$(this).attr('data-role')
|
||||
};
|
||||
});
|
||||
collabs = jQuery.makeArray(collabs);
|
||||
@ -274,24 +276,24 @@ function buildCollabModel() {
|
||||
}
|
||||
|
||||
// Hook for interaction with the main parent window ...
|
||||
var submitDialogForm = function() {
|
||||
var submitDialogForm = function () {
|
||||
|
||||
var collabs = buildCollabModel();
|
||||
collabs.collaborations = jQuery.grep(collabs.collaborations, function() {
|
||||
collabs.collaborations = jQuery.grep(collabs.collaborations, function () {
|
||||
return this.role != 'owner';
|
||||
});
|
||||
collabs['message'] = $("#collabMessage").val();
|
||||
|
||||
jQuery.ajax("service/maps/${mindmap.id}/collabs", {
|
||||
async:false,
|
||||
dataType: 'json',
|
||||
type: 'PUT',
|
||||
data: JSON.stringify(collabs),
|
||||
dataType:'json',
|
||||
type:'PUT',
|
||||
data:JSON.stringify(collabs),
|
||||
contentType:"application/json",
|
||||
success : function(data, textStatus, jqXHR) {
|
||||
success:function (data, textStatus, jqXHR) {
|
||||
$('#share-dialog-modal').modal('hide');
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
error:function (jqXHR, textStatus, errorThrown) {
|
||||
reportError(textStatus);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user