Mercurial > lada > lada-client
comparison app/controller/grid/MKommentar.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 | 1e76aec72815 |
comparison
equal
deleted
inserted
replaced
696:b0f1dcdf981d | 697:5b2cbc6bc39a |
---|---|
24 }); | 24 }); |
25 }, | 25 }, |
26 | 26 |
27 edit: function(editor, context) { | 27 edit: function(editor, context) { |
28 context.record.save({ | 28 context.record.save({ |
29 success: function() { | 29 success: function(record, response) { |
30 context.grid.initData(); | 30 context.grid.initData(); |
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 var json = response.request.scope.reader.jsonData; |
35 if (json) { | |
36 if (json.message){ | |
37 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle') | |
38 +' '+json.message, | |
39 Lada.getApplication().bundle.getMsg(json.message)); | |
40 } | |
41 } | |
35 } | 42 } |
36 }); | 43 }); |
37 }, | 44 }, |
38 | 45 |
39 cancelEdit: function(editor, context) { | 46 cancelEdit: function(editor, context) { |