diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js
index fb265966..2a85d13f 100644
--- a/mindplot/src/main/javascript/Designer.js
+++ b/mindplot/src/main/javascript/Designer.js
@@ -341,10 +341,8 @@ mindplot.Designer = new Class({
},
needsSave : function() {
-
//@Todo: Review all this ...
-// return this._actionDispatcher.hasBeenChanged();
- return true;
+ return this._actionDispatcher._actionRunner.hasBeenChanged();
},
save : function(onSavedHandler, saveHistory) {
@@ -391,11 +389,12 @@ mindplot.Designer = new Class({
},
undo : function() {
- this._actionRunner.undo();
+ // @Todo: This is a hack...
+ this._actionDispatcher._actionRunner.undo();
},
redo : function() {
- this._actionRunner.redo();
+ this._actionDispatcher._actionRunner.redo();
},
_nodeModelToNodeGraph : function(nodeModel, isVisible) {
diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js
index 703cf65e..64745ac7 100644
--- a/mindplot/src/main/javascript/widget/Menu.js
+++ b/mindplot/src/main/javascript/widget/Menu.js
@@ -179,6 +179,24 @@ mindplot.widget.Menu = new Class({
};
this._toolbarElems.push(new mindplot.widget.ColorPalettePanel('fontColor', fontColorModel, baseUrl));
+ this.addButton('export', false, false, function() {
+ var reqDialog = new MooDialog.Request('../c/export.htm?mapId=' + mapId, null,
+ {'class': 'historyModalDialog',
+ closeButton:true,
+ destroyOnClose:true,
+ title:'Export'
+ });
+ reqDialog.setRequestOptions({
+ onRequest: function() {
+ reqDialog.setContent('loading...');
+ }
+ });
+ });
+
+ this.addButton('print', false, false, function() {
+ printMap();
+ });
+
this.addButton('zoomIn', false, false, function() {
designer.zoomIn();
});
@@ -225,29 +243,17 @@ mindplot.widget.Menu = new Class({
var saveElem = $('save');
if (saveElem) {
- saveElem.addEvent('click', function() {
-
- if (!readOnly) {
- saveElem.setStyle('cursor', 'wait');
- (function() {
- designer.save(function() {
- saveElem.setStyle('cursor', 'pointer');
- }, true);
- }).delay(1);
- } else {
- new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.
to create an account click here',
- {
- 'window': {theme:Windoo.Themes.wise,
- title:''
- }
- });
- }
+ this.addButton('save', false, false, function() {
+ saveElem.setStyle('cursor', 'wait');
+ designer.save(function() {
+ saveElem.setStyle('cursor', 'pointer');
+ }, true);
});
}
var discartElem = $('discart');
if (discartElem) {
- discartElem.addEvent('click', function() {
+ this.addButton('tagIt', false, false, function() {
if (!readOnly) {
displayLoading();
@@ -261,49 +267,58 @@ mindplot.widget.Menu = new Class({
var tagElem = $('tagIt');
if (tagElem) {
- tagElem.addEvent('click', function(event) {
- var reqDialog = new MooDialog.Request('../c/tags.htm?mapId=' + mapId, null, {'class': 'MooDialogBig'});
-// var reqDialog = new MooDialog.Request("embeddde.html",null,{'class': 'MooDialogBig'});
+ this.addButton('tagIt', false, false, function() {
+ var reqDialog = new MooDialog.Request('../c/tags.htm?mapId=' + mapId, null,
+ {'class': 'tagItModalDialog',
+ closeButton:true,
+ destroyOnClose:true,
+ title:'Tags'
+ });
+ reqDialog.setRequestOptions({
+ onRequest: function() {
+ reqDialog.setContent('loading...');
+ }
+ });
+ });
+ }
+
+ var shareElem = $('shareIt');
+ if (shareElem) {
+ this.addButton('shareIt', false, false, function() {
+ var reqDialog = new MooDialog.Request('../c/mymaps.htm?action=collaborator&userEmail=paulo%40pveiga.com.ar&mapId=' + mapId, null,
+ {'class': 'shareItModalDialog',
+ closeButton:true,
+ destroyOnClose:true,
+ title:'Share It'
+ });
reqDialog.setRequestOptions({
onRequest: function() {
reqDialog.setContent('loading...');
}
});
-
- });
- }
-
- var shareElem = $('shareIt');
- if (shareElem) {
- shareElem.addEvent('click', function() {
-
-
});
}
var publishElem = $('publishIt');
if (publishElem) {
- $('publishIt').addEvent('click', function(event) {
- new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.',
- {
- 'window': {theme:Windoo.Themes.wise,
- title:''
- }
- });
- });
}
var historyElem = $('history');
if (historyElem) {
- historyElem.addEvent('click', function(event) {
- new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.',
- {
- 'window': {theme:Windoo.Themes.wise,
- title:''
- }
- });
+ this.addButton('history', false, false, function() {
+ var reqDialog = new MooDialog.Request('../c/history.htm?action=list&goToMindmapList&mapId=' + mapId, null,
+ {'class': 'historyModalDialog',
+ closeButton:true,
+ destroyOnClose:true,
+ title:'History'
+ });
+ reqDialog.setRequestOptions({
+ onRequest: function() {
+ reqDialog.setContent('loading...');
+ }
+ });
});
}
diff --git a/wise-doc/src/main/webapp/css/editor2.css b/wise-doc/src/main/webapp/css/editor2.css
index 09c54e1c..f38af077 100644
--- a/wise-doc/src/main/webapp/css/editor2.css
+++ b/wise-doc/src/main/webapp/css/editor2.css
@@ -283,6 +283,11 @@ div#headerActions span {
border-bottom: 3px solid rgb(247, 201, 49);
}
+div#headerActions a {
+ color: white;
+ text-decoration: none;
+}
+
div#headerMapTitle {
width: 200px;
height:(@header-info-height ) - 13;
@@ -295,7 +300,7 @@ div#headerMapTitle {
}
div#headerMapTitle span {
- padding: 4px 50px ;
+ padding: 4px 50px;
border: 1px solid rgb(90, 90, 90);
background-color: rgb(45, 45, 45);
-moz-border-radius: 3px;
@@ -312,6 +317,7 @@ div#toolbar {
background-image: -moz-linear-gradient(bottom, rgb(229, 227, 209) 47%, rgb(252, 250, 237) 87%);
background-image: -webkit-linear-gradient(bottom, rgb(229, 227, 209) 47%, rgb(252, 250, 237) 87%);
background-image: -ms-linear-gradient(bottom, rgb(229, 227, 209) 47%, rgb(252, 250, 237) 87%);
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.47, rgb(229, 227, 209)), color-stop(0.87, rgb(252, 250, 237)));
border-bottom: 3px double rgb(190, 190, 190);
border-top: 1px solid rgb(190, 190, 190);
@@ -320,8 +326,6 @@ div#toolbar {
div#toolbar .buttonContainer {
height: @header-toolbar-height;
float: left;
- /*color: black;*/
- /*border: 1px solid #BBB4D6;*/
margin-left: 5px;
}
@@ -542,9 +546,6 @@ div.toolbarPanelLink, div.toolbarPanelLinkSelectedLink {
font-size: 12px;
padding: 5px 10px;
font-weight: bold;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
}
div.toolbarPanelLink:hover, div.toolbarPanelLinkSelectedLink {
@@ -654,6 +655,7 @@ div#small_error_icon {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
border-color: #0064cd #0064cd #003f81;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ margin-top: 7px;
}
.btn-primary:hover {
@@ -691,6 +693,7 @@ div#small_error_icon {
-o-transition: 0.1s linear all;
transition: 0.1s linear all;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ margin-top: 7px;
}
.btn-secondary:hover {
@@ -699,8 +702,9 @@ div#small_error_icon {
}
/** */
+/* Modal dialogs definitions */
-.MooDialogBig {
+.tagItModalDialog, .historyModalDialog, .shareItModalDialog {
position: fixed;
top: 50%;
left: 50%;
@@ -710,7 +714,7 @@ div#small_error_icon {
background-color: #ffffff;
border: 1px solid #999;
border: 1px solid rgba(0, 0, 0, 0.3);
- *border: 1px solid #999;
+ border: 1px solid #999;
/* IE6-7 */
-webkit-border-radius: 6px;
@@ -725,7 +729,42 @@ div#small_error_icon {
padding: 30px;
}
+.shareItModalDialog {
+ width: 500px;
+}
-.MooDialogBig .content {
+.tagItModalDialog .title, .historyModalDialog .title, .shareItModalDialog .title {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ border-bottom: 1px solid #a1aec5;
+ font-weight: bold;
+ text-shadow: 1px 1px 0 #fff;
+ border-bottom: 1px solid #eee;
+ padding: 5px 30px;
+ font-size: 18px
+}
+
+.tagItModalDialog .content {
+ height: 130px;
+}
+
+.historyModalDialog .content {
height: 300px;
-}
\ No newline at end of file
+}
+
+.shareItModalDialog .content {
+ height: 300px;
+}
+
+.modalDialog h1 {
+ font-size: 14px;
+}
+
+.modalDialog h2 {
+ font-size: 14px;
+ margin: 5px;
+}
+
+
diff --git a/wise-doc/src/main/webapp/html/editor.html b/wise-doc/src/main/webapp/html/editor.html
index 86d9fde7..1b37baf6 100644
--- a/wise-doc/src/main/webapp/html/editor.html
+++ b/wise-doc/src/main/webapp/html/editor.html
@@ -127,7 +127,21 @@