viewsManager.registerViewPane(selectorPane);\r
\r
var batchPane = new org.argeo.ria.components.ViewPane("batch", "Batch");\r
- batchPane.set({width: 600, height:300});\r
+ batchPane.set({width: 500, height:500});\r
viewsManager.registerViewPane(batchPane);\r
\r
var logPane = new org.argeo.ria.components.ViewPane("main", "Executions Log");\r
viewsManager.getViewPaneById("main").empty();\r
viewsManager.getViewPaneById("batch").empty();\r
viewsManager.getViewPaneById("selector").empty();\r
+ viewsManager.getViewPaneById("editor").empty();\r
viewsManager.getViewPanesContainer().remove(this._splitPane); \r
} \r
\r
this.setEnabled(true);\r
},\r
command : null\r
- } \r
+ },\r
+ "clearbatch" : {\r
+ label : "Clear batch",\r
+ icon : "resource/slc/user-trash-full.png",\r
+ shortcut : null,\r
+ enabled : true,\r
+ menu : "Launcher",\r
+ toolbar : "batch",\r
+ callback : function(e) {\r
+ if(!this.list.hasChildren()) return;\r
+ this.list.selectAll();\r
+ this.getCommands()["removefrombatch"].command.execute();\r
+ },\r
+ selectionChange : function(viewId, selection) {\r
+ },\r
+ command : null\r
+ } \r
}\r
},\r
view : {\r
}\r
}, this);\r
\r
+ this.dropDecorator = new qx.ui.decoration.Background(); \r
+ this.dropDecorator.set({\r
+ backgroundImage : "resource/slc/drophere.gif",\r
+ backgroundRepeat : "no-repeat"\r
+ });\r
+\r
+ \r
listChangeListener = function() {\r
var command = org.argeo.ria.event.CommandsManager.getInstance()\r
.getCommandById("submitform");\r
command.setEnabled(this.list.hasChildren());\r
+ var command2 = org.argeo.ria.event.CommandsManager.getInstance()\r
+ .getCommandById("clearbatch");\r
+ command2.setEnabled(this.list.hasChildren());\r
+ this.list.setDecorator((this.list.hasChildren()?null:this.dropDecorator));\r
};\r
this.list.addListener("addItem", listChangeListener, this);\r
this.list.addListener("removeItem", listChangeListener, this);\r
-\r
- \r
+ \r
+ this.list.setDecorator(this.dropDecorator);\r
+ \r
this.add(this.listPane);\r
}, \r
\r
selectionChange : function(viewId, selection) {\r
if (viewId != "batch:list")\r
return;\r
+ var view = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();\r
if ((selection && selection.length == 1)) {\r
- var view = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent();\r
view.setBatchEntrySpec(selection[0].getUserData("batchEntrySpec"));\r
+ }else{\r
+ view.setBatchEntrySpec(null);\r
}\r
},\r
command : null \r
this.setView(viewPane); \r
this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId()));\r
\r
- this.addListener("changeBatchEntrySpec", this.updateData, this); \r
+ this.addListener("changeBatchEntrySpec", this.updateData, this);\r
+ this._emptyTitleString = "Script Parameters (select a script to edit)";\r
+ this._editorTitleString = "Script '%1' Parameters";\r
},\r
/**\r
* The implementation should contain the real data loading (i.o. query...)\r
*/\r
load : function(){\r
this._createLayout();\r
- this.getView().setViewTitle("Specs Editor");\r
+ this.getView().setViewTitle(this._emptyTitleString);\r
},\r
\r
/**\r
var batchEntry = event.getData();\r
if(batchEntry == null){\r
this.tableModel.setData([]);\r
+ this.getView().setViewTitle(this._emptyTitleString);\r
return;\r
}\r
+ this.getView().setViewTitle(qx.lang.String.format(this._editorTitleString, [batchEntry.getFlow().getName()]));\r
var values = batchEntry.getValues();\r
var data = [];\r
for(var key in values){\r
var factory = new org.argeo.slc.ria.execution.CellEditorFactory();\r
columnModel.setCellEditorFactory(1, factory);\r
columnModel.setDataCellRenderer(1, factory);\r
- columnModel.getBehavior().setWidth(0, "70%");\r
+ columnModel.getBehavior().setWidth(0, "40%");\r
this.add(this.table, {edge:"center"});\r
}, \r
\r