Mercurial > lada > lada-client
comparison app/controller/form/Messprogramm.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 | 01cddda65fea |
children | 33927274f013 |
comparison
equal
deleted
inserted
replaced
971:37f30b01788c | 972:24b5684d74d7 |
---|---|
174 .setValue(1, newValue, false); | 174 .setValue(1, newValue, false); |
175 } | 175 } |
176 | 176 |
177 }, | 177 }, |
178 /** | 178 /** |
179 * The save function saves the content of the Location form. | 179 * The save function saves the content of the Messprogramm form. |
180 * On success it will reload the Store, | 180 * On success it will reload the Store, |
181 * on failure, it will display an Errormessage | 181 * on failure, it will display an Errormessage |
182 */ | 182 */ |
183 save: function(button) { | 183 save: function(button) { |
184 var formPanel = button.up('form'); | 184 var formPanel = button.up('form'); |
185 var data = formPanel.getForm().getFieldValues(true); | 185 var data = formPanel.getForm().getFieldValues(true); |
186 for (var key in data) { | 186 for (var key in data) { |
187 formPanel.getForm().getRecord().set(key, data[key]); | 187 formPanel.getForm().getRecord().set(key, data[key]); |
188 } | |
189 if (!formPanel.getForm().getRecord().get('letzteAenderung')) { | |
190 formPanel.getForm().getRecord().data.letzteAenderung = new Date(); | |
188 } | 191 } |
189 formPanel.getForm().getRecord().save({ | 192 formPanel.getForm().getRecord().save({ |
190 success: function(record, response) { | 193 success: function(record, response) { |
191 var json = Ext.decode(response.response.responseText); | 194 var json = Ext.decode(response.response.responseText); |
192 if (json) { | 195 if (json) { |