Mercurial > lada > lada-client
comparison app/controller/grid/Messwert.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 | 2362f8ab1e9f |
children |
comparison
equal
deleted
inserted
replaced
971:37f30b01788c | 972:24b5684d74d7 |
---|---|
88 */ | 88 */ |
89 add: function(button) { | 89 add: function(button) { |
90 var record = Ext.create('Lada.model.Messwert', { | 90 var record = Ext.create('Lada.model.Messwert', { |
91 messungsId: button.up('messwertgrid').recordId | 91 messungsId: button.up('messwertgrid').recordId |
92 }); | 92 }); |
93 if (!record.get('letzteAenderung')) { | |
94 record.data.letzteAenderung = new Date(); | |
95 } | |
93 button.up('messwertgrid').store.insert(0, record); | 96 button.up('messwertgrid').store.insert(0, record); |
94 button.up('messwertgrid').rowEditing.startEdit(0, 1); | 97 button.up('messwertgrid').rowEditing.startEdit(0, 1); |
95 }, | 98 }, |
96 | 99 |
97 /** | 100 /** |