Adding Google Chrome Framework for IE<9

This commit is contained in:
Pablo Luna
2011-03-13 16:24:26 +00:00
parent 331652ad74
commit 1b04d1effc
6 changed files with 60 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
package com.wisemapping.controller;
import com.wisemapping.filter.UserAgent;
import com.wisemapping.model.MindMap;
import com.wisemapping.security.Utils;
import org.springframework.web.servlet.ModelAndView;
@@ -38,19 +39,26 @@ public class MindmapEditorController extends BaseMultiActionController {
public ModelAndView open(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
ModelAndView view;
UserAgent userAgent = UserAgent.create(httpServletRequest);
if(userAgent.needsGCF()){
view = new ModelAndView("installCFG");
}
else{
final String mindmapId = httpServletRequest.getParameter(MINDMAP_ID_PARAMETER);
final int mapId = Integer.parseInt(mindmapId);
final MindMap mindmap = getMindmapService().getMindmapById(mapId);
// Mark as try mode...
final ModelAndView view = new ModelAndView("mindmapEditor", "mindmap", mindmap);
view = new ModelAndView("mindmapEditor", "mindmap", mindmap);
view.addObject("editorTryMode", false);
final boolean showHelp = isWelcomeMap(mindmap);
view.addObject("showHelp", showHelp);
final String xmlMap = mindmap.getNativeXmlAsJsLiteral();
view.addObject(MAP_XML_PARAM, xmlMap);
view.addObject("user", Utils.getUser());
}
return view;
}