comparison app/view/grid/Orte.js @ 1345:da98f0e7c288

Check for empty values in ort grid.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 06 Feb 2017 11:57:05 +0100
parents 35bbbfbe130c
children 993e542796fd
comparison
equal deleted inserted replaced
1344:195c5d9b234b 1345:da98f0e7c288
146 width: 120, 146 width: 120,
147 filter: { 147 filter: {
148 type: 'string' 148 type: 'string'
149 }, 149 },
150 renderer: function(value) { 150 renderer: function(value) {
151 if (!value) { 151 if (value === undefined ||
152 value === null ||
153 value === ''
154 ) {
152 return ''; 155 return '';
153 } 156 }
154 var store = Ext.data.StoreManager.get('verwaltungseinheiten'); 157 var store = Ext.data.StoreManager.get('verwaltungseinheiten');
155 var record = store.getById(value); 158 var record = store.getById(value);
156 return record.get('bezeichnung'); 159 return record.get('bezeichnung');
168 width: 70, 171 width: 70,
169 filter: { 172 filter: {
170 type: 'string' 173 type: 'string'
171 }, 174 },
172 renderer: function(value) { 175 renderer: function(value) {
173 if (value === undefined || value === '') { 176 if (value === undefined ||
177 value === null ||
178 value === ''
179 ) {
174 return ''; 180 return '';
175 } 181 }
176 var staaten = Ext.data.StoreManager.get('staaten'); 182 var staaten = Ext.data.StoreManager.get('staaten');
177 var record = staaten.getById(value); 183 var record = staaten.getById(value);
178 return record.get('staatIso'); 184 return record.get('staatIso');
194 store: Ext.data.StoreManager.get('koordinatenart'), 200 store: Ext.data.StoreManager.get('koordinatenart'),
195 displayField: 'koordinatenart', 201 displayField: 'koordinatenart',
196 valueField: 'id' 202 valueField: 'id'
197 }, 203 },
198 renderer: function(value) { 204 renderer: function(value) {
199 if (value === undefined || value === '') { 205 if (value === undefined ||
206 value === null ||
207 value === ''
208 ) {
200 return ''; 209 return '';
201 } 210 }
202 var kda = Ext.data.StoreManager.get('koordinatenart'); 211 var kda = Ext.data.StoreManager.get('koordinatenart');
203 var record = kda.getById(value); 212 var record = kda.getById(value);
204 return record.get('koordinatenart'); 213 return record.get('koordinatenart');

http://lada.wald.intevation.org