diff --git a/mindplot/src/main/javascript/IconGroup.js b/mindplot/src/main/javascript/IconGroup.js index 3cae7278..9ac2e055 100644 --- a/mindplot/src/main/javascript/IconGroup.js +++ b/mindplot/src/main/javascript/IconGroup.js @@ -99,7 +99,7 @@ mindplot.IconGroup = new Class({ removeIconByUrl : function(url) { var icon = this._findIconFromUrl(url); - $assert(icon,'icon could not be found'); + $assert(icon, 'icon could not be found'); this._removeIcon(icon); }, diff --git a/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js b/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js index a0c828c0..101fa6e1 100644 --- a/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js +++ b/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js @@ -17,11 +17,11 @@ MooDialog.Request = new Class({ this.parent(options); this.requestOptions = requestOptions || {method:'get'}; this.requestOptions.url = url; + this.requestOptions.update = this.content; + this.requestOptions.evalScripts = true; this.addEvent('open', function() { - - var request = new Request.HTML(this.requestOptions).addEvent('success', function(text) { - this.setContent(text); - }.bind(this)).send(); + var request = new Request.HTML(this.requestOptions).send(); + MooDialog.Request.active = this; }.bind(this)); if (this.options.autoOpen) this.open(); diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index 64745ac7..09ca9c14 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -181,7 +181,7 @@ mindplot.widget.Menu = new Class({ this.addButton('export', false, false, function() { var reqDialog = new MooDialog.Request('../c/export.htm?mapId=' + mapId, null, - {'class': 'historyModalDialog', + {'class': 'exportItModalDialog', closeButton:true, destroyOnClose:true, title:'Export' @@ -191,6 +191,7 @@ mindplot.widget.Menu = new Class({ reqDialog.setContent('loading...'); } }); + MooDialog.Request.active = reqDialog; }); this.addButton('print', false, false, function() { @@ -251,9 +252,9 @@ mindplot.widget.Menu = new Class({ }); } - var discartElem = $('discart'); + var discartElem = $('discard'); if (discartElem) { - this.addButton('tagIt', false, false, function() { + this.addButton('discard', false, false, function() { if (!readOnly) { displayLoading(); @@ -302,8 +303,22 @@ mindplot.widget.Menu = new Class({ var publishElem = $('publishIt'); if (publishElem) { + this.addButton('publishIt', false, false, function() { + var reqDialog = new MooDialog.Request('../c/publish.htm?mapId=' + mapId, null, + {'class': 'publishModalDialog', + closeButton:true, + destroyOnClose:true, + title:'Publish' + }); + reqDialog.setRequestOptions({ + onRequest: function() { + reqDialog.setContent('loading...'); + } + }); + }); } + var historyElem = $('history'); if (historyElem) { diff --git a/wise-doc/src/main/webapp/c/export.bin b/wise-doc/src/main/webapp/c/export.bin new file mode 100644 index 00000000..efa4f251 Binary files /dev/null and b/wise-doc/src/main/webapp/c/export.bin differ diff --git a/wise-doc/src/main/webapp/c/export.htm b/wise-doc/src/main/webapp/c/export.htm new file mode 100644 index 00000000..b7466a47 --- /dev/null +++ b/wise-doc/src/main/webapp/c/export.htm @@ -0,0 +1,100 @@ +
-
-
- |
+
+
+
- |
-
-
-
-
+ |
+
+
+
+
- |
-
-
-
-
+ |
+
+
+
+
- |
-
-
-
-
+ |
+
+
+
+
- |
-
- " class="btn-primary"> - " class="btn-secondary" - onclick="MOOdalBox.close();"> - | -
+ " class="btn-primary"> + " class="btn-secondary" + onclick=""> + | +