diff --git a/.gitignore b/.gitignore index 478a868d..386c3dc3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,6 @@ wisemapping.ipr wisemapping.iws wisemapping.iml -wise-webapp/wisemapping.log +wise-webapp/wisemapping.log.* */.DS_Store .DS_Store diff --git a/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java b/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java index 5896e93b..469233c4 100644 --- a/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java +++ b/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java @@ -41,6 +41,7 @@ import javax.xml.bind.JAXBException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLStreamException; import javax.xml.transform.TransformerException; +import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -97,8 +98,13 @@ public class ExportController extends BaseMultiActionController { } } + final ByteArrayOutputStream bos = new ByteArrayOutputStream(); + // Change image link URL. setBaseBaseImgUrl(format, properties); + ExporterFactory.export(properties, mindMap, bos, mapSvg); + + // If the export goes ok, write the map to the stream ... // Set format content type... final String contentType = format.getContentType(); @@ -110,7 +116,7 @@ public class ExportController extends BaseMultiActionController { // Write content ... final ServletOutputStream outputStream = response.getOutputStream(); - ExporterFactory.export(properties, mindMap, outputStream, mapSvg); + outputStream.write(bos.toByteArray()); } catch (Throwable e) { @@ -125,7 +131,7 @@ public class ExportController extends BaseMultiActionController { return null; } - private void setBaseBaseImgUrl(ExportFormat format, @NotNull ExportProperties properties) { + private void setBaseBaseImgUrl(@NotNull ExportFormat format, @NotNull ExportProperties properties) { final String baseUrl; if (format == ExportFormat.SVG) { diff --git a/wise-webapp/src/main/java/com/wisemapping/controller/RenameMindmapController.java b/wise-webapp/src/main/java/com/wisemapping/controller/RenameMindmapController.java index bbc2bdc6..e8832aef 100755 --- a/wise-webapp/src/main/java/com/wisemapping/controller/RenameMindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/controller/RenameMindmapController.java @@ -40,7 +40,7 @@ public class RenameMindmapController final MindMap mindMap = getMindmapFromRequest(httpServletRequest); User user = Utils.getUser(); if (!mindMap.getOwner().equals(user)) { - throw new IllegalStateException("No enought right to execute this operation"); + throw new IllegalStateException("No enough right to execute this operation"); } diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java index 59d81bcb..9aabf96f 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java @@ -106,7 +106,7 @@ public class FreemindImporter if (version != null) { final VersionNumber mapVersion = new VersionNumber(version); if (SUPPORTED_FREEMIND_VERSION.isGreaterThan(mapVersion)) { - throw new ImporterException("FreeMind map has been created with '" + mapVersion.getVersion() + "'. Supported FreeMind version is '" + SUPPORTED_FREEMIND_VERSION.getVersion() + "' or greater."); + throw new ImporterException("FreeMind version " + mapVersion.getVersion() + " is not supported."); } } diff --git a/wise-webapp/src/main/java/com/wisemapping/validator/ImportMapValidator.java b/wise-webapp/src/main/java/com/wisemapping/validator/ImportMapValidator.java index 7125a233..aa532f2a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/validator/ImportMapValidator.java +++ b/wise-webapp/src/main/java/com/wisemapping/validator/ImportMapValidator.java @@ -50,7 +50,8 @@ public class ImportMapValidator extends MapInfoValidator { bean.setImportedMap(map); } catch (ImporterException e) { - errors.rejectValue("mapFile",Messages.IMPORT_MAP_ERROR); + Object[] errorArgs = new Object[]{e.getMessage()}; + errors.rejectValue("mapFile", Messages.IMPORT_MAP_ERROR,errorArgs,"FreeMind could not be imported."); } } } diff --git a/wise-webapp/src/main/webapp/WEB-INF/classes/messages.properties b/wise-webapp/src/main/webapp/WEB-INF/classes/messages.properties index c73fafbd..81eab56c 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/classes/messages.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/classes/messages.properties @@ -240,10 +240,10 @@ NO_ENOUGH_PERMISSIONS_DETAILS=You do not have enough right access to see this ma SHARING=Sharing IMPORT_MINDMAP=Import map IMPORT_MINDMAP_DETAILS=Do you already have maps created with FreeMind?.No problem, Import them!. -IMPORT_MINDMAP_INFO=You can import FreeMind maps to WiseMapping. Please, select the FreeMind map that want to import.
Fields marked with an asterisk * are required. +IMPORT_MINDMAP_INFO=You can import FreeMind 0.9 version maps to WiseMapping. Please, select the FreeMind map that want to import.
Fields marked with an asterisk * are required. PRINT=Print FREE_MIND_FILE=FreeMind File -IMPORT_MAP_ERROR=Imported file seems not to be a valid FreeMind file. +IMPORT_MAP_ERROR=FreeMind file could not be imported. {0} MAP_TITLE_ALREADY_EXISTS=Map name already exists. EMBEDDED_VIEWER=Embed a map viewer in your own web site, blog or post! EMBEDDED_VIEWER_MESSAGE=Once you make your map public, you will be able to embed a mind map viewer in your own web site, blog or post just as we did it here!
Try it!!, you can drag nodes, pan the map, and zoom in and out. diff --git a/wise-webapp/src/main/webapp/images/info.png b/wise-webapp/src/main/webapp/images/info.png new file mode 100644 index 00000000..12cd1aef Binary files /dev/null and b/wise-webapp/src/main/webapp/images/info.png differ diff --git a/wise-webapp/src/main/webapp/jsp/login.jsp b/wise-webapp/src/main/webapp/jsp/login.jsp index 602a1529..76f3b6de 100644 --- a/wise-webapp/src/main/webapp/jsp/login.jsp +++ b/wise-webapp/src/main/webapp/jsp/login.jsp @@ -13,10 +13,6 @@
- - -

You are using an HSQL database. You shouldn't use this environment for production!

-

What is New:

+ + + + +
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 here.
+