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=d3dc3f8cba4a6cad0534cbe16a567f7511be6702;hb=6e162ed05016679a19bf4da38b835d15684cb232;hp=5f68b2cf6eeca1f9a525e554eb999193d8d288dd;hpb=d4d0578c8c9dd7428cd04b2164bb1338cf0e04cd;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 5f68b2cf6..d3dc3f8cb 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 @@ -30,7 +30,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", init : { "submitform" : { label : "Execute Batch", - icon : "org.argeo.slc.ria/media-playback-start.png", + icon : "org/argeo/slc/ria/media-playback-start.png", shortcut : null, enabled : false, menu : "Launcher", @@ -42,72 +42,19 @@ qx.Class.define("org.argeo.slc.ria.BatchView", } var prefName = "slc.batch.autoclear"; var prefValue = this.getRiaPreferenceValue(prefName); - if(prefValue !== null && prefValue === true){ + if(( prefValue !== null && prefValue === true ) || this.getForceClearPreference()){ this.executeBatchOnAgent(batchAgentId, true); }else{ this.executeBatchOnAgent(batchAgentId, false); } + this.setForceClearPreference(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){ - this.executeBatchOnAgent(batchAgentId, false); - }, this); - modal.addListener("ok", function(e){ - this.executeBatchOnAgent(batchAgentId, true); - }, this); - modal.attachAndShow(); - }, - command : null - }, - /* - "toggleopenonadd" : { - label : "Auto edit on Add", - icon : "org.argeo.slc.ria/document-open.png", - shortcut : null, - enabled : true, - toggle : true, - toggleInitialState : true, - menu : "Launcher", - toolbar : "launcher", - callback : function(event) { - var state = event.getTarget().getUserData("slc.command.toggleState"); - this.setAutoOpen(state); }, command : null }, - "editexecutionspecs" : { - label : "Edit Execution Specs", - icon : "org.argeo.slc.ria/document-open.png", - shortcut : null, - enabled : false, - menu : "Launcher", - toolbar : "batch", - callback : function(e) { - var sel = this.list.getSortedSelection(); - var spec = sel[0].getUserData("batchEntrySpec"); - if (spec.hasEditableValues()) { - var specEditor = new org.argeo.slc.ria.execution.SpecEditor(spec); - specEditor.attachAndShow(); - } - }, - selectionChange : function(viewId, selection) { - if (viewId != "batch:list") - return; - this.setEnabled(false); - if ((selection && selection.length == 1)) { - var selectedItemSpec = selection[0].getUserData("batchEntrySpec"); - if (selectedItemSpec.hasEditableValues()) { - this.setEnabled(true); - } - } - }, - command : null - }, - */ "removefrombatch" : { label : "Remove from batch", - icon : "org.argeo.slc.ria/edit-delete.png", + icon : "org/argeo/slc/ria/edit-delete.png", shortcut : null, enabled : false, menu : "Launcher", @@ -146,7 +93,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", }, "clearbatch" : { label : "Clear batch", - icon : "org.argeo.slc.ria/user-trash-full.png", + icon : "org/argeo/slc/ria/user-trash-full.png", shortcut : null, enabled : true, menu : "Launcher", @@ -184,7 +131,11 @@ qx.Class.define("org.argeo.slc.ria.BatchView", nullable : true, check : "String", event : "changeBatchAgentId" - } + }, + forceClearPreference : { + init : false, + check : "Boolean" + } }, construct : function(){ @@ -308,7 +259,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", this.dropDecorator = new qx.ui.decoration.Background(); this.dropDecorator.set({ - backgroundImage : "org.argeo.slc.ria/drophere.gif", + backgroundImage : "org/argeo/slc/ria/drophere.gif", backgroundRepeat : "no-repeat" }); @@ -390,7 +341,7 @@ qx.Class.define("org.argeo.slc.ria.BatchView", appendBatchEntrySpec: function(batchEntrySpec, icon, after){ - var item = new qx.ui.form.ListItem(batchEntrySpec.getLabel(), icon || "org.argeo.slc.ria/system.png"); + 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);