From 94e76fad9c0f5015210b986aa79d8eb16e35903d Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Sun, 7 Sep 2014 16:06:58 -0300 Subject: [PATCH] support both export versions for freemind (old and new 1.0.1) --- .../wisemapping/exporter/ExportProperties.java | 9 +++++++++ .../wisemapping/exporter/ExporterFactory.java | 1 + .../wisemapping/exporter/FreemindExporter.java | 11 +++++++++-- .../wisemapping/rest/MindmapController.java | 5 +++-- .../wisemapping/rest/view/TransformView.java | 4 ++++ .../src/main/resources/messages_ca.properties | 5 +++-- .../src/main/resources/messages_de.properties | 5 +++-- .../src/main/resources/messages_en.properties | 5 +++-- .../src/main/resources/messages_es.properties | 7 ++++--- .../src/main/resources/messages_fr.properties | 5 +++-- .../src/main/resources/messages_it.properties | 5 +++-- .../main/resources/messages_pt_BR.properties | 5 +++-- .../main/resources/messages_zh_CN.properties | 2 +- .../main/resources/messages_zh_TW.properties | 5 +++-- .../src/main/webapp/jsp/iframeWrapper.jsp | 2 ++ .../src/main/webapp/jsp/mindmapExport.jsp | 18 ++++++++++++++---- 16 files changed, 68 insertions(+), 26 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java index 2026135b..18e1354a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExportProperties.java @@ -21,6 +21,7 @@ package com.wisemapping.exporter; public class ExportProperties { private ExportFormat format; private String baseImgPath; + private String version; public ExportFormat getFormat() { return format; @@ -40,6 +41,14 @@ public class ExportProperties { return result; } + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + static public class GenericProperties extends ExportProperties { private GenericProperties(ExportFormat format) { super(format); diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java index f019051c..bcbb5880 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java @@ -142,6 +142,7 @@ public class ExporterFactory { } case FREEMIND: { final FreemindExporter exporter = new FreemindExporter(); + exporter.setVersion(properties.getVersion()); exporter.export(xml.getBytes(UTF_8_CHARSET_NAME), output); break; } diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java index ea6fe517..29dc8c15 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -49,12 +49,12 @@ import java.util.Map; public class FreemindExporter implements Exporter { - private static final String FREE_MIND_VERSION = "0.9.0"; private static final String POSITION_LEFT = "left"; private static final String POSITION_RIGHT = "right"; private com.wisemapping.jaxb.freemind.ObjectFactory objectFactory; private static final String EMPTY_FONT_STYLE = ";;;;;"; private Map nodesMap = null; + private String version; public void export(Mindmap map, OutputStream outputStream) throws ExportException { export(map.getUnzipXml(), outputStream); @@ -71,7 +71,7 @@ public class FreemindExporter mindmapMap = (com.wisemapping.jaxb.wisemap.Map) JAXBUtils.getMapObject(stream, "com.wisemapping.jaxb.wisemap"); final com.wisemapping.jaxb.freemind.Map freemindMap = objectFactory.createMap(); - freemindMap.setVersion(FREE_MIND_VERSION); + freemindMap.setVersion(this.getVersion()); final List topics = mindmapMap.getTopic(); @@ -342,4 +342,11 @@ public class FreemindExporter } + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } } diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index 89d79f5d..86f1a816 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -114,13 +114,14 @@ public class MindmapController extends BaseController { return new ModelAndView("transformViewWise", values); } - @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/freemind"}, params = {"download=mm"}) + @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/freemind"}, params = {"download=mm","version"}) @ResponseBody - public ModelAndView retrieveDocumentAsFreemind(@PathVariable int id) throws IOException, MapCouldNotFoundException { + public ModelAndView retrieveDocumentAsFreemind(@PathVariable int id, @RequestParam(value = "version") String version) throws IOException, MapCouldNotFoundException { final Mindmap mindMap = findMindmapById(id); final Map values = new HashMap(); values.put("content", mindMap.getXmlStr()); values.put("filename", mindMap.getTitle()); + values.put("version", version); return new ModelAndView("transformViewFreemind", values); } diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java index 26becdee..4c754537 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java @@ -56,6 +56,7 @@ public class TransformView extends AbstractView { final String content = (String) viewMap.get("content"); final String filename = (String) viewMap.get("filename"); + final String version = (String) viewMap.get("version"); // Build format properties ... final ExportProperties properties = ExportProperties.create(exportFormat); @@ -63,6 +64,9 @@ public class TransformView extends AbstractView { final ExportProperties.ImageProperties imageProperties = (ExportProperties.ImageProperties) properties; imageProperties.setSize(ExportProperties.ImageProperties.Size.LARGE); } + if (version != null) { + properties.setVersion(version); + } // Set format content type... final String contentType = exportFormat.getContentType(); diff --git a/wise-webapp/src/main/resources/messages_ca.properties b/wise-webapp/src/main/resources/messages_ca.properties index e8244e85..9b499c7e 100644 --- a/wise-webapp/src/main/resources/messages_ca.properties +++ b/wise-webapp/src/main/resources/messages_ca.properties @@ -35,7 +35,8 @@ EXPORT=Exportar SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG) PDF_EXPORT_FORMAT=Portable Document Format (PDF) IMG_EXPORT_FORMAT=Imatge(PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Freemind (version 1.0.1) DELETE=Esborrar LOGIN_ERROR=El nom d'usuari o la contrasenya no són correctes USER_INACTIVE=Perdo, el seu compre encara no ha estar activar. Rebrà un correu amb les dades d'activació. @@ -162,7 +163,7 @@ ADD_MESSAGE=Afegir un missatge WHO_CAN_ACCESS=Qui pot accedir IS_OWNER=És propietari OPTIONAL_CUSTOM_MESSAGE=Opcional\: Incloure un missatge personalitzat -IMPORT_MINDMAP_INFO=És possible importar mapes en format FreeMind 0.9 i WiseMapping. Seleccioni el fitxer a importar. +IMPORT_MINDMAP_INFO=És possible importar mapes en format FreeMind 1.0.1 i WiseMapping. Seleccioni el fitxer a importar. VIEW=veure YOU=Vostè INFO_UPDATE_SUCCESS=La seva informació s'ha actualitzat correctament. diff --git a/wise-webapp/src/main/resources/messages_de.properties b/wise-webapp/src/main/resources/messages_de.properties index ab854356..a59d134a 100644 --- a/wise-webapp/src/main/resources/messages_de.properties +++ b/wise-webapp/src/main/resources/messages_de.properties @@ -38,7 +38,8 @@ EXPORT=Exportieren SVG_EXPORT_FORMAT=Skalierbare Vektor Graphik (SVG) PDF_EXPORT_FORMAT=Portables Dokumenten Format (PDF) IMG_EXPORT_FORMAT=Bilddatei (PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Freemind (version 1.0.1) WISEMAPPING_EXPORT_FORMAT = WiseMapping LAST_UPDATE=Zuletzt geändert LAST_UPDATE_BY=Zuletzt geändert von @@ -99,7 +100,7 @@ UNEXPECTED_ERROR=Outch!!. Ein unerwarteter Fehler ist aufgetreten. UNEXPECTED_ERROR_DETAILS=Es tut uns Leid! Es ist ein Fehler aufgetreten der es uns nicht ermöglicht Ihre Anfrage zu bearbeiten. Bitte versuchen Sie es noch einmal oder gehen Sie zur Anfangsseite. NO_ENOUGH_PERMISSIONS=Outch!!. Diese map ist nicht mehr verfügbar. NO_ENOUGH_PERMISSIONS_DETAILS=Sie haben nicht die erforderlichen Rechte, um sich diese map anzusehen. Diese map ist entweder privat oder wurde gelöscht. -IMPORT_MINDMAP_INFO=Sie können FreeMind 0.9 und WiseMapping maps in Ihre List von maps importieren. Wählen Sie die Datei zum Import. +IMPORT_MINDMAP_INFO=Sie können FreeMind 1.0.1 und WiseMapping maps in Ihre List von maps importieren. Wählen Sie die Datei zum Import. PRINT=Drucken IMPORT_MAP_ERROR=FreeMind Datei konnte nicht importiert werden. {0} MAP_TITLE_ALREADY_EXISTS=Sie haben schon eine map mit identischem Namen. diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index 0ce64939..1d5427f4 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -40,7 +40,8 @@ EXPORT=Export SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG) PDF_EXPORT_FORMAT=Portable Document Format (PDF) IMG_EXPORT_FORMAT=Image File (PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Freemind (version 1.0.1) WISEMAPPING_EXPORT_FORMAT = WiseMapping LAST_UPDATE=Last Update LAST_UPDATE_BY=Last Update By @@ -103,7 +104,7 @@ UNEXPECTED_ERROR_DETAILS=We're sorry, an error has occurred and we can't process UNEXPECTED_ERROR_SERVER_ERROR=We're sorry, an error has occurred and we can't process your request. Refresh the page and try again. If the problem persist, click below on "Raise An Issue" to open a ticket. NO_ENOUGH_PERMISSIONS=Outch!!. This map is not available anymore. NO_ENOUGH_PERMISSIONS_DETAILS=You do not have enough right access to see this map. This map has been changed to private or deleted. -IMPORT_MINDMAP_INFO=You can import FreeMind 0.9 and WiseMapping maps to your list of maps. Select the file you want to import. +IMPORT_MINDMAP_INFO=You can import FreeMind 1.0.1 and WiseMapping maps to your list of maps. Select the file you want to import. PRINT=Print IMPORT_MAP_ERROR=FreeMind file could not be imported. {0} MAP_TITLE_ALREADY_EXISTS=You have already a map with the same name diff --git a/wise-webapp/src/main/resources/messages_es.properties b/wise-webapp/src/main/resources/messages_es.properties index 596a3ddc..ac2848e3 100644 --- a/wise-webapp/src/main/resources/messages_es.properties +++ b/wise-webapp/src/main/resources/messages_es.properties @@ -35,7 +35,8 @@ EXPORT=Exportar SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG) PDF_EXPORT_FORMAT=Portable Document Format (PDF) IMG_EXPORT_FORMAT=Imagen (PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Freemind (version 1.0.1) DELETE=Borrar LOGIN_ERROR=El nombre de usuario o la contraseña introducidos no son correctos. USER_INACTIVE=Disculpe, su cuenta aun no ha sido activada. Usted recibirá una notificación por email tan pronto la activemos. @@ -66,7 +67,7 @@ ACCOUNT_DETAIL=Desea cambiar sus preferencias? Este es el lugar. SVG_EXPORT_FORMAT_DETAILS=Scalable Vector Graphics (SVG) es un XML markup language para describir gráficos vectoriale de dos dimensiones. Este formato le permitira imprimir sus mapas sin perdida de calidad o resolución. PDF_EXPORT_FORMAT_DETAILS=Obtenga su mapa como un documento (PDF) para compartirlo y usarlo en sus presentaciones. IMG_EXPORT_FORMAT_DETAILS=Obtenga una representación gráfica de su mapa incluyendo todo los colores y formas para reusarlo en documentos o para ser archivado -FREEMIND_EXPORT_FORMAT_DETAILS = FreeMind un aplicación de escritorio gratuita de diseno de mapas mentales +FREEMIND_EXPORT_FORMAT_DETAILS = FreeMind una aplicación de escritorio gratuita de diseño de mapas mentales TERMSOFUSE=Términos de uso PRIVACYPOLICY= Politica de privacidad EXPORT_DETAILS=Exporte el mapa en el formato que desee y comience a utilizarlo en sus presentaciones @@ -164,7 +165,7 @@ ADD_MESSAGE=Agregar un mensaje WHO_CAN_ACCESS=Quienes pueden acceder IS_OWNER=Es dueño OPTIONAL_CUSTOM_MESSAGE=Opcional\: Incluir un mensaje personalizado -IMPORT_MINDMAP_INFO=Es posible importar mapas en formato FreeMind 0.9 y WiseMapping. Seleccione el archivo a importar. +IMPORT_MINDMAP_INFO=Es posible importar mapas en formato FreeMind 1.0.1 y WiseMapping. Seleccione el archivo a importar. VIEW=ver YOU=Vos INFO_UPDATE_SUCCESS=Your info has been changed successfully diff --git a/wise-webapp/src/main/resources/messages_fr.properties b/wise-webapp/src/main/resources/messages_fr.properties index 37499b38..cab4963e 100644 --- a/wise-webapp/src/main/resources/messages_fr.properties +++ b/wise-webapp/src/main/resources/messages_fr.properties @@ -43,7 +43,8 @@ EXPORT=Exporter SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG) PDF_EXPORT_FORMAT=Portable Document Format (PDF) IMG_EXPORT_FORMAT=Fichier Graphique (PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Freemind (version 1.0.1) WISEMAPPING_EXPORT_FORMAT = WiseMapping LAST_UPDATE=Date dernière modification LAST_UPDATE_BY=Dernière modification par @@ -104,7 +105,7 @@ UNEXPECTED_ERROR=Aïe!!. Une erreur inattendue est survenue. UNEXPECTED_ERROR_DETAILS=Désolé, une erreur s'est produite et nous ne pouvons pas exécuter votre demande. Essayez à nouveau, ou retournez à la page d'accueil. NO_ENOUGH_PERMISSIONS=Aïe!!. Cette carte n'est plus accessible. NO_ENOUGH_PERMISSIONS_DETAILS=Vous n'avez pas les droits d'accès suffisants pour voir cette carte. Cette carte est devenue privée, ou a été détruite. -IMPORT_MINDMAP_INFO=Vous pouvez importer des cartes FreeMind 0.9 et WiseMapping dans votre liste de cartes. Choisissez le fichier à importer. +IMPORT_MINDMAP_INFO=Vous pouvez importer des cartes FreeMind 1.0.1 et WiseMapping dans votre liste de cartes. Choisissez le fichier à importer. PRINT=Imprimer IMPORT_MAP_ERROR=Le fichier FreeMind n'a pas pu être importé. {0} MAP_TITLE_ALREADY_EXISTS=Vous avez déjà une carte portant le même nom. diff --git a/wise-webapp/src/main/resources/messages_it.properties b/wise-webapp/src/main/resources/messages_it.properties index f1886328..44868599 100644 --- a/wise-webapp/src/main/resources/messages_it.properties +++ b/wise-webapp/src/main/resources/messages_it.properties @@ -38,7 +38,8 @@ EXPORT=Esporta SVG_EXPORT_FORMAT=Scalable Vector Graphics (SVG) PDF_EXPORT_FORMAT=Portable Document Format (PDF) IMG_EXPORT_FORMAT=File Immagine (PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Freemind (versione 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Freemind (version 1.0.1) WISEMAPPING_EXPORT_FORMAT = WiseMapping LAST_UPDATE=Ultimo Aggiornamento LAST_UPDATE_BY=Ultimo aggiornamento da @@ -99,7 +100,7 @@ UNEXPECTED_ERROR=Oops!! Si è verificato un errore inaspettato. UNEXPECTED_ERROR_DETAILS=Siamo spiacenti, si è verificato un errore e non possiamo procedere nella tua richiesta. Prego, provare più tardi o torna alla home page. NO_ENOUGH_PERMISSIONS=Oops!!. Questa mappa non è più disponibile. NO_ENOUGH_PERMISSIONS_DETAILS=Non hai sufficienti diritti per visualizzare questa mappa. Il suo stato è cambiato in Privato oppure è stata eliminata. -IMPORT_MINDMAP_INFO=Puoi importare mappe da FreeMind 0.9 e da WiseMapping sulla tua lista di mappe. Seleziona il file da importare. +IMPORT_MINDMAP_INFO=Puoi importare mappe da FreeMind 1.0.1 e da WiseMapping sulla tua lista di mappe. Seleziona il file da importare. PRINT=Stampa IMPORT_MAP_ERROR=Il file FreeMind non può essere importato. {0} MAP_TITLE_ALREADY_EXISTS=Esiste già una mappa con lo stesso nome diff --git a/wise-webapp/src/main/resources/messages_pt_BR.properties b/wise-webapp/src/main/resources/messages_pt_BR.properties index 0fcd3c98..b4d3b90d 100644 --- a/wise-webapp/src/main/resources/messages_pt_BR.properties +++ b/wise-webapp/src/main/resources/messages_pt_BR.properties @@ -36,7 +36,8 @@ EXPORT=Exportar SVG_EXPORT_FORMAT=Gráfico Vetorial Escalável (SVG) PDF_EXPORT_FORMAT=Formato de Documento Portável (PDF) IMG_EXPORT_FORMAT=Arquivo de Imagem (PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Exportar para o Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Exportar para o Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Exportar para o Freemind (version 1.0.1) WISEMAPPING_EXPORT_FORMAT = WiseMapping LAST_UPDATE=Última Atualização LAST_UPDATE_BY=Última Atualização @@ -97,7 +98,7 @@ UNEXPECTED_ERROR=Opa!!. Ocorreu um erro inesperado. UNEXPECTED_ERROR_DETAILS=Lamentamos, ocorreu um erro e não podemos processar a sua solicitação. Por favor, tente novamente ou vá para a página Inicial. NO_ENOUGH_PERMISSIONS=Opa!!. Este mapa não está mais disponível. NO_ENOUGH_PERMISSIONS_DETAILS=Você não tem privilégios suficientes para ver este mapa. Este mapa foi alterado para privado ou deletado. -IMPORT_MINDMAP_INFO=Você pode importar mapas do FreeMind 0.9 e do WiseMapping para sua lista de mapas. Selecione o arquivo que você quer importar. +IMPORT_MINDMAP_INFO=Você pode importar mapas do FreeMind 1.0.1 e do WiseMapping para sua lista de mapas. Selecione o arquivo que você quer importar. PRINT=Imprimir IMPORT_MAP_ERROR=O arquivo FreeMind não pode ser importado. {0} MAP_TITLE_ALREADY_EXISTS=Você já tem um mapa com o mesmo nome diff --git a/wise-webapp/src/main/resources/messages_zh_CN.properties b/wise-webapp/src/main/resources/messages_zh_CN.properties index d1ce031a..688c392f 100644 --- a/wise-webapp/src/main/resources/messages_zh_CN.properties +++ b/wise-webapp/src/main/resources/messages_zh_CN.properties @@ -99,7 +99,7 @@ UNEXPECTED_ERROR=晕!!不可预知的错误。 UNEXPECTED_ERROR_DETAILS=抱歉,突遭错误,我们无法处理你的请求。 请重试或者访问首页。 NO_ENOUGH_PERMISSIONS=晕!!此图不可访问。 NO_ENOUGH_PERMISSIONS_DETAILS=你没有权限访问这张图。此图已修改访问权限或者已删除。 -IMPORT_MINDMAP_INFO=你可以导入 FreeMind 0.9 和 WiseMapping 格式的思维导图。选择你想要导入的文件。 +IMPORT_MINDMAP_INFO=你可以导入 FreeMind 1.0.1 和 WiseMapping 格式的思维导图。选择你想要导入的文件。 PRINT=打印 IMPORT_MAP_ERROR=FreeMind 文件不能导入。 MAP_TITLE_ALREADY_EXISTS=已有同名称图 diff --git a/wise-webapp/src/main/resources/messages_zh_TW.properties b/wise-webapp/src/main/resources/messages_zh_TW.properties index 55845eb1..7b4441aa 100644 --- a/wise-webapp/src/main/resources/messages_zh_TW.properties +++ b/wise-webapp/src/main/resources/messages_zh_TW.properties @@ -38,7 +38,8 @@ EXPORT=導出 SVG_EXPORT_FORMAT=可縮放向量圖形(SVG) PDF_EXPORT_FORMAT=便攜檔格式(PDF) IMG_EXPORT_FORMAT=圖像檔(PNG/JPEG) -FREEMIND_EXPORT_FORMAT = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT_09 = Freemind (version 0.9.0) +FREEMIND_EXPORT_FORMAT = Freemind (version 1.0.1) WISEMAPPING_EXPORT_FORMAT = WiseMapping LAST_UPDATE=最近更新 LAST_UPDATE_BY=最近更新者 @@ -99,7 +100,7 @@ UNEXPECTED_ERROR=暈!!不可預知的錯誤。 UNEXPECTED_ERROR_DETAILS=抱歉,突遭錯誤,我們無法處理你的請求。 請重試或者訪問首頁。 NO_ENOUGH_PERMISSIONS=暈!!此圖不可訪問。 NO_ENOUGH_PERMISSIONS_DETAILS=你沒有許可權訪問這張圖。此圖已修改訪問許可權或者已刪除。 -IMPORT_MINDMAP_INFO=你可以導入 FreeMind 0.9 和 WiseMapping 格式的思維導圖。選擇你想要導入的檔。 +IMPORT_MINDMAP_INFO=你可以導入 FreeMind 1.0.1 和 WiseMapping 格式的思維導圖。選擇你想要導入的檔。 PRINT=列印 IMPORT_MAP_ERROR=FreeMind 檔不能導入。 MAP_TITLE_ALREADY_EXISTS=已有同名稱圖 diff --git a/wise-webapp/src/main/webapp/jsp/iframeWrapper.jsp b/wise-webapp/src/main/webapp/jsp/iframeWrapper.jsp index efca321f..d240fb4c 100644 --- a/wise-webapp/src/main/webapp/jsp/iframeWrapper.jsp +++ b/wise-webapp/src/main/webapp/jsp/iframeWrapper.jsp @@ -26,6 +26,7 @@ var svgXml = context.method == "POST" ? window.document.getElementById('workspaceContainer').innerHTML : ""; $('svgXml').setAttribute('value', svgXml); $('download').setAttribute('value', context.formatType); + $('version').setAttribute('value', context.version); iframeForm.submit(); } if (MooDialog.Request.active) { @@ -44,4 +45,5 @@ enctype="application/x-www-form-urlencoded" id="iframeExportForm"> + \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/jsp/mindmapExport.jsp b/wise-webapp/src/main/webapp/jsp/mindmapExport.jsp index 7b3dbd8d..8e8cf57c 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapExport.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapExport.jsp @@ -10,11 +10,17 @@ enctype="application/x-www-form-urlencoded" id="dialogMainForm"> +
+ + @@ -87,7 +93,7 @@ // No way to obtain map svg. Hide panels.. if (window.location.pathname.indexOf('exportf') != -1) { $('#exportInfo').hide(); - $('#freemind,#pdf,#svg,#odt,#txt,#xls,#mmap').click('click', function (event) { + $('#freemind,#freemind09,#pdf,#svg,#odt,#txt,#xls,#mmap').click('click', function (event) { $('#imgFormat').hide(); }); @@ -103,7 +109,6 @@ // 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); @@ -123,6 +128,11 @@ } + var version = $('#dialogMainForm input:checked').attr('version'); + if (version) { + $('#dialogMainForm input[name=version]').attr('value', version); + } + $('#dialogMainForm input[name=download]').attr('value', formatType); if (!differ) { form.submit(); @@ -131,7 +141,7 @@ // Close dialog ... $('#export-dialog-modal').modal('hide'); - return {"action":form.attr('action'), "method":form.attr('method'), formatType:formatType}; + return {"action":form.attr('action'), "method":form.attr('method'), "formatType":formatType, "version": version}; } \ No newline at end of file