Change symblink to moootols
Add editor issue.
This commit is contained in:
117
wise-editor/src/main/webapp/c/map/export.htm
Normal file
117
wise-editor/src/main/webapp/c/map/export.htm
Normal file
@@ -0,0 +1,117 @@
|
||||
<div class="modalDialog">
|
||||
<h1>Export</h1>
|
||||
|
||||
<div>
|
||||
<form method="POST" id="exportForm" name="exportForm" action="http://localhost:8080/service/transform"
|
||||
style="height:100%;" enctype="application/x-www-form-urlencoded">
|
||||
<input name="svgXml" value="" type="hidden"/>
|
||||
<input name="mapXml" value="" type="hidden"/>
|
||||
<input name="filename" value="welcome" type="hidden"/>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" id="svg" name="exportFormat" value="svg">
|
||||
<b> Scalable Vector Graphics (SVG)</b>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" name="exportFormat" value="PDF" id="pdf">
|
||||
<b>Portable Document Format (PDF)</b>
|
||||
|
||||
<p>
|
||||
Get your map as Portable Document Format(PDF) to share use in your presentations.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" id="freemind" name="exportFormat" value="FREEMIND" checked="checked">
|
||||
<b>Freemind (version 0.9.0)</b>
|
||||
|
||||
<p>
|
||||
FreeMind is a nice desktop mind mapping application that has the great benefit of being
|
||||
free.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" name="exportFormat" id="img" value="IMG_EXPORT_FORMAT">
|
||||
<b>Image File</b>
|
||||
<select name="imgFormat" id="imgFormat" style="visibility:hidden;margin-left:5px;">
|
||||
<option>PNG</option>
|
||||
<option>JPEG</option>
|
||||
</select>
|
||||
|
||||
<p>
|
||||
Get a graphic representation of your map including all colors and shapes to reuse in
|
||||
documents or for archiving
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:center;margin-top:10px;">
|
||||
<input type="button" id="ok" value="Ok" class="btn-primary">
|
||||
<input type="button" value="Cancel" class="btn-secondary"
|
||||
onclick="MooDialog.Request.active.close();">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('img').addEvent('click', function(event) {
|
||||
$('imgFormat').setStyle('visibility', 'visible');
|
||||
});
|
||||
$('pdf').addEvent('click', function(event) {
|
||||
$('imgFormat').setStyle('visibility', 'hidden');
|
||||
});
|
||||
$('svg').addEvent('click', function(event) {
|
||||
$('imgFormat').setStyle('visibility', 'hidden');
|
||||
});
|
||||
|
||||
$('ok').addEvent('click', function(event) {
|
||||
|
||||
var form = $('exportForm');
|
||||
|
||||
// Look for the selected format and append export suffix...
|
||||
var value = $$('input[name=exportFormat]:checked')[0].get('value');
|
||||
var suffix;
|
||||
if (value == 'IMG_EXPORT_FORMAT') {
|
||||
var selected = $('imgFormat');
|
||||
suffix = selected.options[selected.selectedIndex].value;
|
||||
} else {
|
||||
suffix = value;
|
||||
}
|
||||
suffix = suffix.toLowerCase();
|
||||
form.action = form.action + "." + suffix;
|
||||
|
||||
// Store SVG o native map...
|
||||
if (suffix == "freemind") {
|
||||
var mindmap = designer.getMindmap();
|
||||
var serializer = mindplot.persistence.XMLSerializerFactory.getSerializerFromMindmap(mindmap);
|
||||
var domMap = serializer.toXML(mindmap);
|
||||
form.mapXml.value = core.Utils.innerXML(domMap);
|
||||
} else {
|
||||
form.svgXml.value = $("workspaceContainer").innerHTML;
|
||||
}
|
||||
|
||||
// Finally, submit map ...
|
||||
form.submit();
|
||||
|
||||
|
||||
MooDialog.Request.active.close();
|
||||
});
|
||||
|
||||
</script>
|
@@ -26,13 +26,15 @@ function buildDesigner(options) {
|
||||
// Register load events ...
|
||||
designer = new mindplot.Designer(options, container);
|
||||
designer.addEvent('loadSuccess', function() {
|
||||
window.waitDialog.close();
|
||||
window.waitDialog.destroy();
|
||||
window.waitDialog.close.delay(1000,window.waitDialog);
|
||||
window.waitDialog = null;
|
||||
});
|
||||
|
||||
window.onerror = function(e) {
|
||||
window.waitDialog.close();
|
||||
window.waitDialog.destroy();
|
||||
if (window.waitDialog) {
|
||||
window.waitDialog.close.delay(1000,window.waitDialog);
|
||||
window.waitDialog = null;
|
||||
}
|
||||
errorDialog.show();
|
||||
console.log(e);
|
||||
};
|
||||
@@ -117,12 +119,12 @@ editor.WaitDialog = new Class({
|
||||
duration: 100,
|
||||
transition: Fx.Transitions.Bounce.easeOut
|
||||
});
|
||||
this.overlay = new Overlay(this.options.inject, {
|
||||
duration: this.options.duration
|
||||
});
|
||||
},
|
||||
|
||||
onBeforeOpen: function() {
|
||||
this.overlay = new Overlay(this.options.inject, {
|
||||
duration: this.options.duration
|
||||
});
|
||||
this.overlay.open();
|
||||
this.fx.start({
|
||||
'margin-top': [-200, -100],
|
||||
@@ -142,7 +144,6 @@ editor.WaitDialog = new Class({
|
||||
}).chain(function() {
|
||||
this.fireEvent('hide');
|
||||
this.wrapper.setStyle('display', 'none');
|
||||
this.overlay.destroy();
|
||||
|
||||
}.bind(this));
|
||||
}}
|
||||
@@ -163,6 +164,11 @@ editor.WaitDialog = new Class({
|
||||
|
||||
show : function() {
|
||||
this.open();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.parent();
|
||||
this.overlay.destroy();
|
||||
}
|
||||
|
||||
});
|
||||
@@ -211,7 +217,6 @@ editor.FatalErrorDialog = new Class({
|
||||
}).chain(function() {
|
||||
this.wrapper.setStyle('display', 'none');
|
||||
this.fireEvent('hide');
|
||||
this.overlay.destroy();
|
||||
|
||||
}.bind(this));
|
||||
}}
|
||||
@@ -219,6 +224,11 @@ editor.FatalErrorDialog = new Class({
|
||||
this.setContent(panel);
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.parent();
|
||||
this.overlay.destroy();
|
||||
},
|
||||
|
||||
_buildPanel : function () {
|
||||
var result = new Element('div');
|
||||
result.setStyles({
|
||||
|
Reference in New Issue
Block a user