diff app/controller/Ort.js @ 1361:5c2d6812d85a

Merge behaviour of Stammdaten panel and ortszuordnungs grid according to the recent changes in Ortszuordnung and Ortserstellung.
author Maximilian Krambach <mkrambach@intevation.de>
date Tue, 07 Feb 2017 19:50:36 +0100
parents 053bd0cd9744
children 993e542796fd
line wrap: on
line diff
--- a/app/controller/Ort.js	Tue Feb 07 18:56:35 2017 +0100
+++ b/app/controller/Ort.js	Tue Feb 07 19:50:36 2017 +0100
@@ -55,16 +55,14 @@
     },
 
     addRecord: function(button) {
-        var record = Ext.create('Lada.model.Ort');
+        Ext.create('Lada.view.window.Ortserstellung',{
+            record: Ext.create('Lada.model.Ort', {ortTyp: 1}),
+            parentWindow: button.up('ortpanel')
+        }).show();
         var grid = button.up('ortpanel').down('ortstammdatengrid');
-        if (grid.getCollapsed()) {
-            grid.expand();
-        }
-        if (!record.get('letzteAenderung')) {
-            record.data.letzteAenderung = new Date();
-        }
-        grid.store.insert(0, record);
-        grid.rowEditing.startEdit(0, 1);
+        // if (grid.getCollapsed()) {
+        //    grid.expand();
+        // }
     },
 
     deleteItem: function(button) {

http://lada.wald.intevation.org