Mercurial > lada > lada-client
diff app/controller/form/Ort.js @ 695:d6ef146e1a9f
Added simple handling for Failure-Messages
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 26 Mar 2015 16:24:13 +0100 |
parents | 71e8b84d7829 |
children | f0bc5387abcc |
line wrap: on
line diff
--- a/app/controller/form/Ort.js Thu Mar 26 16:02:38 2015 +0100 +++ b/app/controller/form/Ort.js Thu Mar 26 16:24:13 2015 +0100 @@ -52,7 +52,15 @@ formPanel.getForm().loadRecord(formPanel.getForm().getRecord()); var json = response.request.scope.reader.jsonData; if (json) { - formPanel.setMessages(json.errors, json.warnings); + if(json.errors.totalCount > 0 || json.warnings.totalCount > 0){ + formPanel.setMessages(json.errors, json.warnings); + } + + if(json.message){ + Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle') + +' '+json.message, + Lada.getApplication().bundle.getMsg(json.message)); + } } } });