},\r
\r
properties : {\r
+ /**\r
+ * Available perspective detected in the current compilation.\r
+ */\r
perspectives : {\r
check : "Map",\r
init : {}\r
},\r
+ /**\r
+ * Currently layouted perspective label\r
+ */\r
activePerspectiveName : {\r
check : "String",\r
init : ""\r
},\r
+ /**\r
+ * Currently layouted perspective.\r
+ */\r
activePerspective : {\r
init : null\r
},\r
+ /**\r
+ * Basic command associated to the application, applicable to all perspectives.\r
+ */\r
commandsDefinitions : {\r
init : {\r
"stop" : {\r
this.loadPerspective();\r
},\r
\r
+ /**\r
+ * Load a given perspective by its name.\r
+ * @param perspectiveName {String} Perspective to load\r
+ */\r
loadPerspective : function(perspectiveName){\r
if(perspectiveName){\r
this.setActivePerspectiveName(perspectiveName);\r
this.setActivePerspective(perspective);\r
},\r
\r
+ /**\r
+ * After switching perspective, call this function to rebuild menu with the right selected.\r
+ */\r
rebuildPerspectiveMenus : function(){\r
var switchCommand = this.getCommandsDefinitions()["switchperspective"];\r
switchCommand.submenu = [];\r
}\r
},\r
\r
+ /**\r
+ * Specific action of calling an external URL without triggering the "close()" method\r
+ * of Application.\r
+ * @param hrefValue {String} A download url that should reply with specific "attachment" header to avoid leaving the application.\r
+ */\r
javascriptDownloadLocation: function(hrefValue){\r
this.interruptClose = true;\r
document.location.href = hrefValue;\r
this.interruptClose = false;\r
},\r
\r
+ /**\r
+ * Called at Application ending (closing the browser).\r
+ */\r
close : function(){\r
if(this.interruptClose) return ; \r
if(this.getActivePerspective()){\r