Mercurial > lada > lada-client
diff app/view/proben/List.js @ 249:81aca4dd5f0c
Simpliefied function to reconfigure the table.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 24 Jul 2013 14:52:51 +0200 |
parents | c8c53f162a22 |
children | 62e92e470a1e |
line wrap: on
line diff
--- a/app/view/proben/List.js Wed Jul 24 14:52:10 2013 +0200 +++ b/app/view/proben/List.js Wed Jul 24 14:52:51 2013 +0200 @@ -39,17 +39,11 @@ this.columns = []; this.callParent(arguments); }, - setupColumns: function(colnames) { - var cols = [] - for (var i=0; i < colnames.length; i++) { - col = colnames[i]; - for (var j = this.availableColumns.length - 1; j >= 0; j--){ - defaultCol = this.availableColumns[j]; - if (defaultCol.dataIndex === col) { - cols.push(this.availableColumns[j]) - }; - }; + setupColumns: function(cols) { + var rcols = [] + for (var i = cols.length - 1; i >= 0; i--){ + rcols.push(cols[i]); }; - this.reconfigure(this.store, cols); + this.reconfigure(this.store, rcols); } });