diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js
index ee3261c7..615370dd 100644
--- a/mindplot/src/main/javascript/widget/Menu.js
+++ b/mindplot/src/main/javascript/widget/Menu.js
@@ -192,7 +192,7 @@ mindplot.widget.Menu = new Class({
this._addButton('export', false, false, function() {
- var reqDialog = new MooDialog.Request('c/export.htm?mapId=' + mapId, null,
+ var reqDialog = new MooDialog.Request('c/map/' + mapId + '/export.htm', null,
{'class': 'exportModalDialog',
closeButton:true,
destroyOnClose:true,
@@ -209,7 +209,7 @@ mindplot.widget.Menu = new Class({
this._addButton('print', false, false, function() {
- window.open('c/print.htm?mapId=' + mapId)
+ window.open('c/map/' + mapId + '/print.htm');
});
this._registerTooltip('print', "Print");
diff --git a/wise-webapp/src/main/java/com/wisemapping/controller/PublicPagesController.java b/wise-webapp/src/main/java/com/wisemapping/controller/PublicPagesController.java
index 0ca5ce13..317f77fd 100644
--- a/wise-webapp/src/main/java/com/wisemapping/controller/PublicPagesController.java
+++ b/wise-webapp/src/main/java/com/wisemapping/controller/PublicPagesController.java
@@ -66,7 +66,7 @@ public class PublicPagesController extends BaseMultiActionController {
ModelAndView view = new ModelAndView("mindmapEditor", "mindmap", mindmap);
final String xmlMap = mindmap.getXmlAsJsLiteral();
- view.addObject(MindmapEditorController.MAP_XML_PARAM, xmlMap);
+ view.addObject(MAP_XML_PARAM, xmlMap);
view.addObject("editorTryMode", true);
view.addObject("showHelp", true);
return view;
@@ -77,5 +77,6 @@ public class PublicPagesController extends BaseMultiActionController {
}
public static final int TRY_EXAMPLE_MINDMAP_ID = 3;
+ public static final String MAP_XML_PARAM = "mapXml";
}
diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java
index e8fb2ddd..ad5f5631 100644
--- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java
+++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/MindmapController.java
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.ArrayList;
@@ -27,12 +28,48 @@ public class MindmapController {
@Autowired
private MindmapService mindmapService;
- @RequestMapping(value = "export")
- public ModelAndView export(@RequestParam(required = true) long mapId) throws IOException {
- final MindMapBean modelObject = findMindmapBean(mapId);
+ @RequestMapping(value = "map/{id}/export")
+ public ModelAndView export(@PathVariable int id) throws IOException {
+ final MindMapBean modelObject = findMindmapBean(id);
return new ModelAndView("mindmapExport", "mindmap", modelObject);
}
+ @RequestMapping(value = "map/{id}/details")
+ public ModelAndView showDetails(@PathVariable int id) {
+ final MindMapBean modelObject = findMindmapBean(id);
+ final ModelAndView view = new ModelAndView("mindmapDetail", "wisemapDetail", modelObject);
+ view.addObject("user", Utils.getUser());
+ return view;
+ }
+
+ @RequestMapping(value = "map/{id}/print")
+ public ModelAndView showPrintPage(@PathVariable int id) {
+ final MindMap mindmap = findMindmap(id);
+ final ModelAndView view = new ModelAndView("mindmapPrint", "mindmap", mindmap);
+ view.addObject("user", Utils.getUser());
+ return view;
+ }
+
+ @RequestMapping(value = "map/{id}/edit")
+ public ModelAndView editMap(@PathVariable int id, @NotNull HttpServletRequest request)
+ {
+ ModelAndView view;
+ final UserAgent userAgent = UserAgent.create(request);
+ if (userAgent.needsGCF()) {
+ view = new ModelAndView("gcfPluginNeeded");
+// view.addObject(MINDMAP_ID_PARAMETER, mindmapId);
+ } else {
+
+ final MindMap mindmap = mindmapService.getMindmapById(id);
+ view = new ModelAndView("mindmapEditor", "mindmap", mindmap);
+ view.addObject("editorTryMode", false);
+ final boolean showHelp = isWelcomeMap(mindmap);
+ view.addObject("showHelp", showHelp);
+ view.addObject("user", Utils.getUser());
+ }
+ return view;
+ }
+
@RequestMapping(value = "collaborator")
public ModelAndView showCollaborator(@RequestParam(required = true) long mapId) {
final MindMapBean modelObject = findMindmapBean(mapId);
@@ -45,22 +82,6 @@ public class MindmapController {
return new ModelAndView("mindmapViewer", "wisemapsList", modelObject);
}
- @RequestMapping(value = "detail")
- public ModelAndView showDetails(@RequestParam(required = true) long mapId) {
- final MindMapBean modelObject = findMindmapBean(mapId);
- final ModelAndView view = new ModelAndView("mindmapDetail", "wisemapDetail", modelObject);
- view.addObject("user", Utils.getUser());
- return view;
- }
-
- @RequestMapping(value = "print")
- public ModelAndView showPrintPage(@RequestParam(required = true) long mapId) {
- final MindMap mindmap = findMindmap(mapId);
- final ModelAndView view = new ModelAndView("mindmapPrint", "mindmap", mindmap);
- view.addObject("user", Utils.getUser());
- return view;
- }
-
@RequestMapping(value = "changeStatus")
public ModelAndView changeStatus(@RequestParam(required = true) long mapId) throws WiseMappingException {
final MindMap mindmap = findMindmap(mapId);
@@ -130,5 +151,10 @@ public class MindmapController {
return new MindMapBean(findMindmap(mapId));
}
+ private boolean isWelcomeMap(MindMap map) {
+ return map.getTitle().startsWith("Welcome ");
+ }
+
+
private static final String USER_AGENT = "wisemapping.userAgent";
}
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 c2aef054..d01dcf06 100644
--- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java
+++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java
@@ -210,7 +210,6 @@ public class MindmapController extends BaseController {
// Return the new created map ...
response.setHeader("Location", "/service/maps/" + clonedMap.getId());
response.setHeader("ResourceId", Integer.toString(clonedMap.getId()));
-
}
}
diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml
index ab801839..f1145029 100644
--- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml
+++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml
@@ -31,11 +31,6 @@
-
-
-
-
-
@@ -226,7 +221,6 @@
forgotPasswordController
activationController
changePasswordController
- editorController
cookerController
settingsController
publishController
diff --git a/wise-webapp/src/main/webapp/css/wisehome.css b/wise-webapp/src/main/webapp/css/pageTemplate.css
similarity index 74%
rename from wise-webapp/src/main/webapp/css/wisehome.css
rename to wise-webapp/src/main/webapp/css/pageTemplate.css
index 3942d17e..fc9b49c2 100644
--- a/wise-webapp/src/main/webapp/css/wisehome.css
+++ b/wise-webapp/src/main/webapp/css/pageTemplate.css
@@ -138,12 +138,6 @@
padding: 9px 9px 0;
}
-#searchTitleContainer {
- background: url( ../images/search3.png ) no-repeat left;
- padding-left: 35px;
- padding-bottom: 10px;
-}
-
#searchTitle {
height: 16px;
top: 3px;
@@ -174,62 +168,11 @@
margin-right: 10px;
}
-#searchBtnStart {
- width: 6px;
- height: 25px;
- background: url( ../images/btnStart.png ) no-repeat left top;
- float: left;
-}
-
-#searchBtnBody {
- background: url( ../images/btnBody.png );
- height: 18px;
- float: left;
- padding: 5px 0 0;
- text-align: center;
- color: black;
-}
-
-#searchBtnEnd {
- width: 7px;
- height: 25px;
- background: url( ../images/btnEnd.png ) no-repeat right top;
- float: left;
-}
-
-#tryNow {
- clear: both;
- font-size: 20px;
- text-align: center;
- margin-top: 10px;
- margin-left: 20px;
- height:70px;
-}
div#tryNow a {
text-decoration: none;
}
-div#tryNow .tryBtnStart {
- width: 10px;
- height: 70px;
- background: url( ../images/tryItStartBtn2.png ) no-repeat left top;
- float: left;
-}
-
-div#tryNow .tryBtnBody {
- height: 70px;
- background: url( ../images/tryItBodyBtn2.png );
- float: left;
- width: 145px;
-}
-
-div#tryNow .tryBtnEnd {
- width: 11px;
- height: 70px;
- background: url( ../images/tryItEndBtn2.png ) no-repeat right top;
- float: left;
-}
div#tryNow .tryBtnText {
padding: 0 20px;
@@ -269,27 +212,6 @@ div#video a {
text-decoration: none;
}
-div#video .videoBtnStart {
- width: 10px;
- height: 51px;
- background: url( ../images/videoStart.png ) no-repeat left top;
- float: left;
-}
-
-div#video .videoBtnBody {
- height: 51px;
- background: url( ../images/videoBody.png );
- float: left;
- width: 145px;
-}
-
-div#video .videoBtnEnd {
- width: 10px;
- height: 51px;
- background: url( ../images/videoEnd.png ) no-repeat right top;
- float: left;
-}
-
div#video .videoBtnText {
position: relative;
height: 70px;
@@ -359,28 +281,6 @@ div#signUpButton .signUpBtnContainer {
left: 60px;
}
-div#signUpButton .signUpStartBtn {
- width: 5px;
- height: 25px;
- background: url( ../images/signUpStartBtn.png ) no-repeat left top;
- float: left;
-}
-
-div#signUpButton .signUpBodyBtn {
- height: 25px;
- width: 70px;
- background: url( ../images/signUpBodyBtn.png );
- white-space: nowrap;
- float: left;
-
-}
-
-div#signUpButton .signUpEndBtn {
- width: 7px;
- height: 25px;
- background: url( ../images/signUpEndBtn.png ) no-repeat right top;
- float: left;
-}
div#signUpButton .signUpText {
padding: 0 20px;
@@ -483,22 +383,6 @@ div#mainBody {
height: 300px;
}
-div#news li {
- background: transparent url( ../images/icon_triangle_grey_12x13.gif ) no-repeat scroll 0;
- list-style: none outside none;
- margin-bottom: 12px;
- padding: 2px 0 5px 20px;
-}
-
-div#news ul {
- padding: 5px 40px;
-}
-
-div#news h1 {
- font-size: 200%;
- color: #1E4BA5;
- font-weight: bold;
-}
div#login {
float: right;
diff --git a/wise-webapp/src/main/webapp/jsp/embeddedViewError.jsp b/wise-webapp/src/main/webapp/jsp/embeddedViewError.jsp
index a85ba09e..30ed98ad 100644
--- a/wise-webapp/src/main/webapp/jsp/embeddedViewError.jsp
+++ b/wise-webapp/src/main/webapp/jsp/embeddedViewError.jsp
@@ -6,7 +6,6 @@
-
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
index d4652375..e7f1609a 100644
--- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
+++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
@@ -12,7 +12,7 @@
-
+
- ${mindmap.title}
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp
index 3366b8c9..0c7d3e46 100644
--- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp
+++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp
@@ -3,7 +3,7 @@
<%@ include file="/jsp/init.jsp" %>
-
+
@@ -45,9 +45,8 @@
bUseRendered : false,
mDataProp: "title",
fnRender : function(obj) {
- return '' + obj.aData.title + '';
+ return '' + obj.aData.title + '';
}
-
},
{
sTitle : "Description",
@@ -75,10 +74,9 @@
bSortable : false,
bSearchable : false,
fnRender : function(obj) {
- return '';
+ return '';
}
}
-
],
"bAutoWidth" : false,
"oLanguage" : {
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewer.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewer.jsp
index f8ed6b28..99c3c9d5 100644
--- a/wise-webapp/src/main/webapp/jsp/mindmapViewer.jsp
+++ b/wise-webapp/src/main/webapp/jsp/mindmapViewer.jsp
@@ -5,9 +5,7 @@
-
-
!--[if lt IE 9]>
-