# HG changeset patch # User Torsten Irländer # Date 1374670371 -7200 # Node ID 81aca4dd5f0cd3850cde8d2e9a76febd4b27d519 # Parent d40a552382a3a840f26cd910207f95b0ce1aa5ad Simpliefied function to reconfigure the table. diff -r d40a552382a3 -r 81aca4dd5f0c app/view/proben/List.js --- 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); } });