X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2FNewLauncherApplet.js;h=6b401af56417df1a2f70900f9fe165fdc4e1d335;hb=859114a86e3d1073b7b7aba89cee4224b8e897bf;hp=c0ff0223e41e298b1ac5b0e957deb4567dcab6cb;hpb=27e74a9a4454329f4021da36abe0427179b55dc0;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/NewLauncherApplet.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/NewLauncherApplet.js index c0ff0223e..6b401af56 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/NewLauncherApplet.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/NewLauncherApplet.js @@ -25,7 +25,10 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", check:"org.argeo.ria.components.ViewSelection" }, instanceId : {init:""}, - instanceLabel : {init:""}, + instanceLabel : {init:""}, + /** + * A boolean registering whether the SpecEditor must autoOpen or not when a spec is added to the Batch. + */ autoOpen : { init : true, check : "Boolean" @@ -183,6 +186,10 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", }, statics : { + /** + * Loader for the "flow" level : takes a folder containing "moduleData" and create its children. + * @param folder {qx.ui.tree.TreeFolder} A Tree folder containing in the key "moduleData" of its user data a map containing the keys {name,version} + */ flowLoader : function(folder){ var moduleData = folder.getUserData("moduleData"); //var req = org.argeo.ria.remote.RequestManager.getInstance().getRequest("../argeo-ria-src/stub.xml", "GET", "application/xml"); @@ -190,10 +197,6 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", req.addListener("completed", function(response){ var executionModule = new org.argeo.slc.ria.execution.Module(); executionModule.setXmlNode(response.getContent()); - // STUB - // executionModule.setName(moduleData.name); - // executionModule.setVersion(moduleData.version); - // END var execFlows = executionModule.getExecutionFlows(); for(var key in execFlows){ var file = new qx.ui.tree.TreeFile(key); @@ -206,6 +209,10 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", req.send(); }, + /** + * Loader for the "modules" level : takes any tree folder, currently the root folder. + * @param folder {qx.ui.tree.TreeFolder} The root folder + */ modulesLoader : function(folder){ var req = org.argeo.slc.ria.SlcApi.getListModulesService(); req.addListener("completed", function(response){ @@ -256,6 +263,7 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", this.setView(viewPane); this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId())); this._amqClient = org.argeo.ria.remote.JmsClient.getInstance(); + this._amqClient.uri = "/org.argeo.slc.webapp/amq"; this._amqClient.startPolling(); }, @@ -289,11 +297,7 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", } this._amqClient.addListener("agentregister", "topic://agent.register", reloadHandler, this); this._amqClient.addListener("agentunregister", "topic://agent.unregister", reloadHandler, this); - reloadHandler(); - - this._amqClient.addListener("modulesResponse", "modulesManager.response", function(message){ - this.info(message); - }, this); + reloadHandler(); }, addScroll : function(){ @@ -431,9 +435,14 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", splitPane.add(this.tree, 0); splitPane.add(this.listPane, 1); }, - + + /** + * Adds a given ExecutionFlow to the batch + * @param target {mixed} The dropped target, can be a TreeFile (add) or a ListItem (reorder). + * @param after {qx.ui.form.ListItem} Optional list item : if set, the flow will be added as a new list item positionned after this one. + */ _addFlowToBatch : function(target, after){ - this.debug(target); + //this.debug(target); if(!target){ target = this.tree.getSelectedItem(); if(!target) return; @@ -486,75 +495,23 @@ qx.Class.define("org.argeo.slc.ria.NewLauncherApplet", if(menu.length) command.setEnabled(true); }, - currentBatchToXml : function(){ - var selection = this.list.getChildren(); - var xmlString = ""; - for(var i=0;i