X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=server%2Forg.argeo.slc.ria%2Fsrc%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2FBatchView.js;h=a2a8ff9c8832427fea81b0ce43c548fc8cad9918;hb=5c48c26d57322223774890dbc66a6aca533d894f;hp=78715de0403652f23aad1095fc6ccf67ba59daa7;hpb=0978a69079cc0b3bee40fc24daee00ea4075e69d;p=gpl%2Fargeo-slc.git diff --git a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/BatchView.js b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/BatchView.js index 78715de04..a2a8ff9c8 100644 --- a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/BatchView.js +++ b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/BatchView.js @@ -112,8 +112,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", toolbar : "batch", callback : function(e) { var sel = this.list.getSortedSelection(); - var confirmPref = this.getRiaPreferenceValue("slc.batch.delete.confirm"); - this.debug(confirmPref); + var confirmPref = this.getRiaPreferenceValue("slc.batch.delete.confirm"); var execution = function() { for (var i = 0; i < sel.length; i++) { this.list.remove(sel[i]); @@ -383,16 +382,14 @@ qx.Class.define("org.argeo.slc.ria.BatchView", var executionFlow = target.getUserData("executionFlow"); var batchEntry = new org.argeo.slc.ria.execution.BatchEntrySpec( executionModule, executionFlow); - var label = batchEntry.getLabel(); - var icon = target.getIcon() || "org.argeo.slc.ria/office-document.png"; - var item = new qx.ui.form.ListItem(label, icon); - /* - item.addListener("dblclick", function(e) { - this.getCommands()["editexecutionspecs"].command - .execute(); - }, this); - */ - item.setUserData("batchEntrySpec", batchEntry); + + this.appendBatchEntrySpec(batchEntry, target.getIcon(), after); + }, + + appendBatchEntrySpec: function(batchEntrySpec, icon, after){ + + var item = new qx.ui.form.ListItem(batchEntrySpec.getLabel(), icon || "org.argeo.slc.ria/system.png"); + item.setUserData("batchEntrySpec", batchEntrySpec); item.setPaddingTop(1); item.setPaddingBottom(2); if (after) { @@ -404,11 +401,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", this.list.add(item); } this.list.select(item); - /* - if (this.getAutoOpen() && !skipAutoOpen) { - this.getCommands()["editexecutionspecs"].command.execute(); - } - */ + }, /** @@ -428,6 +421,10 @@ qx.Class.define("org.argeo.slc.ria.BatchView", } try{ var xmlMessage = slcExecMessage.toXml(); + if(!window.xmlExecStub){ + window.xmlExecStub = {}; + } + window.xmlExecStub[slcExecMessage.getUuid()] = qx.xml.Document.fromString(xmlMessage); var req = org.argeo.slc.ria.SlcApi.getNewSlcExecutionService( agentUuid, xmlMessage); req.send(); @@ -442,6 +439,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", if(clearBatch){ req.addListener("completed", function(e){ this.list.removeAll(); + this.setBatchAgentId(null); }, this); } }catch(e){