Mercurial > lada > lada-client
comparison app/view/orte/CreateOrt.js @ 450:e228fecd1577
Set lon/lat coordinates when selecting a verwaltungseinheit.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 05 Dec 2013 17:18:45 +0100 |
parents | b3e806045a5a |
children | debfcc7713e3 |
comparison
equal
deleted
inserted
replaced
449:c22b24926500 | 450:e228fecd1577 |
---|---|
26 fieldLabel: 'Staat' | 26 fieldLabel: 'Staat' |
27 }, | 27 }, |
28 { | 28 { |
29 xtype: 'verwaltungseinheiten', | 29 xtype: 'verwaltungseinheiten', |
30 name: 'ort_gemId', | 30 name: 'ort_gemId', |
31 fieldLabel: 'Gemeinde' | 31 fieldLabel: 'Gemeinde', |
32 listeners: { | |
33 'select': { | |
34 scope: me, | |
35 fn: function(field, newValue, oldValue) { | |
36 var lon = field.up('window').down( | |
37 'numberfield[name=ort_longitude]'); | |
38 var lat = field.up('window').down( | |
39 'numberfield[name=ort_latitude]'); | |
40 lon.setValue(newValue[0].data.longitude); | |
41 lat.setValue(newValue[0].data.latitude); | |
42 } | |
43 } | |
44 } | |
32 }, | 45 }, |
33 { | 46 { |
34 xtype: 'numberfield', | 47 xtype: 'numberfield', |
35 name: 'ort_latitude', | 48 name: 'ort_latitude', |
36 fieldLabel: 'Lat' | 49 fieldLabel: 'Lat' |