From cefdf53794689f654e189488fd349fd9c6a7064d Mon Sep 17 00:00:00 2001 From: Benjamin Renard <benjamin.renard@akka.eu> Date: Fri, 22 Jul 2016 16:34:55 +0200 Subject: [PATCH] Remove restriction about derived parameter position in the download grid + Fix a bug with parameter deletion --- js/app/views/DownloadUI.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/app/views/DownloadUI.js b/js/app/views/DownloadUI.js index 0948a1d..c803c29 100644 --- a/js/app/views/DownloadUI.js +++ b/js/app/views/DownloadUI.js @@ -105,7 +105,7 @@ Ext.define('amdaUI.DownloadUI', { } var r = Ext.create('amdaModel.DownloadParam', {paramid: paramId, type: type, dim1: dim1, dim2: dim2, template_args: {} }); - var pos = paramId.indexOf('ws_',0) == -1 ? 0 :this.paramGrid.store.getCount(); + var pos = this.paramGrid.store.getCount(); this.paramGrid.store.insert(pos,r); this.paramGrid.getView().refresh(); if (!isLeaf || needArgs) @@ -276,11 +276,12 @@ Ext.define('amdaUI.DownloadUI', { actionItem: function(grid, cell, cellIndex, record, row, recordIndex, e){ - this.paramGrid.getView().select(row); if (cellIndex == 3) grid.getStore().remove(record); - else if (cellIndex == 2) + else if (cellIndex == 2) { + this.paramGrid.getView().select(row); this.editParameterArgs(record); + } }, editParameterArgs: function(record) { -- libgit2 0.21.2