changeset 1132:c213c3dc51d2

Expand ort grid on add ort button clicked.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 25 May 2016 14:36:16 +0200
parents 6549abef70e1
children df6d1a2cdd4a
files app/controller/Ort.js
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Ort.js	Wed May 25 14:05:11 2016 +0200
+++ b/app/controller/Ort.js	Wed May 25 14:36:16 2016 +0200
@@ -33,6 +33,9 @@
 
     featureadded: function(record) {
         var grid = Ext.ComponentQuery.query('ortpanel ortstammdatengrid')[0];
+        if (grid.getCollapsed()) {
+            grid.expand();
+        }
         if (!record.get('letzteAenderung')) {
             record.data.letzteAenderung = new Date();
         }
@@ -47,9 +50,11 @@
     },
 
     addRecord: function(button) {
-        console.log('add record');
         var record = Ext.create('Lada.model.Ort');
         var grid = button.up('ortpanel').down('ortstammdatengrid');
+        if (grid.getCollapsed()) {
+            grid.expand();
+        }
         if (!record.get('letzteAenderung')) {
             record.data.letzteAenderung = new Date();
         }

http://lada.wald.intevation.org