Mercurial > lada > lada-client
changeset 1079:1c86a259c2ac
Set letzteAenderung for new datensatzerzeuger.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 13 Apr 2016 13:57:36 +0200 (2016-04-13) |
parents | fe5fb960da9d |
children | 15d7b7a9e177 |
files | app/controller/grid/Datensatzerzeuger.js |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/grid/Datensatzerzeuger.js Wed Apr 13 13:55:39 2016 +0200 +++ b/app/controller/grid/Datensatzerzeuger.js Wed Apr 13 13:57:36 2016 +0200 @@ -68,7 +68,8 @@ var i18n = Lada.getApplication().bundle; context.record.save({ success: function(record, response) { - //Do Nothing + var grid = Ext.ComponentQuery.query('datensatzerzeugergrid')[0]; + grid.store.reload(); }, failure: function(record, response) { var json = response.request.scope.reader.jsonData; @@ -106,6 +107,9 @@ */ add: function(button) { var record = Ext.create('Lada.model.DatensatzErzeuger'); + if (!record.get('letzteAenderung')) { + record.data.letzteAenderung = new Date(); + } button.up('datensatzerzeugergrid').store.insert(0, record); button.up('datensatzerzeugergrid').rowEditing.startEdit(0, 1); },