[Lada-commits] [PATCH 6 of 7] Load currently "selected" verwaltungseinheit when changing the selection

Wald Commits scm-commit at wald.intevation.org
Fri Nov 8 12:48:37 CET 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1383911184 -3600
# Node ID 608a1784a8acfe2300372ffed4d1e9ed89e20831
# Parent  651ee49ff3c23445c745c7b593d83d6e0b92cbe2
Load currently "selected" verwaltungseinheit when changing the selection.

diff -r 651ee49ff3c2 -r 608a1784a8ac app/view/orte/CreateForm.js
--- 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');


More information about the Lada-commits mailing list