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

68 lines
2.2 KiB
Plaintext
Raw Normal View History

2009-06-07 20:59:43 +02:00
<%@ include file="/jsp/init.jsp" %>
2012-05-24 05:35:17 +02:00
<div class="fform">
<h1>
<spring:message code="${requestScope.title}"/>
</h1>
<p><spring:message code="${requestScope.details}"/></p>
2012-06-04 00:19:48 +02:00
<form method="post" enctype="multipart/form-data" action="#">
2012-05-24 05:35:17 +02:00
<fieldset>
<label for="title"><spring:message code="NAME"/></label>
2012-06-04 00:19:48 +02:00
<input type="text" id="title" required="required"/>
<label for="description"><spring:message code="DESCRIPTION"/></label>
<input type="text" name="description" id="description"/>
2012-05-24 05:35:17 +02:00
2012-06-04 00:19:48 +02:00
<label><spring:message code="DESCRIPTION"/> </label>
<input type="radio" name="type" value="mm"/> Freemind (0.9)
<input type="radio" name="type" value="wxml"/> WiseMapping
2012-05-24 05:35:17 +02:00
<label for="mapFile"><spring:message code="FREE_MIND_FILE"/></label>
<input type="file" name="mapFile" id="mapFile"/>
</fieldset>
2012-06-04 00:19:48 +02:00
<input type="button" id="acceptButton" value="<spring:message code="IMPORT"/>" class="btn btn-primary"/>
<input type="button" id="cancelButton" value="<spring:message code="CANCEL"/>" class="btn">
</form>
2009-06-07 20:59:43 +02:00
</div>
2012-06-04 00:19:48 +02:00
<script type="text/javascript">
// Save status on click ...
$('#cancelButton').click(function() {
window.location = '/c/maps/';
});
$('#acceptButton').click(function(event) {
// http://www.html5rocks.com/en/tutorials/file/dndfiles/
var content;
if (window.FileReader) {
reader = new FileReader();
reader.onloadend = function (e) {
content = e.target.result;
};
reader.readAsDataURL(file);
}
jQuery.ajax("service/maps", {
async:false,
dataType: 'application/freemind',
data: "",
type: 'PUT',
contentType:"text/plain",
success : function(data, textStatus, jqXHR) {
},
error: function(jqXHR, textStatus, errorThrown) {
}
});
});
// Hook for interaction with the main parent window ...
var submitDialogForm = function() {
$('#dialogMainForm').submit();
}
</script>