comparison app/view/orte/CreateForm.js @ 432:f4185f2d1a7c

Only load verwaltungseinheit if there is a selected ort.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 08 Nov 2013 12:54:48 +0100
parents 4206cb30138c
children 12231f31c112
comparison
equal deleted inserted replaced
431:2375e7247523 432:f4185f2d1a7c
26 // Load currently "selected" verwaltungseinheit. This 26 // Load currently "selected" verwaltungseinheit. This
27 // is needed as without having this record the field 27 // is needed as without having this record the field
28 // would only display the raw value (id) of the 28 // would only display the raw value (id) of the
29 // verwaltungseinheit. 29 // verwaltungseinheit.
30 var verw = Ext.getStore('Verwaltungseinheiten'); 30 var verw = Ext.getStore('Verwaltungseinheiten');
31 verw.load({ 31 if (ort) {
32 id: ort.get('gemId') 32 verw.load({
33 }); 33 id: ort.get('gemId')
34 });
35 }
34 36
35 var form = this.getForm(); 37 var form = this.getForm();
36 if ( ort != undefined ) { 38 if ( ort != undefined ) {
37 for (var i = fields.length - 1; i >= 0; i--){ 39 for (var i = fields.length - 1; i >= 0; i--){
38 ffield = form.findField("ort_"+fields[i]); 40 ffield = form.findField("ort_"+fields[i]);

http://lada.wald.intevation.org