mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-24 23:17:56 +01:00
Fix resources generation bug
Add support for try.
This commit is contained in:
parent
73056de872
commit
dcd15d8fa4
@ -61,7 +61,7 @@
|
|||||||
println "Converting ${file.name} to ${outfile.name}";
|
println "Converting ${file.name} to ${outfile.name}";
|
||||||
|
|
||||||
outfile.withWriter('UTF-8') { out ->
|
outfile.withWriter('UTF-8') { out ->
|
||||||
out.writeLine "mindplot.Messages.BUNDLES['${lang}'] = { ";
|
out.writeLine "mindplot.Messages.BUNDLES['${lang.toLowerCase()}'] = { ";
|
||||||
file.eachLine('UTF-8') { line ->
|
file.eachLine('UTF-8') { line ->
|
||||||
if( line.trim()!="" && line[0]!='#' ) {
|
if( line.trim()!="" && line[0]!='#' ) {
|
||||||
matcher = line =~ /(.+)=(.+)/;
|
matcher = line =~ /(.+)=(.+)/;
|
||||||
@ -245,7 +245,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.4.2</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
10
pom.xml
10
pom.xml
@ -79,6 +79,16 @@
|
|||||||
<artifactId>yuicompressor-maven-plugin</artifactId>
|
<artifactId>yuicompressor-maven-plugin</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>net.alchim31.maven</groupId>
|
||||||
|
<artifactId>yuicompressor-maven-plugin</artifactId>
|
||||||
|
<version>1.1</version>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -384,7 +384,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
<version>1.7</version>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile</id>
|
<id>compile</id>
|
||||||
|
@ -34,19 +34,6 @@ public class ExtensionsController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private MindmapService mindmapService;
|
private MindmapService mindmapService;
|
||||||
|
|
||||||
@RequestMapping(value = "try")
|
|
||||||
public ModelAndView tryEditor() throws IOException {
|
|
||||||
|
|
||||||
final Mindmap mindmap = mindmapService.findMindmapById(TRY_EXAMPLE_MINDMAP_ID);
|
|
||||||
|
|
||||||
ModelAndView view = new ModelAndView("mindmapEditor", "mindmap", mindmap);
|
|
||||||
final String xmlMap = mindmap.getXmlAsJsLiteral();
|
|
||||||
view.addObject(MAP_XML_PARAM, xmlMap);
|
|
||||||
view.addObject("editorTryMode", true);
|
|
||||||
view.addObject("showHelp", true);
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping(value = "privacyPolicy")
|
@RequestMapping(value = "privacyPolicy")
|
||||||
public ModelAndView privacyPolicy() {
|
public ModelAndView privacyPolicy() {
|
||||||
return new ModelAndView("privacyPolicy");
|
return new ModelAndView("privacyPolicy");
|
||||||
@ -56,8 +43,4 @@ public class ExtensionsController {
|
|||||||
public ModelAndView faq() {
|
public ModelAndView faq() {
|
||||||
return new ModelAndView("faq");
|
return new ModelAndView("faq");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int TRY_EXAMPLE_MINDMAP_ID = 3;
|
|
||||||
public static final String MAP_XML_PARAM = "mapXml";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -138,39 +138,43 @@ public class MindmapController {
|
|||||||
final MindMapBean mindmapBean = findMindmapBean(id);
|
final MindMapBean mindmapBean = findMindmapBean(id);
|
||||||
final Mindmap mindmap = mindmapBean.getDelegated();
|
final Mindmap mindmap = mindmapBean.getDelegated();
|
||||||
|
|
||||||
String result;
|
model.addAttribute("mindmap", mindmapBean);
|
||||||
if (mindmap.hasPermissions(Utils.getUser(), CollaborationRole.EDITOR)) {
|
|
||||||
model.addAttribute("mindmap", mindmapBean);
|
|
||||||
|
|
||||||
// Configure default locale for the editor ...
|
// Configure default locale for the editor ...
|
||||||
final Locale locale = LocaleContextHolder.getLocale();
|
final Locale locale = LocaleContextHolder.getLocale();
|
||||||
model.addAttribute("locale", locale.toString().toLowerCase());
|
model.addAttribute("locale", locale.toString().toLowerCase());
|
||||||
model.addAttribute("principal", Utils.getUser());
|
model.addAttribute("principal", Utils.getUser());
|
||||||
result = "mindmapEditor";
|
model.addAttribute("readOnlyMode", !mindmap.hasPermissions(Utils.getUser(), CollaborationRole.EDITOR));
|
||||||
} else {
|
|
||||||
result = "redirect:view";
|
return "mindmapEditor";
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "maps/{id}/view", method = RequestMethod.GET)
|
@RequestMapping(value = "maps/{id}/view", method = RequestMethod.GET)
|
||||||
public String showMindmapViewerPage(@PathVariable int id, @NotNull Model model) {
|
public String showMindmapViewerPage(@PathVariable int id, @NotNull Model model) {
|
||||||
final MindMapBean mindmapBean = findMindmapBean(id);
|
final String result = showMindmapEditorPage(id, model);
|
||||||
model.addAttribute("mindmap", mindmapBean);
|
|
||||||
model.addAttribute("readOnlyMode", true);
|
model.addAttribute("readOnlyMode", true);
|
||||||
return "mindmapEditor";
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "maps/{id}/try", method = RequestMethod.GET)
|
||||||
|
public String showMindmapTryPage(@PathVariable int id, @NotNull Model model) {
|
||||||
|
final String result = showMindmapEditorPage(id, model);
|
||||||
|
model.addAttribute("memoryPersistence", true);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "maps/{id}/{hid}/view", method = RequestMethod.GET)
|
@RequestMapping(value = "maps/{id}/{hid}/view", method = RequestMethod.GET)
|
||||||
public String showMindmapViewerRevPage(@PathVariable int id, @PathVariable int hid, @NotNull Model model) throws WiseMappingException {
|
public String showMindmapViewerRevPage(@PathVariable int id, @PathVariable int hid, @NotNull Model model) throws WiseMappingException {
|
||||||
final MindMapBean mindmapBean = findMindmapBean(id);
|
|
||||||
|
|
||||||
final MindMapHistory mindmapHistory = mindmapService.findMindmapHistory(id, hid);
|
final String result = showMindmapEditorPage(id, model);
|
||||||
mindmapBean.getDelegated().setXml(mindmapHistory.getXml());
|
|
||||||
model.addAttribute("mindmap", mindmapBean);
|
|
||||||
model.addAttribute("readOnlyMode", true);
|
model.addAttribute("readOnlyMode", true);
|
||||||
|
|
||||||
return "mindmapEditor";
|
// Change map XML ....
|
||||||
|
final MindMapBean mindmapBean = (MindMapBean) model.asMap().get("mindmap");
|
||||||
|
final MindMapHistory mindmapHistory = mindmapService.findMindmapHistory(id, hid);
|
||||||
|
mindmapBean.getDelegated().setXml(mindmapHistory.getXml());
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "maps/{id}/embed")
|
@RequestMapping(value = "maps/{id}/embed")
|
||||||
|
@ -209,7 +209,7 @@ KEYBOARD_SHORTCUTS_MSG=快捷键可以帮助你节约时间,使你的手不必
|
|||||||
COPY_AND_PASTE_TOPICS=拷贝和粘贴节点
|
COPY_AND_PASTE_TOPICS=拷贝和粘贴节点
|
||||||
MULTIPLE_LINES=添加多行长文本
|
MULTIPLE_LINES=添加多行长文本
|
||||||
TERM_OF_USE=条款和条件
|
TERM_OF_USE=条款和条件
|
||||||
CONTACT_US=联系我们
|
CONTACT_US=联系我们
|
||||||
FEEDBACK=反馈
|
FEEDBACK=反馈
|
||||||
SUPPORT=帮助
|
SUPPORT=支援
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ KEYBOARD_SHORTCUTS_MSG=快捷鍵可以幫助你節約時間,使你的手不必
|
|||||||
COPY_AND_PASTE_TOPICS=拷貝和粘貼節點
|
COPY_AND_PASTE_TOPICS=拷貝和粘貼節點
|
||||||
MULTIPLE_LINES=添加多行長文本
|
MULTIPLE_LINES=添加多行長文本
|
||||||
TERM_OF_USE=條款和條件
|
TERM_OF_USE=條款和條件
|
||||||
CONTACT_US=聯繫我們
|
CONTACT_US=聯繫我們
|
||||||
FEEDBACK=反饋
|
FEEDBACK=反饋
|
||||||
SUPPORT=Âπ´Âä©
|
SUPPORT=幫助
|
||||||
|
|
||||||
|
@ -33,7 +33,9 @@
|
|||||||
|
|
||||||
// Configure designer options ...
|
// Configure designer options ...
|
||||||
var options = loadDesignerOptions();
|
var options = loadDesignerOptions();
|
||||||
options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/{id}/document","service/maps/{id}/history/latest");
|
<c:if test="${!memoryPersistence}">
|
||||||
|
options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/{id}/document", "service/maps/{id}/history/latest");
|
||||||
|
</c:if>
|
||||||
var userOptions = ${mindmap.properties};
|
var userOptions = ${mindmap.properties};
|
||||||
options.zoom = userOptions.zoom;
|
options.zoom = userOptions.zoom;
|
||||||
options.readOnly = ${!!readOnlyMode};
|
options.readOnly = ${!!readOnlyMode};
|
||||||
|
Loading…
Reference in New Issue
Block a user