mindmap export bug fixing

This commit is contained in:
Ezequiel Bergamaschi 2014-09-07 20:17:59 -03:00
parent 4a27a7479a
commit 0c9d11c731
2 changed files with 16 additions and 32 deletions

View File

@ -207,18 +207,10 @@ mindplot.widget.Menu = new Class({
} }
this._addButton('export', false, false, function () { this._addButton('export', false, false, function () {
var reqDialog = new MooDialog.Request('c/iframeWrapper.htm?url=c/maps/' + mapId + "/exportf", null, BootstrapDialog.Request.active = new BootstrapDialog.Request('c/maps/' + mapId + "/exportf", $msg('EXPORT'), {
{'class': 'modalDialog exportModalDialog', cancelButton: true,
closeButton: true, closeButton: true
destroyOnClose: true,
title: $msg('EXPORT')
});
reqDialog.setRequestOptions({
onRequest: function () {
reqDialog.setContent($msg('LOADING'));
}
}); });
MooDialog.Request.active = reqDialog;
}); });
this._registerTooltip('export', $msg('EXPORT')); this._registerTooltip('export', $msg('EXPORT'));

View File

@ -1,17 +1,16 @@
<%@page pageEncoding="UTF-8" %> <%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %> <%@include file="/jsp/init.jsp" %>
<p class="alert alert-info">
<spring:message code="EXPORT_DETAILS"/>
</p>
<div> <div style="height: 400px; overflow-y: auto">
<div class="alert alert-info" role="alert">
<spring:message code="EXPORT_DETAILS"/>
</div>
<form method="GET" class="form-horizontal" action="c/restful/maps/${mindmap.id}" <form method="GET" class="form-horizontal" action="c/restful/maps/${mindmap.id}"
enctype="application/x-www-form-urlencoded" id="dialogMainForm"> enctype="application/x-www-form-urlencoded" id="dialogMainForm">
<input name="svgXml" id="svgXml" value="" type="hidden"/> <input name="svgXml" id="svgXml" value="" type="hidden"/>
<input name="download" type="hidden" value="mm"/> <input name="download" type="hidden" value="mm"/>
<fieldset> <fieldset>
<label for="freemind"> <label for="freemind">
<input type="radio" id="freemind" name="exportFormat" value="mm" checked="checked"/> <input type="radio" id="freemind" name="exportFormat" value="mm" checked="checked"/>
<strong><spring:message code="FREEMIND_EXPORT_FORMAT"/></strong><br/> <strong><spring:message code="FREEMIND_EXPORT_FORMAT"/></strong><br/>
@ -51,7 +50,7 @@
<option value='png'>PNG</option> <option value='png'>PNG</option>
<option value='jpg'>JPEG</option> <option value='jpg'>JPEG</option>
</select> </select>
</label><br/> </label>
<label for="txt"> <label for="txt">
<input type="radio" name="exportFormat" value="txt" id="txt"/> <input type="radio" name="exportFormat" value="txt" id="txt"/>
@ -59,33 +58,30 @@
<spring:message code="TXT_EXPORT_FORMAT_DETAILS"/> <spring:message code="TXT_EXPORT_FORMAT_DETAILS"/>
</label> </label>
</br><label for="xls"> <label for="xls">
<input type="radio" name="exportFormat" value="xls" id="xls"/> <input type="radio" name="exportFormat" value="xls" id="xls"/>
<strong><spring:message code="XLS_EXPORT_FORMAT"/></strong><br/> <strong><spring:message code="XLS_EXPORT_FORMAT"/></strong><br/>
<spring:message code="XLS_EXPORT_FORMAT_DETAILS"/> <spring:message code="XLS_EXPORT_FORMAT_DETAILS"/>
</label><br/> </label>
<label for="odt"> <label for="odt">
<input type="radio" name="exportFormat" value="odt" id="odt"/> <input type="radio" name="exportFormat" value="odt" id="odt"/>
<strong><spring:message code="OPEN_OFFICE_EXPORT_FORMAT"/></strong><br/> <strong><spring:message code="OPEN_OFFICE_EXPORT_FORMAT"/></strong><br/>
<spring:message code="OPEN_OFFICE_EXPORT_FORMAT_DETAILS"/> <spring:message code="OPEN_OFFICE_EXPORT_FORMAT_DETAILS"/>
</label> </label>
</fieldset> </fieldset>
</form> </form>
<div id="exportInfo">
<span class="label label-danger">Warning</span> <spring:message code="EXPORT_FORMAT_RESTRICTIONS"/>
</div>
</div> </div>
<p id="exportInfo">
<span class="label label-danger">Warning</span> <spring:message code="EXPORT_FORMAT_RESTRICTIONS"/>
</p>
<script type="text/javascript"> <script type="text/javascript">
// No way to obtain map svg. Hide panels.. // No way to obtain map svg. Hide panels..
if (window.location.pathname.indexOf('exportf') != -1) { if (window.location.pathname.match(/\/[0-9]\/edit/)) {
$('#exportInfo').hide(); $('#exportInfo').hide();
$('#freemind,#pdf,#svg,#odt,#txt,#xls,#mmap').click('click', function (event) { $('#freemind,#pdf,#svg,#odt,#txt,#xls,#mmap').click('click', function (event) {
$('#imgFormat').hide(); $('#imgFormat').hide();
@ -124,14 +120,10 @@
} }
$('#dialogMainForm input[name=download]').attr('value', formatType); $('#dialogMainForm input[name=download]').attr('value', formatType);
if (!differ) { form.submit();
form.submit();
}
// Close dialog ... // Close dialog ...
$('#export-dialog-modal').modal('hide'); $('#export-dialog-modal').modal('hide');
return {"action":form.attr('action'), "method":form.attr('method'), formatType:formatType};
} }
</script> </script>