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%2FSpecsEditorView.js;h=e1009bcf73206d72c91d0d3870fce7b85c6a7f54;hb=02e323ce2bac40ffb9d067788c61a3e41300a9fb;hp=4837ceb456b477f7ce85cce11e340ae3ec0beae6;hpb=d8f7abb3102580b01ffbeecc201f7bdfbd082150;p=gpl%2Fargeo-slc.git diff --git a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SpecsEditorView.js b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SpecsEditorView.js index 4837ceb45..e1009bcf7 100644 --- a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SpecsEditorView.js +++ b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SpecsEditorView.js @@ -16,7 +16,7 @@ qx.Class.define("org.argeo.slc.ria.SpecsEditorView", init : { "updateData" : { label : "Edit Execution Specs", - icon : "resource/slc/document-open.png", + icon : "org.argeo.slc.riadocument-open.png", shortcut : null, enabled : false, menu : null, @@ -25,9 +25,11 @@ qx.Class.define("org.argeo.slc.ria.SpecsEditorView", selectionChange : function(viewId, selection) { if (viewId != "batch:list") return; + var view = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent(); if ((selection && selection.length == 1)) { - var view = org.argeo.ria.components.ViewsManager.getInstance().getViewPaneById("editor").getContent(); view.setBatchEntrySpec(selection[0].getUserData("batchEntrySpec")); + }else{ + view.setBatchEntrySpec(null); } }, command : null @@ -69,7 +71,9 @@ qx.Class.define("org.argeo.slc.ria.SpecsEditorView", this.setView(viewPane); this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId())); - this.addListener("changeBatchEntrySpec", this.updateData, this); + this.addListener("changeBatchEntrySpec", this.updateData, this); + this._emptyTitleString = "Script Parameters (select a script to edit)"; + this._editorTitleString = "Script '%1' Parameters"; }, /** * The implementation should contain the real data loading (i.o. query...) @@ -77,7 +81,7 @@ qx.Class.define("org.argeo.slc.ria.SpecsEditorView", */ load : function(){ this._createLayout(); - this.getView().setViewTitle("Specs Editor"); + this.getView().setViewTitle(this._emptyTitleString); }, /** @@ -88,8 +92,10 @@ qx.Class.define("org.argeo.slc.ria.SpecsEditorView", var batchEntry = event.getData(); if(batchEntry == null){ this.tableModel.setData([]); + this.getView().setViewTitle(this._emptyTitleString); return; } + this.getView().setViewTitle(qx.lang.String.format(this._editorTitleString, [batchEntry.getFlow().getName()])); var values = batchEntry.getValues(); var data = []; for(var key in values){ @@ -140,7 +146,7 @@ qx.Class.define("org.argeo.slc.ria.SpecsEditorView", var factory = new org.argeo.slc.ria.execution.CellEditorFactory(); columnModel.setCellEditorFactory(1, factory); columnModel.setDataCellRenderer(1, factory); - columnModel.getBehavior().setWidth(0, "70%"); + columnModel.getBehavior().setWidth(0, "40%"); this.add(this.table, {edge:"center"}); },