2012-06-30 07:26:21 +02:00
|
|
|
<%@page pageEncoding="UTF-8" %>
|
|
|
|
<%@include file="/jsp/init.jsp" %>
|
|
|
|
|
2012-06-16 19:32:26 +02:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
|
|
|
|
<div>
|
2012-07-13 06:08:12 +02:00
|
|
|
<iframe src='${url}' style="border: 0;width: 100%;height:100%;min-height:400px;overflow-y: auto;"
|
|
|
|
id="dialogContentIframe"></iframe>
|
2012-06-16 19:32:26 +02:00
|
|
|
<div style="float: right;margin-right: 25px">
|
2012-07-01 22:56:31 +02:00
|
|
|
<input type="button" class="btn-primary" value="<spring:message code="ACCEPT"/>" id="submitBtn"/>
|
|
|
|
<input type="button" class="btn-secondary" value="<spring:message code="CANCEL"/>" id="cancelBtn"/>
|
2012-06-16 19:32:26 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2012-07-13 06:08:12 +02:00
|
|
|
$('submitBtn').addEvent('click', function () {
|
2012-06-16 19:32:26 +02:00
|
|
|
var iframeWindow = $('dialogContentIframe').contentWindow;
|
2012-08-28 13:41:49 +02:00
|
|
|
if (iframeWindow && (typeof iframeWindow.submitDialogForm == 'function')) {
|
2012-09-01 01:51:55 +02:00
|
|
|
var context = iframeWindow.submitDialogForm(true);
|
|
|
|
if (context) {
|
|
|
|
// This is a hack for the export function. If this is not done, the dialog is closed and the export fails.
|
|
|
|
var iframeForm = $('iframeExportForm');
|
|
|
|
iframeForm.setAttribute('method', context.method);
|
|
|
|
iframeForm.setAttribute('action', context.action);
|
|
|
|
|
2012-09-01 03:53:56 +02:00
|
|
|
var svgXml = context.method == "POST" ? window.document.getElementById('workspaceContainer').innerHTML : "";
|
|
|
|
$('svgXml').setAttribute('value', svgXml);
|
2012-09-01 01:51:55 +02:00
|
|
|
$('download').setAttribute('value', context.formatType);
|
2014-09-07 21:06:58 +02:00
|
|
|
$('version').setAttribute('value', context.version);
|
2012-09-01 01:51:55 +02:00
|
|
|
iframeForm.submit();
|
2012-06-22 06:34:33 +02:00
|
|
|
}
|
2012-09-08 19:32:43 +02:00
|
|
|
if (MooDialog.Request.active) {
|
|
|
|
MooDialog.Request.active.close();
|
|
|
|
}
|
2012-06-16 19:32:26 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2012-07-13 06:08:12 +02:00
|
|
|
$('cancelBtn').addEvent('click', function () {
|
2012-06-16 19:32:26 +02:00
|
|
|
if (MooDialog.Request.active) {
|
|
|
|
MooDialog.Request.active.close();
|
|
|
|
}
|
|
|
|
});
|
2012-09-01 01:51:55 +02:00
|
|
|
</script>
|
2012-11-10 21:19:28 +01:00
|
|
|
<form method="GET" class="form-horizontal" action="c/restful/maps/${mindmap.id}"
|
2012-09-01 01:51:55 +02:00
|
|
|
enctype="application/x-www-form-urlencoded" id="iframeExportForm">
|
|
|
|
<input name="svgXml" id="svgXml" value="" type="hidden"/>
|
|
|
|
<input name="download" id="download" type="hidden" value="mm"/>
|
2014-09-07 21:06:58 +02:00
|
|
|
<input name="version" id="version" type="hidden" value=""/>
|
2012-09-01 01:51:55 +02:00
|
|
|
</form>
|