Mercurial > lada > lada-client
comparison app/controller/grid/Ort.js @ 701:f0bc5387abcc
Added failure - Messages
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 27 Mar 2015 09:38:13 +0100 |
parents | e88381fb3bdb |
children | 6e28ebbe1a73 |
comparison
equal
deleted
inserted
replaced
700:1e76aec72815 | 701:f0bc5387abcc |
---|---|
57 if (btn === 'yes') { | 57 if (btn === 'yes') { |
58 selection.destroy({ | 58 selection.destroy({ |
59 success: function() { | 59 success: function() { |
60 button.up('window').initData(); | 60 button.up('window').initData(); |
61 }, | 61 }, |
62 failure: function() { | 62 failure: function(request, response) { |
63 var json = response.request.scope.reader.jsonData; | |
64 if (json) { | |
65 if (json.message){ | |
66 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title') | |
67 +' #'+json.message, | |
68 Lada.getApplication().bundle.getMsg(json.message)); | |
69 } else { | |
70 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'), | |
71 Lada.getApplication().bundle.getMsg('err.msg.generic.body')); | |
72 } | |
73 } else { | |
74 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'), | |
75 Lada.getApplication().bundle.getMsg('err.msg.response.body')); | |
76 } | |
63 } | 77 } |
64 }); | 78 }); |
65 } | 79 } |
66 }); | 80 }); |
67 } | 81 } |