changeset 851:c89d6de27fd3

merged.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Jul 2015 12:42:19 +0200
parents 43f3a53d07d3 (current diff) ffcf8898a261 (diff)
children 405810eda690
files
diffstat 6 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/form/Messprogramm.js	Wed Jul 08 12:41:55 2015 +0200
+++ b/app/controller/form/Messprogramm.js	Wed Jul 08 12:42:19 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);
         }
--- a/app/controller/form/Probe.js	Wed Jul 08 12:41:55 2015 +0200
+++ b/app/controller/form/Probe.js	Wed Jul 08 12:42:19 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);
         }
--- a/app/view/form/Messprogramm.js	Wed Jul 08 12:41:55 2015 +0200
+++ b/app/view/form/Messprogramm.js	Wed Jul 08 12:42:19 2015 +0200
@@ -177,6 +177,7 @@
                                 xtype: 'netzbetreiber',
                                 name: 'netzbetreiberId',
                                 editable: false,
+                                readOnly: true,
                                 fieldLabel: i18n.getMsg('netzbetreiberId'),
                                 anchor: '100%',
                                 labelWidth: 105,
--- a/app/view/form/Probe.js	Wed Jul 08 12:41:55 2015 +0200
+++ b/app/view/form/Probe.js	Wed Jul 08 12:42:19 2015 +0200
@@ -145,6 +145,7 @@
                                 xtype: 'netzbetreiber',
                                 name: 'netzbetreiberId',
                                 editable: false,
+                                readOnly: true,
                                 fieldLabel: 'Netzbetreiber',
                                 anchor: '100%',
                                 labelWidth: 105,
@@ -397,7 +398,7 @@
         this.down('cbox[name=baId]').setReadOnly(value);
         this.down('cbox[name=test]').setReadOnly(value);
         this.down('cbox[name=probenartId]').setReadOnly(value);
-        this.down('cbox[name=netzbetreiberId]').setReadOnly(value);
+        //this.down('cbox[name=netzbetreiberId]').setReadOnly(value);
         this.down('tfield[name=x11]').setReadOnly(value);
         this.down('textfield[name=media]').setReadOnly(value);
         this.down('tfield[name=mediaDesk]').setReadOnly(value);
--- a/app/view/widget/Netzbetreiber.js	Wed Jul 08 12:41:55 2015 +0200
+++ b/app/view/widget/Netzbetreiber.js	Wed Jul 08 12:42:19 2015 +0200
@@ -15,6 +15,7 @@
     store: 'StaNetzbetreiber',
     displayField: 'netzbetreiber',
     valueField: 'id',
+    readOnly: this.readOnly,
     // Enable filtering of comboboxes
     queryMode: 'local',
     triggerAction: 'all',
--- a/app/view/widget/base/ComboBox.js	Wed Jul 08 12:41:55 2015 +0200
+++ b/app/view/widget/base/ComboBox.js	Wed Jul 08 12:42:19 2015 +0200
@@ -37,6 +37,7 @@
             maxChars: this.maxChars,
             multiSelect: this.multiSelect,
             editable: this.editable || true,
+            readOnly: this.readOnly,
             forceSelection: this.forceSelection || false,
             msgTarget: 'none',
             tpl: this.tpl,

http://lada.wald.intevation.org