# HG changeset patch # User Torsten Irländer # Date 1374571803 -7200 # Node ID f57b496b4caa205c1493ee2781129690d84ae4c8 # Parent 2a23fcca8ead2649b1a919090266d3936cbb307c Added function to dynamically add columns to the probenlist. diff -r 2a23fcca8ead -r f57b496b4caa app/view/proben/List.js --- a/app/view/proben/List.js Tue Jul 23 11:29:37 2013 +0200 +++ b/app/view/proben/List.js Tue Jul 23 11:30:03 2013 +0200 @@ -38,5 +38,18 @@ ]; this.columns = []; this.callParent(arguments); + }, + setupColumns: function(colnames) { + var cols = [] + for (var i = colnames.length - 1; i >= 0; 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]) + }; + }; + }; + this.reconfigure(this.store, cols); } });