changeset 1366:993e542796fd

Fixed type error in ortszuordnung when user has 'funktion = 4'
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Feb 2017 15:36:55 +0100
parents e98ec562764f
children d2a0cb1e5596
files app/controller/Ort.js app/view/grid/Orte.js
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Ort.js	Wed Feb 08 15:05:32 2017 +0100
+++ b/app/controller/Ort.js	Wed Feb 08 15:36:55 2017 +0100
@@ -179,6 +179,9 @@
             return;
         }
         var grid = Ext.ComponentQuery.query('ortstammdatengrid')[0];
+        if (!grid.up('ortpanel')) {
+            return;
+        }
         if (!record ||
             !Ext.Array.contains(Lada.netzbetreiber,
             record.get('netzbetreiberId'))) {
--- a/app/view/grid/Orte.js	Wed Feb 08 15:05:32 2017 +0100
+++ b/app/view/grid/Orte.js	Wed Feb 08 15:36:55 2017 +0100
@@ -427,6 +427,10 @@
 
         if (Ext.Array.contains(Lada.funktionen, 4)) {
             var panel = this.up('ortpanel');
+            // We are not in stammdaten editor.
+            if (!panel) {
+                return;
+            }
             panel.down('button[action=add]').enable();
             panel.down('button[action=addMap]').enable();
         }

http://lada.wald.intevation.org