Mercurial > lada > lada-client
comparison app/controller/form/Probe.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 | 50d7b6e17525 |
children | d198946e5540 |
comparison
equal
deleted
inserted
replaced
971:37f30b01788c | 972:24b5684d74d7 |
---|---|
76 netzbetreiber.select(nbId); | 76 netzbetreiber.select(nbId); |
77 } | 77 } |
78 }, | 78 }, |
79 | 79 |
80 /** | 80 /** |
81 * The save function saves the content of the Location form. | 81 * The save function saves the content of the Messung form. |
82 * On success it will reload the Store, | 82 * On success it will reload the Store, |
83 * on failure, it will display an Errormessage | 83 * on failure, it will display an Errormessage |
84 */ | 84 */ |
85 save: function(button) { | 85 save: function(button) { |
86 var formPanel = button.up('form'); | 86 var formPanel = button.up('form'); |
87 var data = formPanel.getForm().getFieldValues(true); | 87 var data = formPanel.getForm().getFieldValues(true); |
88 for (var key in data) { | 88 for (var key in data) { |
89 formPanel.getForm().getRecord().set(key, data[key]); | 89 formPanel.getForm().getRecord().set(key, data[key]); |
90 } | |
91 if (!formPanel.getForm().getRecord().get('letzteAenderung')) { | |
92 formPanel.getForm().getRecord().data.letzteAenderung = new Date(); | |
90 } | 93 } |
91 formPanel.getForm().getRecord().save({ | 94 formPanel.getForm().getRecord().save({ |
92 success: function(record, response) { | 95 success: function(record, response) { |
93 var json = Ext.decode(response.response.responseText); | 96 var json = Ext.decode(response.response.responseText); |
94 if (json) { | 97 if (json) { |