Finish export dialog.

This commit is contained in:
Paulo Gustavo Veiga 2012-06-06 01:42:24 -03:00
parent 4d3e371d05
commit 907f31c030
7 changed files with 21 additions and 21 deletions

View File

@ -186,7 +186,7 @@ div.modalDialog .title
} }
.exportModalDialog .content{ .exportModalDialog .content{
height:370px; height:400px;
} }

View File

@ -293,12 +293,17 @@ public class MindmapController extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = "/maps", consumes = {"application/freemind"}) @RequestMapping(method = RequestMethod.POST, value = "/maps", consumes = {"application/freemind"})
@ResponseStatus(value = HttpStatus.CREATED) @ResponseStatus(value = HttpStatus.CREATED)
public void createMapFromFreemind(@RequestBody byte[] freemindXml, @RequestParam(required = true) String title, @RequestParam(required = false) String description, @NotNull HttpServletResponse response) throws IOException, WiseMappingException, ImporterException { public void createMapFromFreemind(@RequestBody byte[] freemindXml, @RequestParam(required = true) String title, @RequestParam(required = false) String description, @NotNull HttpServletResponse response) throws IOException, WiseMappingException {
// Convert map ... // Convert map ...
final MindMap mindMap;
try {
final Importer importer = ImporterFactory.getInstance().getImporter(ImportFormat.FREEMIND); final Importer importer = ImporterFactory.getInstance().getImporter(ImportFormat.FREEMIND);
final ByteArrayInputStream stream = new ByteArrayInputStream(freemindXml); final ByteArrayInputStream stream = new ByteArrayInputStream(freemindXml);
final MindMap mindMap = importer.importMap(title, "", stream); mindMap = importer.importMap(title, "", stream);
} catch (ImporterException e) {
throw buildValidationException("xml", "The selected file does not seems to be a valid Freemind or WiseMapping file. Contact support in case the problem persists.");
}
// Save new map ... // Save new map ...
final User user = Utils.getUser(); final User user = Utils.getUser();

View File

@ -303,7 +303,7 @@ INSTALL_CFG_CLICK_HERE=To install Google Chrome Frame Plugin click here
INVALID_EMAIL_ERROR = The e-mail was not verified INVALID_EMAIL_ERROR = The e-mail was not verified
BROWSER_NOT_SUPPOERTED= Current Browser is not supported. BROWSER_NOT_SUPPOERTED= Current Browser is not supported.
CHECK_BROWSERS= You can check supported browser at CHECK_BROWSERS= You can check supported browser at
NO_PRODUCTION_DATABASE_CONFIGURED=Note: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.5 instead. You can find more information how to configure MySQL NO_PRODUCTION_DATABASE_CONFIGURED=Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.5 instead. You can find more information how to configure MySQL
IMPORT=Import IMPORT=Import
EMBEDDED_MAP_SIZE=* Note: You can change embedded map size modifying 'height' and 'width' style properties. You can also adjust the zoom factor modifying 'zoom' parameter from the URL. EMBEDDED_MAP_SIZE=* Note: You can change embedded map size modifying 'height' and 'width' style properties. You can also adjust the zoom factor modifying 'zoom' parameter from the URL.

View File

@ -252,10 +252,10 @@ function updateStarred(spanElem) {
function callbackOnTableInit() { function callbackOnTableInit() {
// Register starred events ... // Register starred events ...
console.log($('#mindmapListTable .starredOff, #mindmapListTable .starredOn'));
$('#mindmapListTable .starredOff, #mindmapListTable .starredOn').click(function() { $('#mindmapListTable .starredOff, #mindmapListTable .starredOn').click(function() {
updateStarred(this); updateStarred(this);
}); });
updateStatusToolbar();
} }
$(function() { $(function() {

View File

@ -68,9 +68,8 @@
</div> </div>
<c:if test="${isHsql== 'true'}"> <c:if test="${isHsql== 'true'}">
<div style="padding:10px;background-color: #E0EFFF; border-radius: 5px 5px 5px 5px;border-style:solid;border-color:gray"> <div class="alert alert-info">
<img src="../images/info.png" style="margin:0 4px" alt="info"> <span class="label label-important">Warning</span> <spring:message code="NO_PRODUCTION_DATABASE_CONFIGURED"/>&nbsp;<a
<spring:message code="NO_PRODUCTION_DATABASE_CONFIGURED"/>&nbsp;<a
href="http://www.wisemapping.org/documentation/configu">here</a>. href="http://www.wisemapping.org/documentation/configu">here</a>.
</div> </div>
</c:if> </c:if>

View File

@ -3,11 +3,6 @@
<p class="alert alert-info"> <p class="alert alert-info">
<spring:message code="EXPORT_DETAILS"/> <spring:message code="EXPORT_DETAILS"/>
</p> </p>
<p id="exportInfo">
<span class="label label-important">Warning</span> <spring:message code="EXPORT_FORMAT_RESTRICTIONS"/>
</p>
<div> <div>
<form method="GET" class="form-horizontal" action="service/maps/${mindmap.id}" <form method="GET" class="form-horizontal" action="service/maps/${mindmap.id}"
enctype="application/x-www-form-urlencoded" id="dialogMainForm"> enctype="application/x-www-form-urlencoded" id="dialogMainForm">
@ -51,6 +46,12 @@
</div> </div>
<p id="exportInfo">
<span class="label label-important">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..

View File

@ -9,7 +9,7 @@
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label for="mapFile" class="control-label"><spring:message code="MIND_FILE"/>: </label> <label for="mapFile" class="control-label"><spring:message code="MIND_FILE"/>: </label>
<input type="file" name="mapFile" id="mapFile" required="required" class="control"/> <input type="file" name="file" id="mapFile" required="required" class="control"/>
</div> </div>
<div class="control-group"> <div class="control-group">
<label for="title" class="control-label"><spring:message code="NAME"/>: </label> <label for="title" class="control-label"><spring:message code="NAME"/>: </label>
@ -30,11 +30,6 @@
<script type="text/javascript"> <script type="text/javascript">
// @Todo: Pending: report errors, manage corrupted mapsmanage case,escape url parameters, import with same title tries to save in post XML, explanation.
$('#messagePanel').hide();
// Save status on click ... // Save status on click ...
var contentType = null; var contentType = null;
var fileContent = null; var fileContent = null;