diff --git a/core-js/pom.xml b/core-js/pom.xml
index cf7c2fe1..3b8042e3 100644
--- a/core-js/pom.xml
+++ b/core-js/pom.xml
@@ -54,6 +54,7 @@
${basedir}/target/tmp/Point-min.js
${basedir}/target/tmp/Utils-min.js
${basedir}/target/tmp/WaitDialog-min.js
+
${basedir}/target/tmp/footer-min.js
diff --git a/core-js/src/main/javascript/WaitDialog.js b/core-js/src/main/javascript/WaitDialog.js
index 0c19ae33..b1e9c356 100644
--- a/core-js/src/main/javascript/WaitDialog.js
+++ b/core-js/src/main/javascript/WaitDialog.js
@@ -73,7 +73,7 @@ core.WaitDialog = new Class({
displayLightbox: function(display) {
if (display != 'none')
this.processInfo();
- $('overlay').style.display = display;
+ $('overlay-lightbox').style.display = display;
$('lightbox').style.display = display;
},
@@ -119,7 +119,7 @@ core.WaitDialog = new Class({
{
// Add overlay element inside body ...
var bodyElem = document.getElementsByTagName('body')[0];
- var overlayElem = new Element('div').setProperty('id', 'overlay');
+ var overlayElem = new Element('div').setProperty('id', 'overlay-lightbox');
overlayElem.inject(bodyElem);
// Add lightbox element inside body ...
diff --git a/mindplot/pom.xml b/mindplot/pom.xml
index 2631323e..d3246f35 100644
--- a/mindplot/pom.xml
+++ b/mindplot/pom.xml
@@ -48,7 +48,6 @@
-
@@ -97,7 +96,8 @@
-
+
+
@@ -197,12 +197,9 @@
-
-
-
-
+
+
+
@@ -219,126 +216,15 @@
compress
- src/main/javascript/
- target/tmp/
+ ${basedir}/target/tmp/
+ ${basedir}/target/classes/
-
-
- header-min.js
- EventBus-min.js
- model/Mindmap-min.js
- model/NodeModel-min.js
- model/RelationshipModel-min.js
- ActionDispatcher-min.js
- BrixActionDispatcher-min.js
- LocalActionDispatcher-min.js
- MindmapDesigner-min.js
- ScreenManager-min.js
- Workspace-min.js
- ShrinkConnector-min.js
- NodeGraph-min.js
- Topic-min.js
- CentralTopic-min.js
- MainTopic-min.js
- DragTopic-min.js
- DragManager-min.js
- DragPivot-min.js
- CentralTopicBoard-min.js
- MainTopicBoard-min.js
- ConnectionLine-min.js
- RelationshipLine-min.js
- DragTopicPositioner-min.js
- Board-min.js
- TextEditor-min.js
- RichTextEditor-min.js
- TextEditorFactory-min.js
- VariableDistanceBoard-min.js
- util/Shape-min.js
- FixedDistanceBoard-min.js
- BoardEntry-min.js
- ModelCodeName-min.js
- XMLMindmapSerializer_Beta-min.js
- XMLMindmapSerializer_Pela-min.js
- Beta2PelaMigrator-min.js
- XMLMindmapSerializerFactory-min.js
- PersistanceManager-min.js
- EditorProperties-min.js
- IconGroup-min.js
- BubbleTip-min.js
- Tip-min.js
- Icon-min.js
- LinkIcon-min.js
- Note-min.js
- ActionIcon-min.js
- ImageIcon-min.js
- model/IconModel-min.js
- model/LinkModel-min.js
- model/NoteModel-min.js
- EditorOptions-min.js
-
- Command-min.js
- DesignerActionRunner-min.js
- DesignerUndoManager-min.js
-
- commands/GenericFunctionCommand-min.js
- commands/DeleteTopicCommand-min.js
- commands/DragTopicCommand-min.js
- commands/AddTopicCommand-min.js
- commands/AddLinkToTopicCommand-min.js
- commands/RemoveLinkFromTopicCommand-min.js
- commands/AddIconToTopicCommand-min.js
- commands/RemoveIconFromTopicCommand-min.js
- commands/AddNoteToTopicCommand-min.js
- commands/RemoveNoteFromTopicCommand-min.js
- commands/AddRelationshipCommand-min.js
- commands/MoveControlPointCommand-min.js
- commands/freeMind/DragTopicCommand-min.js
- commands/freeMind/ReconnectTopicCommand-min.js
-
- layout/boards/Board-min.js
- layout/boards/freemind/Board-min.js
- layout/boards/freemind/Entry-min.js
- layout/boards/freemind/CentralTopicBoard-min.js
- layout/boards/freemind/MainTopicBoard-min.js
- layout/BaseLayoutManager-min.js
- layout/OriginalLayoutManager-min.js
- layout/FreeMindLayoutManager-min.js
- layout/LayoutManagerFactory-min.js
-
- collaboration/CollaborationManager-min.js
- collaboration/frameworks/AbstractCollaborativeFramework-min.js
-
- collaboration/frameworks/AbstractCollaborativeModelFactory-min.js
-
- collaboration/frameworks/brix/model/NodeModel-min.js
- collaboration/frameworks/brix/model/Mindmap-min.js
- collaboration/frameworks/brix/BrixCollaborativeModelFactory-min.js
-
- collaboration/frameworks/brix/BrixFramework-min.js
-
- widget/IconPanel-min.js
- widget/ListToolbarPanel-min.js
- widget/FontFamilyPanel-min.js
- widget/FontSizePanel-min.js
- widget/TopicShapePanel-min.js
- widget/Menu-min.js
-
- footer-min.js
-
-
-
-
-
-
- ${basedir}/../web2d/target/classes/web2d.svg-min.js
- ${basedir}/target/tmp/mindplot-min.js
-
+
- true
- false
+ true
true
diff --git a/mindplot/src/main/javascript/DesignerKeyboard.js b/mindplot/src/main/javascript/DesignerKeyboard.js
index 1bd803cf..0f474a93 100644
--- a/mindplot/src/main/javascript/DesignerKeyboard.js
+++ b/mindplot/src/main/javascript/DesignerKeyboard.js
@@ -29,6 +29,7 @@ mindplot.DesignerKeyboard = new Class({
// Try with the keyboard ..
+ var model = designer.getModel();
var keyboardEvents = {
'backspace':function(event) {
event.preventDefault();
@@ -36,7 +37,7 @@ mindplot.DesignerKeyboard = new Class({
}.bind(this),
'space' : function() {
- var node = this._getSelectedNode(designer);
+ var node = model.selectedTopic();
if (node) {
var model = topic.getModel();
var isShrink = !model.areChildrenShrinked();
@@ -45,7 +46,7 @@ mindplot.DesignerKeyboard = new Class({
}.bind(this),
'f2' : function() {
- var node = this._getSelectedNode(designer);
+ var node = model.selectedTopic();
if (node) {
node.showTextEditor();
}
@@ -129,7 +130,7 @@ mindplot.DesignerKeyboard = new Class({
},
'right' : function() {
- var node = this._getSelectedNode(designer);
+ var node = model.selectedTopic();
if (node) {
if (node.getTopicType() == mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
this._goToSideChild(designer, node, 'RIGHT');
@@ -149,7 +150,7 @@ mindplot.DesignerKeyboard = new Class({
}.bind(this),
'left' : function() {
- var node = this._getSelectedNode(designer);
+ var node = model.selectedTopic();
if (node) {
if (node.getTopicType() == mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
this._goToSideChild(designer, node, 'LEFT');
@@ -169,7 +170,7 @@ mindplot.DesignerKeyboard = new Class({
}.bind(this),
'up' : function() {
- var node = this._getSelectedNode(designer);
+ var node = model.selectedTopic();
if (node) {
if (node.getTopicType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
this._goToBrother(designer, node, 'UP');
@@ -181,7 +182,7 @@ mindplot.DesignerKeyboard = new Class({
}.bind(this),
'down' : function() {
- var node = this._getSelectedNode(designer);
+ var node = model.selectedTopic();
if (node) {
if (node.getTopicType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
this._goToBrother(designer, node, 'DOWN');
@@ -320,11 +321,6 @@ mindplot.DesignerKeyboard = new Class({
// Give focus to the selected node....
node.setOnFocus(true);
- },
-
- _getSelectedNode : function(designer) {
- var nodes = designer.getModel().filterSelectedTopics();
- return (nodes.length > 0) ? nodes[0] : null;
}
});
diff --git a/mindplot/src/main/javascript/DesignerModel.js b/mindplot/src/main/javascript/DesignerModel.js
index 74723385..e8e17073 100644
--- a/mindplot/src/main/javascript/DesignerModel.js
+++ b/mindplot/src/main/javascript/DesignerModel.js
@@ -84,7 +84,7 @@ mindplot.DesignerModel = new Class({
var result = [];
var topics = this.filterSelectedTopics();
- if (topics.length==0) {
+ if (topics.length == 0) {
core.Monitor.getInstance().logMessage('At least one element must be selected to execute this operation.');
} else {
var isValid = true;
@@ -131,6 +131,11 @@ mindplot.DesignerModel = new Class({
getRelationshipsById : function() {
return this._relationships;
+ },
+
+ selectedTopic : function() {
+ var topics = this.filterSelectedTopics();
+ return (topics.length > 0) ? topics[0] : null;
}
});
\ No newline at end of file
diff --git a/mindplot/src/main/javascript/Icon.js b/mindplot/src/main/javascript/Icon.js
index eae93156..49e49457 100644
--- a/mindplot/src/main/javascript/Icon.js
+++ b/mindplot/src/main/javascript/Icon.js
@@ -50,6 +50,11 @@ mindplot.Icon = new Class({
addEvent : function(type, fnc) {
this._image.addEvent(type, fnc);
+ },
+
+ remove : function()
+ {
+ throw "Unsupported operation";
}
});
diff --git a/mindplot/src/main/javascript/IconGroup.js b/mindplot/src/main/javascript/IconGroup.js
index 5e11e382..2364f8fa 100644
--- a/mindplot/src/main/javascript/IconGroup.js
+++ b/mindplot/src/main/javascript/IconGroup.js
@@ -220,8 +220,7 @@ mindplot.IconGroup.RemoveTip = new Class({
// Register events ...
var widget = this._buildWeb2d();
widget.addEvent('click', function() {
- var actionDispatcher = mindplot.ActionDispatcher.getInstance();
- actionDispatcher.removeIconFromTopic(topicId, icon._iconModel);
+ icon.remove();
});
widget.addEvent('mouseover', function() {
diff --git a/mindplot/src/main/javascript/ImageIcon.js b/mindplot/src/main/javascript/ImageIcon.js
index 158749c4..908244de 100644
--- a/mindplot/src/main/javascript/ImageIcon.js
+++ b/mindplot/src/main/javascript/ImageIcon.js
@@ -104,6 +104,11 @@ mindplot.ImageIcon = new Class({
getUiId : function() {
return this._uiId;
+ },
+
+ remove : function() {
+ var actionDispatcher = mindplot.ActionDispatcher.getInstance();
+ actionDispatcher.removeIconFromTopic(this._topic.getModel(), this._iconModel);
}
});
diff --git a/mindplot/src/main/javascript/MindmapDesigner.js b/mindplot/src/main/javascript/MindmapDesigner.js
index dc9b6775..645b930e 100644
--- a/mindplot/src/main/javascript/MindmapDesigner.js
+++ b/mindplot/src/main/javascript/MindmapDesigner.js
@@ -744,6 +744,7 @@ mindplot.MindmapDesigner = new Class({
}
return result;
}.bind(this);
+
var dialog = mindplot.LinkIcon.buildDialog(this, okFunction, okButtonId);
dialog.adopt(msg).show();
@@ -757,51 +758,11 @@ mindplot.MindmapDesigner = new Class({
}
},
- addNote2Node : function(text) {
- var topicsIds = this.getModel().filterTopicsIds();
- if (topicsIds.length > 0) {
- this._actionDispatcher.addNoteToTopic(topicsIds[0], text);
- }
- },
-
addNote : function() {
- var selectedTopics = this.getModel().filterSelectedTopics();
- var topic = null;
- if (selectedTopics.length > 0) {
- topic = selectedTopics[0];
- if (!$defined(topic._hasNote)) {
- var msg = new Element('div');
- var text = new Element('div').inject(msg);
- var formElem = new Element('form', {'action': 'none', 'id':'noteFormId'});
- var textInput = new Element('textarea').setStyles({'width':280, 'height':50});
- textInput.inject(formElem);
- formElem.inject(msg);
-
- var okButtonId = "noteOkButtonId";
- formElem.addEvent('submit', function(e) {
- $(okButtonId).fireEvent('click', e);
- e = new Event(e);
- e.stop();
- });
-
-
- var okFunction = function() {
- var text = textInput.value;
- var result = false;
- if ("" != text.trim()) {
- this.addNote2Node(text);
- result = true;
- }
- return result;
- }.bind(this);
- var dialog = mindplot.Note.buildDialog(this, okFunction, okButtonId);
- dialog.adopt(msg).show();
-
- // IE doesn't like too much this focus action...
- if (!core.UserAgent.isIE()) {
- textInput.focus();
- }
- }
+ var model = this.getModel();
+ var topic = model.selectedTopic();
+ if (topic!=null) {
+ topic.showNoteEditor();
} else {
core.Monitor.getInstance().logMessage('At least one topic must be selected to execute this operation.');
}
diff --git a/mindplot/src/main/javascript/NodeGraph.js b/mindplot/src/main/javascript/NodeGraph.js
index 103c0259..15158fd9 100644
--- a/mindplot/src/main/javascript/NodeGraph.js
+++ b/mindplot/src/main/javascript/NodeGraph.js
@@ -24,7 +24,6 @@ mindplot.NodeGraph = new Class({
this._mouseEvents = true;
this.setModel(nodeModel);
this._onFocus = false;
- this._textEditor = new mindplot.TextEditor(this);
},
getType : function() {
@@ -126,14 +125,6 @@ mindplot.NodeGraph = new Class({
getPosition : function() {
var model = this.getModel();
return model.getPosition();
- },
-
- showTextEditor : function(text) {
- this._textEditor.show(text);
- },
-
- closeEditors : function() {
- this._textEditor.close(true);
}
});
diff --git a/mindplot/src/main/javascript/Note.js b/mindplot/src/main/javascript/Note.js
index faee49bb..028e38d7 100644
--- a/mindplot/src/main/javascript/Note.js
+++ b/mindplot/src/main/javascript/Note.js
@@ -18,100 +18,22 @@
mindplot.Note = new Class({
Extends: mindplot.Icon,
- initialize : function(textModel, topic, designer) {
- var divContainer = designer.getWorkSpace().getScreenManager().getContainer();
- var bubbleTip = mindplot.BubbleTip.getInstance(divContainer);
+ initialize : function(topic, noteModel) {
this.parent(mindplot.Note.IMAGE_URL);
- this._noteModel = textModel;
+ this._noteModel = noteModel;
this._topic = topic;
- this._designer = designer;
- var image = this.getImage();
- var imgContainer = new Element('div').setStyles({textAlign:'center'});
- this._textElem = new Element('div').setStyles({'max-height':100,'max-width':300, 'overflow':'auto'});
- var text = unescape(textModel.getText());
- text = text.replace(/\n/ig, "
");
- text = text.replace(/");
- text = text.replace(/-->
@@ -17,14 +19,16 @@
src='https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'>
-
+
+
+
-
+