Mercurial > lada > lada-client
comparison app/controller/grid/Probenzusatzwert.js @ 697:5b2cbc6bc39a
Display Error Message on Failure
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 26 Mar 2015 17:23:13 +0100 |
parents | 8acb3123b46c |
children | 04f266eb2fd5 |
comparison
equal
deleted
inserted
replaced
696:b0f1dcdf981d | 697:5b2cbc6bc39a |
---|---|
28 context.record.save({ | 28 context.record.save({ |
29 success: function() { | 29 success: function() { |
30 context.grid.store.reload(); | 30 context.grid.store.reload(); |
31 context.grid.up('window').initData(); | 31 context.grid.up('window').initData(); |
32 }, | 32 }, |
33 failure: function() { | 33 failure: function(record, response) { |
34 // TODO | 34 console.log(response); |
35 console.log(record); | |
36 var json = response.request.scope.reader.jsonData; | |
37 if (json) { | |
38 if (json.message){ | |
39 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle') | |
40 +' '+json.message, | |
41 Lada.getApplication().bundle.getMsg(json.message)); | |
42 } | |
43 } | |
35 } | 44 } |
36 }); | 45 }); |
37 }, | 46 }, |
38 | 47 |
39 cancelEdit: function(editor, context) { | 48 cancelEdit: function(editor, context) { |