comparison app/controller/grid/Probenzusatzwert.js @ 701:f0bc5387abcc

Added failure - Messages
author Dustin Demuth <dustin@intevation.de>
date Fri, 27 Mar 2015 09:38:13 +0100
parents 04f266eb2fd5
children 6e28ebbe1a73
comparison
equal deleted inserted replaced
700:1e76aec72815 701:f0bc5387abcc
32 }, 32 },
33 failure: function(record, response) { 33 failure: function(record, response) {
34 var json = response.request.scope.reader.jsonData; 34 var json = response.request.scope.reader.jsonData;
35 if (json) { 35 if (json) {
36 if (json.message){ 36 if (json.message){
37 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle') 37 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title')
38 +' '+json.message, 38 +' #'+json.message,
39 Lada.getApplication().bundle.getMsg(json.message)); 39 Lada.getApplication().bundle.getMsg(json.message));
40 } else {
41 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title'),
42 Lada.getApplication().bundle.getMsg('err.msg.generic.body'));
40 } 43 }
44 } else {
45 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title'),
46 Lada.getApplication().bundle.getMsg('err.msg.response.body'));
41 } 47 }
42 } 48 }
43 }); 49 });
44 }, 50 },
45 51
66 selection.destroy({ 72 selection.destroy({
67 success: function() { 73 success: function() {
68 button.up('window').initData(); 74 button.up('window').initData();
69 grid.initData(); 75 grid.initData();
70 }, 76 },
71 failure: function() { 77 failure: function(request, response) {
72 // TODO 78 var json = response.request.scope.reader.jsonData;
79 if (json) {
80 if (json.message){
81 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title')
82 +' #'+json.message,
83 Lada.getApplication().bundle.getMsg(json.message));
84 } else {
85 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'),
86 Lada.getApplication().bundle.getMsg('err.msg.generic.body'));
87 }
88 } else {
89 Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'),
90 Lada.getApplication().bundle.getMsg('err.msg.response.body'));
91 }
73 } 92 }
74 }); 93 });
75 } 94 }
76 }); 95 });
77 } 96 }

http://lada.wald.intevation.org