wisemapping-open-source/wise-webapp/src/main/webapp/jsp/mindmapExport.jsp

137 lines
5.1 KiB
Plaintext
Raw Normal View History

2012-06-30 07:26:21 +02:00
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
2012-06-06 06:19:55 +02:00
<p class="alert alert-info">
<spring:message code="EXPORT_DETAILS"/>
</p>
2012-06-20 22:48:29 +02:00
2009-06-07 20:59:43 +02:00
<div>
<form method="GET" class="form-horizontal" action="c/restful/maps/${mindmap.id}"
enctype="application/x-www-form-urlencoded" id="dialogMainForm">
<input name="svgXml" id="svgXml" value="" type="hidden"/>
<input name="download" type="hidden" value="mm"/>
<fieldset>
<label for="freemind">
<input type="radio" id="freemind" name="exportFormat" value="mm" checked="checked"/>
<strong><spring:message code="FREEMIND_EXPORT_FORMAT"/></strong><br/>
<spring:message code="FREEMIND_EXPORT_FORMAT_DETAILS"/>
</label>
2013-03-29 15:49:59 +01:00
<label for="mmap">
<input type="radio" name="exportFormat" value="mmap" id="mmap"/>
<strong><spring:message code="MINDJET_EXPORT_FORMAT"/></strong><br/>
<spring:message code="MINDJET_EXPORT_FORMAT_DETAILS"/>
</label>
<label for="wisemapping">
<input type="radio" id="wisemapping" name="exportFormat" value="wxml"/>
<strong><spring:message code="WISEMAPPING_EXPORT_FORMAT"/></strong><br/>
<spring:message code="WISEMAPPING_EXPORT_FORMAT_DETAILS"/>
</label>
<label for="svg">
<input type="radio" id="svg" name="exportFormat" value="svg"/>
<strong><spring:message code="SVG_EXPORT_FORMAT"/></strong><br/>
<spring:message code="SVG_EXPORT_FORMAT_DETAILS"/><br/>
</label>
<label for="pdf">
<input type="radio" name="exportFormat" value="pdf" id="pdf"/>
<strong><spring:message code="PDF_EXPORT_FORMAT"/></strong><br/>
<spring:message code="PDF_EXPORT_FORMAT_DETAILS"/>
</label>
<label for="img">
<input type="radio" name="exportFormat" id="img" value="image"/>
<strong><spring:message code="IMG_EXPORT_FORMAT"/></strong><br/>
<spring:message code="IMG_EXPORT_FORMAT_DETAILS"/>
<select name="imgFormat" id="imgFormat" style="display:none">
<option value='png'>PNG</option>
2012-06-03 23:12:56 +02:00
<option value='jpg'>JPEG</option>
2011-10-17 02:42:02 +02:00
</select>
</label><br/>
<label for="txt">
<input type="radio" name="exportFormat" value="txt" id="txt"/>
<strong><spring:message code="TXT_EXPORT_FORMAT"/></strong><br/>
<spring:message code="TXT_EXPORT_FORMAT_DETAILS"/>
</label>
</br><label for="xls">
<input type="radio" name="exportFormat" value="xls" id="xls"/>
<strong><spring:message code="XLS_EXPORT_FORMAT"/></strong><br/>
<spring:message code="XLS_EXPORT_FORMAT_DETAILS"/>
</label><br/>
<label for="odt">
<input type="radio" name="exportFormat" value="odt" id="odt"/>
<strong><spring:message code="OPEN_OFFICE_EXPORT_FORMAT"/></strong><br/>
<spring:message code="OPEN_OFFICE_EXPORT_FORMAT_DETAILS"/>
</label>
2013-03-29 15:49:59 +01:00
</fieldset>
2009-06-07 20:59:43 +02:00
</form>
</div>
2011-10-17 02:42:02 +02:00
2012-06-06 06:42:24 +02:00
<p id="exportInfo">
<span class="label label-danger">Warning</span> <spring:message code="EXPORT_FORMAT_RESTRICTIONS"/>
2012-06-06 06:42:24 +02:00
</p>
2009-06-07 20:59:43 +02:00
<script type="text/javascript">
// No way to obtain map svg. Hide panels..
if (window.location.pathname.indexOf('exportf') != -1) {
$('#exportInfo').hide();
2013-03-29 15:49:59 +01:00
$('#freemind,#pdf,#svg,#odt,#txt,#xls,#mmap').click('click', function (event) {
$('#imgFormat').hide();
});
$('#img').click('click', function (event) {
$('#imgFormat').show();
});
$('#exportInfo').hide();
} else {
$('#pdf,#svg,#img').parent().hide();
}
function submitDialogForm(differ) {
// If the map is opened, use the latest model ...
var formatType = $('#dialogMainForm input:checked').attr('value');
var form = $('#dialogMainForm');
// Restore default ..
form.attr('action', 'c/restful/maps/${mindmap.id}.' + formatType);
if (formatType == 'image' || formatType == 'svg' || formatType == 'pdf') {
// Look for the selected format and append export suffix...
if (formatType == 'image') {
formatType = $('#dialogMainForm option:selected').attr('value');
}
// Change to transform url ...
form.attr('method', "POST");
form.attr('action', 'c/restful/transform.' + formatType);
// Load page SVG ...
var svgXml = window.parent.document.getElementById('workspaceContainer').innerHTML;
$('#svgXml').attr('value', svgXml);
}
$('#dialogMainForm input[name=download]').attr('value', formatType);
if (!differ) {
form.submit();
}
// Close dialog ...
$('#export-dialog-modal').modal('hide');
2012-06-20 22:48:29 +02:00
return {"action":form.attr('action'), "method":form.attr('method'), formatType:formatType};
}
2011-10-18 14:29:29 +02:00
2009-06-07 20:59:43 +02:00
</script>