Mercurial > lada > lada-client
comparison app/view/proben/List.js @ 242:c8c53f162a22
Iteratre the available cols in reverse order (begining from 0) to maintain the
configured order of fields.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 23 Jul 2013 11:43:16 +0200 |
parents | f57b496b4caa |
children | 81aca4dd5f0c |
comparison
equal
deleted
inserted
replaced
241:4ca858026191 | 242:c8c53f162a22 |
---|---|
39 this.columns = []; | 39 this.columns = []; |
40 this.callParent(arguments); | 40 this.callParent(arguments); |
41 }, | 41 }, |
42 setupColumns: function(colnames) { | 42 setupColumns: function(colnames) { |
43 var cols = [] | 43 var cols = [] |
44 for (var i = colnames.length - 1; i >= 0; i--){ | 44 for (var i=0; i < colnames.length; i++) { |
45 col = colnames[i]; | 45 col = colnames[i]; |
46 for (var j = this.availableColumns.length - 1; j >= 0; j--){ | 46 for (var j = this.availableColumns.length - 1; j >= 0; j--){ |
47 defaultCol = this.availableColumns[j]; | 47 defaultCol = this.availableColumns[j]; |
48 if (defaultCol.dataIndex === col) { | 48 if (defaultCol.dataIndex === col) { |
49 cols.push(this.availableColumns[j]) | 49 cols.push(this.availableColumns[j]) |