\r
var viewsManager = org.argeo.ria.components.ViewsManager.getInstance();\r
viewsManager.setApplicationRoot(this.getRoot());\r
- \r
+ \r
+ /*\r
+ var appli = this;\r
+ qx.bom.Event.addNativeListener(window, "unload", function(){\r
+ // TODO : Close perspective if one is open. \r
+ if(appli.getActivePerspective()){\r
+ alert(appli.getActivePerspective());\r
+ appli.getActivePerspective().remove(org.argeo.ria.components.ViewsManager.getInstance());\r
+ } \r
+ });\r
+ */\r
// Enable logging in debug variant\r
if (qx.core.Variant.isSet("qx.debug", "on"))\r
{\r
switchCommand.command.clearMenus();\r
switchCommand.command.setMenu(switchCommand.submenu);\r
}\r
+ },\r
+ \r
+ close : function(){\r
+ if(this.getActivePerspective()){\r
+ this.getActivePerspective().remove(org.argeo.ria.components.ViewsManager.getInstance());\r
+ } \r
+ this.base(arguments);\r
+\r
}\r
\r
}\r