X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=inline;f=server%2Forg.argeo.slc.ria%2Fsrc%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2FBatchView.js;h=5f68b2cf6eeca1f9a525e554eb999193d8d288dd;hb=d4d0578c8c9dd7428cd04b2164bb1338cf0e04cd;hp=a2a8ff9c8832427fea81b0ce43c548fc8cad9918;hpb=f59509dd7a5d4aed1a1b4f8fae72883b3911b16b;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 a2a8ff9c8..5f68b2cf6 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 @@ -42,10 +42,12 @@ qx.Class.define("org.argeo.slc.ria.BatchView", } var prefName = "slc.batch.autoclear"; var prefValue = this.getRiaPreferenceValue(prefName); - if(prefValue !== null){ - this.executeBatchOnAgent(batchAgentId, prefValue); - return; + if(prefValue !== null && prefValue === true){ + this.executeBatchOnAgent(batchAgentId, true); + }else{ + this.executeBatchOnAgent(batchAgentId, false); } + return; var modal = new org.argeo.ria.components.Modal("Clear?", null); modal.addYesNoReminder("Do you want to clear the batch automatically after execution?", prefName); modal.addListener("cancel", function(e){ @@ -400,7 +402,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", } else { this.list.add(item); } - this.list.select(item); + this.list.setSelection([item]); }, @@ -414,7 +416,11 @@ qx.Class.define("org.argeo.slc.ria.BatchView", var selection = this.list.getChildren(); if (!selection.length) return; + // Get Host + var agentsMap = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("selector").getContent().getAgentsMap(); + var host = agentsMap[agentUuid]; var slcExecMessage = new org.argeo.slc.ria.execution.Message(); + slcExecMessage.setHost(host); for (var i = 0; i < selection.length; i++) { var batchEntrySpec = selection[i].getUserData("batchEntrySpec"); slcExecMessage.addBatchEntrySpec(batchEntrySpec);