fixing google chrome installation to work on all browsers

This commit is contained in:
Pablo Luna
2011-04-01 18:32:55 +01:00
parent 183dd367a8
commit 8ea733fc55
8 changed files with 94 additions and 76 deletions

View File

@@ -41,23 +41,26 @@ public class MindmapEditorController extends BaseMultiActionController {
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...
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());
UserAgent userAgent = UserAgent.create(httpServletRequest);
if(userAgent.needsGCF()){
view = new ModelAndView("gcfPluginNeeded");
view.addObject(MINDMAP_ID_PARAMETER, mindmapId);
}
else{
final MindMap mindmap = getMindmapService().getMindmapById(mapId);
// Mark as try mode...
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;
}

View File

@@ -52,6 +52,10 @@ public class PublicPagesController extends BaseMultiActionController {
return new ModelAndView("privacyPolicy");
}
public ModelAndView installCFG(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
return new ModelAndView("installCFG");
}
public ModelAndView home(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
return new ModelAndView("homepage");
}