diff app/controller/grid/Status.js @ 970:f4eb53ba63fc

Setting Timestamps the correct way. Before this commit the times of the instatiation of the model were used as default values, which led to wrong dates.
author Dustin Demuth <dustin@intevation.de>
date Mon, 16 Nov 2015 11:48:15 +0100
parents d4603049cd42
children ea477f62a667
line wrap: on
line diff
--- a/app/controller/grid/Status.js	Thu Nov 12 17:38:57 2015 +0100
+++ b/app/controller/grid/Status.js	Mon Nov 16 11:48:15 2015 +0100
@@ -79,6 +79,8 @@
         var record = Ext.create('Lada.model.Status', {
             messungsId: button.up('statusgrid').recordId
         });
+        //Set the Date
+        record.data.datum = new Date();
         var lastrow = button.up('statusgrid').store.count()
         button.up('statusgrid').store.insert(lastrow, record);
         button.up('statusgrid').rowEditing.startEdit(lastrow, 1);

http://lada.wald.intevation.org