comparison app/view/widget/DynamicGrid.js @ 1077:2a5d42045c63

Display Messungen query mode and use the new messung list grid.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 08 Apr 2016 19:33:46 +0200
parents 981339d774b8
children dbd435256f77
comparison
equal deleted inserted replaced
1076:e32c10cf5499 1077:2a5d42045c63
68 * generateColumnsAndFields 68 * generateColumnsAndFields
69 * generates an array of columns which are used for the dynamic grid 69 * generates an array of columns which are used for the dynamic grid
70 * @return an array of two arrays: [0] is an array of colums [1] an array 70 * @return an array of two arrays: [0] is an array of colums [1] an array
71 * of fields 71 * of fields
72 **/ 72 **/
73 generateColumnsAndFields: function(cols) { 73 generateColumnsAndFields: function(cols) {
74 var resultColumns = []; 74 var resultColumns = [];
75 var fields = []; 75 var fields = [];
76 76
77 fields.push(new Ext.data.Field({ 77 fields.push(new Ext.data.Field({
78 name: 'owner' 78 name: 'owner'
101 grid.fireEvent('itemdblclick', grid, rec); 101 grid.fireEvent('itemdblclick', grid, rec);
102 } 102 }
103 }); 103 });
104 104
105 for (var i = cols.length - 1; i >= 0; i--) { 105 for (var i = cols.length - 1; i >= 0; i--) {
106 if (cols[i] === 'id') { 106 fields.push(new Ext.data.Field({
107 name: cols[i].dataIndex
108 }));
109 if (cols[i] === 'id' || cols[i].dataIndex === 'probeId') {
107 continue; 110 continue;
108 } 111 }
109 resultColumns.push(cols[i]); 112 resultColumns.push(cols[i]);
110 fields.push(new Ext.data.Field({
111 name: cols[i].dataIndex
112 }));
113 } 113 }
114 var caf = new Array(); 114 var caf = new Array();
115 caf[0] = resultColumns; 115 caf[0] = resultColumns;
116 caf[1] = fields; 116 caf[1] = fields;
117 return caf; 117 return caf;

http://lada.wald.intevation.org