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=00af7cdf0641abc82fdf0d5c48399efbb0422378;hb=43a20cbd46654d84ab1610ddb1ac6bbb058fe0c3;hp=4fb4c3048ca6702ac01778e35a6a9f1fbd088071;hpb=e8b06d140834d27f1258b200e41d2f35d5fd80bf;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 4fb4c3048..00af7cdf0 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"); @@ -202,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){ @@ -428,7 +439,12 @@ 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); if(!target){ @@ -483,76 +499,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"; - alert(xmlString); - }, /** - * Make an SlcExecutionMessage from the currently displayed form. - * @param crtPartId {String} The form part currently displayed - * @param slcExec {org.argeo.slc.ria.SlcExecutionMessage} The message to fill. - * @param fields {Map} The fields of the form - * @param hiddenFields {Map} The hidden ones - * @param freeFields {Array} The free fields. + * Called at execution + * @param agentUuid {String} The id of the target agent */ - _prepareSlcExecutionMessage : function(crtPartId, slcExec, fields, hiddenFields, freeFields){ - if(crtPartId == "standard"){ - slcExec.setStatus(fields.status.getValue()); - slcExec.setHost(fields.host.getValue()); - slcExec.setUser(fields.user.getValue()); - }else{ - slcExec.addAttribute("ant.file", fields["ant.file"].getValue()); - } - for(var i=0;i