diff app/controller/grid/Messmethode.js @ 972:24b5684d74d7

Set letzteAenderung in a Bunch of controllers.
author Dustin Demuth <dustin@intevation.de>
date Tue, 17 Nov 2015 14:58:17 +0100
parents d2ee6858f452
children 01f083db45b7
line wrap: on
line diff
--- a/app/controller/grid/Messmethode.js	Mon Nov 16 11:51:11 2015 +0100
+++ b/app/controller/grid/Messmethode.js	Tue Nov 17 14:58:17 2015 +0100
@@ -250,6 +250,9 @@
      */
     add: function(button) {
         var record = Ext.create('Lada.model.MmtMessprogramm');
+        if (!record.get('letzteAenderung')) {
+            record.data.letzteAenderung = new Date();
+        }
         record.set('messprogrammId', button.up('messmethodengrid').recordId);
         button.up('messmethodengrid').store.insert(0, record);
         button.up('messmethodengrid').rowEditing.startEdit(0, 0);

http://lada.wald.intevation.org