Mercurial > lada > lada-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
248:d40a552382a3 | 249:81aca4dd5f0c |
---|---|
37 } | 37 } |
38 ]; | 38 ]; |
39 this.columns = []; | 39 this.columns = []; |
40 this.callParent(arguments); | 40 this.callParent(arguments); |
41 }, | 41 }, |
42 setupColumns: function(colnames) { | 42 setupColumns: function(cols) { |
43 var cols = [] | 43 var rcols = [] |
44 for (var i=0; i < colnames.length; i++) { | 44 for (var i = cols.length - 1; i >= 0; i--){ |
45 col = colnames[i]; | 45 rcols.push(cols[i]); |
46 for (var j = this.availableColumns.length - 1; j >= 0; j--){ | |
47 defaultCol = this.availableColumns[j]; | |
48 if (defaultCol.dataIndex === col) { | |
49 cols.push(this.availableColumns[j]) | |
50 }; | |
51 }; | |
52 }; | 46 }; |
53 this.reconfigure(this.store, cols); | 47 this.reconfigure(this.store, rcols); |
54 } | 48 } |
55 }); | 49 }); |