From cd178109f35a8bf440141126113650b458beecc6 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 2 Jul 2012 23:09:32 -0300 Subject: [PATCH] Change messages ... --- mindplot/src/main/javascript/Designer.js | 10 ++-------- mindplot/src/main/javascript/Messages.js | 8 +++++--- mindplot/src/main/resources/messages_en.properties | 3 ++- mindplot/src/main/resources/messages_es.properties | 1 + 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index 8bdba974..b3987858 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -354,18 +354,12 @@ mindplot.Designer = new Class({ shrinkSelectedBranch:function () { var nodes = this.getModel().filterSelectedTopics(); - if (nodes.length <= 0) { + if (nodes.length <= 0 || nodes.length != 1) { // If there are more than one node selected, - $notify($msg('ONE_TOPIC_MUST_BE_SELECTED')); + $notify($msg('ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE')); return; } - if (nodes.length != 1) { - // If there are more than one node selected, - $notify($msg('ONLY_ONE_TOPIC_MUST_BE_SELECTED')); - return; - } - // Execute event ... var topic = nodes[0]; this._actionDispatcher.shrinkBranch([topic.getId()], !topic.areChildrenShrunken()); diff --git a/mindplot/src/main/javascript/Messages.js b/mindplot/src/main/javascript/Messages.js index 26989e05..3f11f9ac 100644 --- a/mindplot/src/main/javascript/Messages.js +++ b/mindplot/src/main/javascript/Messages.js @@ -71,14 +71,15 @@ mindplot.Messages.BUNDLES = { SAVE_COMPLETE:'Save Complete', ZOOM_IN_ERROR:'Zoom too high.', ZOOM_ERROR:'No more zoom can be applied.', - ONLY_ONE_TOPIC_MUST_BE_SELECTED:'Could not create a topic. Only one node must be selected.', + ONLY_ONE_TOPIC_MUST_BE_SELECTED:'Could not create a topic. Only one topic must be selected.', ONE_TOPIC_MUST_BE_SELECTED:'Could not create a topic. One topic must be selected.', SAVE_COULD_NOT_BE_COMPLETED:'Save could not be completed. Try latter.', UNEXPECTED_ERROR_LOADING:"We're sorry, an unexpected error has occurred. Try again reloading the editor.\nIf the problem persists, contact us to support@wisemapping.com.", MAIN_TOPIC:'Main Topic', SUB_TOPIC:'Sub Topic', ISOLATED_TOPIC:'Isolated Topic', - CENTRAL_TOPIC: 'Central Topic' + CENTRAL_TOPIC: 'Central Topic', + ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE:'Children can not be collapsed. One topic must be selected.' }, 'es':{ DISCARD_CHANGES:'Descartar Cambios', @@ -123,7 +124,8 @@ mindplot.Messages.BUNDLES = { MAIN_TOPIC:'Tópico Principal', SUB_TOPIC:'Tópico Secundario', ISOLATED_TOPIC:'Tópico Aislado', - CENTRAL_TOPIC: 'Tópico Central' + CENTRAL_TOPIC: 'Tópico Central', + ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE:'Tópicos hijos no pueden ser colapsados. Solo un topic debe ser seleccionado.' } }; diff --git a/mindplot/src/main/resources/messages_en.properties b/mindplot/src/main/resources/messages_en.properties index 6217c065..62c128ab 100644 --- a/mindplot/src/main/resources/messages_en.properties +++ b/mindplot/src/main/resources/messages_en.properties @@ -33,8 +33,9 @@ SAVE_COMPLETE=Save Complete ZOOM_IN_ERROR=Zoom too high. ZOOM_ERROR=No more zoom can be applied. -ONLY_ONE_TOPIC_MUST_BE_SELECTED=Could not create a topic. Only one node must be selected. +ONLY_ONE_TOPIC_MUST_BE_SELECTED=Could not create a topic. Only one topic must be selected. ONE_TOPIC_MUST_BE_SELECTED=Could not create a topic. One topic must be selected. +ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE=Children can not be collapsed. One topic must be selected. SAVE_COULD_NOT_BE_COMPLETED=Save could not be completed. Try latter. UNEXPECTED_ERROR_LOADING=We're sorry, an unexpected error has occurred.\nTry again reloading the editor.If the problem persists, contact us to support@wisemapping.com. MAIN_TOPIC=Main Topic diff --git a/mindplot/src/main/resources/messages_es.properties b/mindplot/src/main/resources/messages_es.properties index d5bd061d..ff981df3 100644 --- a/mindplot/src/main/resources/messages_es.properties +++ b/mindplot/src/main/resources/messages_es.properties @@ -42,3 +42,4 @@ MAIN_TOPIC=Tópico Principal SUB_TOPIC=Tópico Secundario ISOLATED_TOPIC=Tópico Aislado CENTRAL_TOPIC=Tópico Central +ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE=Tópicos hijos no pueden ser colapsados. Solo un topic debe ser seleccionado.