Mercurial > lada > lada-client
changeset 429:608a1784a8ac
Load currently "selected" verwaltungseinheit when changing the selection.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 08 Nov 2013 12:46:24 +0100 |
parents | 651ee49ff3c2 |
children | 4206cb30138c |
files | app/view/orte/CreateForm.js |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/orte/CreateForm.js Fri Nov 08 12:36:29 2013 +0100 +++ b/app/view/orte/CreateForm.js Fri Nov 08 12:46:24 2013 +0100 @@ -23,6 +23,16 @@ var ort = orte.getById(newv); var fields = ['beschreibung', 'bezeichnung', 'hoeheLand', 'latitude', 'longitude', 'staatId', 'gemId']; + + // Load currently "selected" verwaltungseinheit. This + // is needed as without having this record the field + // would only display the raw value (id) of the + // verwaltungseinheit. + var verw = Ext.getStore('Verwaltungseinheiten'); + verw.load({ + id: ort.get('gemId') + }); + var form = this.getForm(); if ( ort != undefined ) { console.log('Found ort');