[Lada-commits] [PATCH] changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform

Wald Commits scm-commit at wald.intevation.org
Wed Mar 15 09:56:51 CET 2017


# HG changeset patch
# User Evi Huber <ehuber at bfs.de>
# Date 1489568204 -3600
# Branch release-2.5
# Node ID 418b9afee700cc750f539386152532ae31bd39b4
# Parent  634cce8b4c098dae88bb3cea04f137ada55ebf53
changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform

diff -r 634cce8b4c09 -r 418b9afee700 app/store/MessprogrammKategorie.js
--- a/app/store/MessprogrammKategorie.js	Mon Feb 27 11:56:41 2017 +0100
+++ b/app/store/MessprogrammKategorie.js	Wed Mar 15 09:56:44 2017 +0100
@@ -11,5 +11,6 @@
  */
 Ext.define('Lada.store.MessprogrammKategorie', {
     extend: 'Ext.data.Store',
-    model: 'Lada.model.MessprogrammKategorie'
+    model: 'Lada.model.MessprogrammKategorie',
+    pageSize: 50
 });
diff -r 634cce8b4c09 -r 418b9afee700 app/view/form/Messprogramm.js
--- a/app/view/form/Messprogramm.js	Mon Feb 27 11:56:41 2017 +0100
+++ b/app/view/form/Messprogramm.js	Wed Mar 15 09:56:44 2017 +0100
@@ -103,6 +103,7 @@
                                             var labor = newValue[0].get('laborMst');
                                             combo.up('fieldset').down('messstelle[name=mstId]').setValue(mst);
                                             combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor);
+                                            combo.up('fieldset').down('messprogrammland[name=mplId]').setValue();
                                         }
                                     }
                                 }
@@ -134,6 +135,7 @@
                                 }
                             }, {
                                 xtype: 'netzbetreiber',
+                                name: 'netzbetreiber',
                                 editable: false,
                                 readOnly: true,
                                 isFormField: false,
@@ -374,7 +376,15 @@
                     margin: '0, 5, 5, 5',
                     //width: '100%',
                     anchor: '100%',
-                    labelWidth: 115
+                    labelWidth: 115,
+                    listeners: {
+                        expand : {
+                            fn: function(combo) {
+                                Ext.StoreManager.get('messprogrammkategorie').clearFilter();
+                                Ext.StoreManager.get('messprogrammkategorie').filter('netzbetreiberId', combo.up('fieldset').down('netzbetreiber[name=netzbetreiber]').getValue());
+                            }
+                        }
+                    }
                 }, {
                     xtype: 'textarea',
                     name: 'probeKommentar',
diff -r 634cce8b4c09 -r 418b9afee700 app/view/form/Probe.js
--- a/app/view/form/Probe.js	Mon Feb 27 11:56:41 2017 +0100
+++ b/app/view/form/Probe.js	Wed Mar 15 09:56:44 2017 +0100
@@ -106,6 +106,7 @@
                                             var labor = newValue[0].get('laborMst');
                                             combo.up('fieldset').down('messstelle[name=mstId]').setValue(mst);
                                             combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor);
+                                            combo.up('fieldset').down('messprogrammland[name=mplId]').setValue();
                                         }
                                     }
                                 }
@@ -131,6 +132,7 @@
                                 hidden: true
                             }, {
                                 xtype: 'netzbetreiber',
+                                name: 'netzbetreiber',
                                 editable: false,
                                 readOnly: true,
                                 isFormField: false,
@@ -221,7 +223,15 @@
                             margin: '0, 5, 5, 5',
                             width: '100%',
                             anchor: '100%',
-                            labelWidth: 110
+                            labelWidth: 110,
+                            listeners: {
+                                expand : {
+                                    fn: function(combo) {
+                                       Ext.StoreManager.get('messprogrammkategorie').clearFilter();
+                                       Ext.StoreManager.get('messprogrammkategorie').filter('netzbetreiberId', combo.up('fieldset').down('netzbetreiber[name=netzbetreiber]').getValue());
+                                    }
+                                }
+                            }
                         }]
                 }, {
                     // Zeit
diff -r 634cce8b4c09 -r 418b9afee700 app/view/widget/MessprogrammLand.js
--- a/app/view/widget/MessprogrammLand.js	Mon Feb 27 11:56:41 2017 +0100
+++ b/app/view/widget/MessprogrammLand.js	Wed Mar 15 09:56:44 2017 +0100
@@ -36,6 +36,8 @@
         this.store = Ext.data.StoreManager.get('messprogrammkategorie');
         if (!this.store) {
             this.store = Ext.create('Lada.store.MessprogrammKategorie');
+        } else {
+            this.store.clearFilter();
         }
         this.store.sort();
         this.callParent(arguments);


More information about the Lada-commits mailing list