comparison app/controller/form/Probe.js @ 678:a24db43b13b5

Set record dirty flag to false if commit failed.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 24 Mar 2015 10:44:36 +0100
parents fdaabab6f4cc
children 14ac75f80ba1
comparison
equal deleted inserted replaced
677:394c12b7bb21 678:a24db43b13b5
51 }, 51 },
52 failure: function(record, response) { 52 failure: function(record, response) {
53 button.setDisabled(true); 53 button.setDisabled(true);
54 button.up('toolbar').down('button[action=discard]') 54 button.up('toolbar').down('button[action=discard]')
55 .setDisabled(true); 55 .setDisabled(true);
56 formPanel.getForm().loadRecord(formPanel.getForm().getRecord()); 56 var rec = formPanel.getForm().getRecord();
57 rec.dirty = false;
58 formPanel.getForm().loadRecord(rec);
57 var json = response.request.scope.reader.jsonData; 59 var json = response.request.scope.reader.jsonData;
58 if (json) { 60 if (json) {
59 formPanel.setMessages(json.errors, json.warnings); 61 formPanel.setMessages(json.errors, json.warnings);
60 } 62 }
61 } 63 }

http://lada.wald.intevation.org