[Lada-commits] [PATCH 1 of 3] always modify the netzbetreiber when the Messstelle was changed

Wald Commits scm-commit at wald.intevation.org
Wed Jul 8 10:06:46 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1436271240 -7200
# Node ID af9d506b0700e8523a235c8d5fcbf24e82ac373a
# Parent  1449d58d6f58bff63bf1e89416b7f7b344f9f4fa
always modify the netzbetreiber when the Messstelle was changed

diff -r 1449d58d6f58 -r af9d506b0700 app/controller/form/Messprogramm.js
--- a/app/controller/form/Messprogramm.js	Tue Jul 07 13:01:35 2015 +0200
+++ b/app/controller/form/Messprogramm.js	Tue Jul 07 14:14:00 2015 +0200
@@ -81,16 +81,13 @@
     /**
      * When a Messtelle is selected, modify the Netzbetreiber
      * according to the Messstelle
-     * TODO: The conditions when to apply this automatism are still
-     *   unclear. Right now it is only applied when the NB is not set.
      */
     setNetzbetreiber: function(combo, records){
         var netzbetreiber = combo.up().up('form')
                 .down('netzbetreiber').down('combobox');
         var nbId = records[0].get('netzbetreiberId');
 
-        if (nbId != null &&
-               (netzbetreiber.value === '' || netzbetreiber.value === null)) {
+        if (nbId != null) {
             //select the NB in the NB-Combobox
             netzbetreiber.select(nbId);
         }
diff -r 1449d58d6f58 -r af9d506b0700 app/controller/form/Probe.js
--- a/app/controller/form/Probe.js	Tue Jul 07 13:01:35 2015 +0200
+++ b/app/controller/form/Probe.js	Tue Jul 07 14:14:00 2015 +0200
@@ -61,16 +61,13 @@
     /**
      * When a Messtelle is selected, modify the Netzbetreiber
      * according to the Messstelle
-     * TODO: The conditions when to apply this automatism are still
-     *   unclear. Right now it is only applied when the NB is not set.
      */
     setNetzbetreiber: function(combo, records){
         var netzbetreiber = combo.up().up('form')
                 .down('netzbetreiber').down('combobox');
         var nbId = records[0].get('netzbetreiberId');
 
-        if (nbId != null &&
-               (netzbetreiber.value === '' || netzbetreiber.value === null)) {
+        if (nbId != null) {
             //select the NB in the NB-Combobox
             netzbetreiber.select(nbId);
         }


More information about the Lada-commits mailing list