Improve UI lifecycle
[lgpl/argeo-commons.git] / dist / argeo-node / rpm / usr / share / node / jjs / cms.js
index b78fe0b5f235a1207f55ecdcfa388e4e1e9af40e..2f3bcc436744ec3b93e4b31627816f33e4e59d6c 100755 (executable)
@@ -33,4 +33,12 @@ if (typeof app !== 'undefined') {
                        + policyFile);
        System.setProperty("log4j.configuration", "file://" + appConf
                        + "/log4j.properties");
+}
+
+function openUi(){
+       osgi.spring("org.argeo.cms.ui.workbench.rap");
+       var appUrl = "http://localhost:" + osgi.httpPort + "/ui/node";
+       $EXEC("/usr/bin/chromium-browser --app=" + appUrl);
+       // shutdown when the window is closed
+       osgi.shutdown();
 }
\ No newline at end of file