changeset 845:613ad3263e59

Load messgroessen with messmethode filter.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Jul 2015 09:33:25 +0200
parents 1449d58d6f58
children ffcf8898a261 8de4ec66d0e6
files app/view/grid/Messwert.js app/view/window/MessungEdit.js
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/grid/Messwert.js	Tue Jul 07 13:01:35 2015 +0200
+++ b/app/view/grid/Messwert.js	Wed Jul 08 09:33:25 2015 +0200
@@ -29,6 +29,7 @@
     recordId: null,
     readOnly: true,
     allowDeselect: true,
+    messgroesseStore: null,
 
     initComponent: function() {
         this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
@@ -49,8 +50,8 @@
                     return true;
                 }
             }
-         });
-
+        });
+        var me = this;
         this.plugins = [this.rowEditing];
 
         this.dockedItems = [{
@@ -81,7 +82,7 @@
             },
             editor: {
                 xtype: 'combobox',
-                store: Ext.data.StoreManager.get('messgroessen'),
+                store: me.messgroesseStore,
                 displayField: 'messgroesse',
                 valueField: 'id',
                 allowBlank: false,
--- a/app/view/window/MessungEdit.js	Tue Jul 07 13:01:35 2015 +0200
+++ b/app/view/window/MessungEdit.js	Wed Jul 08 09:33:25 2015 +0200
@@ -63,6 +63,10 @@
         this.width = 700;
         this.height = Ext.getBody().getViewSize().height - 30;
 
+        var mStore = Ext.data.StoreManager.get('messgroessen');
+        mStore.proxy.extraParams = {mmtId: this.record.get('mmtId')};
+        mStore.load();
+
         this.items = [{
             border: 0,
             autoScroll: true,
@@ -78,7 +82,8 @@
                 margin: 5,
                 items: [{
                     xtype: 'messwertgrid',
-                    recordId: this.record.get('id')
+                    recordId: this.record.get('id'),
+                    messgroesseStore: mStore
                 }]
             }, {
                 xtype: 'fset',

http://lada.wald.intevation.org