[Lada-commits] [PATCH 1 of 5] Further Failure Messages

Wald Commits scm-commit at wald.intevation.org
Fri Mar 27 16:00:46 CET 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1427451755 -3600
# Node ID 2d454bfef426ca290effdf8269539ad54a204b66
# Parent  9ab7b1eed9f8804581dbc12c20d8a6ea45900371
Further Failure Messages

diff -r 9ab7b1eed9f8 -r 2d454bfef426 app/controller/form/Location.js
--- a/app/controller/form/Location.js	Fri Mar 27 11:03:10 2015 +0100
+++ b/app/controller/form/Location.js	Fri Mar 27 11:22:35 2015 +0100
@@ -66,7 +66,7 @@
                     }
 
                     if(json.message){
-                        Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle')
+                        Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title')
                             +' #'+json.message,
                             Lada.getApplication().bundle.getMsg(json.message));
                     } else {
diff -r 9ab7b1eed9f8 -r 2d454bfef426 app/controller/form/Ort.js
--- a/app/controller/form/Ort.js	Fri Mar 27 11:03:10 2015 +0100
+++ b/app/controller/form/Ort.js	Fri Mar 27 11:22:35 2015 +0100
@@ -57,7 +57,7 @@
                     }
 
                     if(json.message){
-                        Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle')
+                        Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title')
                             +' #'+json.message,
                             Lada.getApplication().bundle.getMsg(json.message));
                     } else {
diff -r 9ab7b1eed9f8 -r 2d454bfef426 app/controller/grid/Messung.js
--- a/app/controller/grid/Messung.js	Fri Mar 27 11:03:10 2015 +0100
+++ b/app/controller/grid/Messung.js	Fri Mar 27 11:22:35 2015 +0100
@@ -65,6 +65,20 @@
                             button.up('window').initData();
                         },
                         failure: function() {
+                            var json = response.request.scope.reader.jsonData;
+                            if (json) {
+                                if (json.message){
+                                    Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title')
+                                        +' #'+json.message,
+                                        Lada.getApplication().bundle.getMsg(json.message));
+                                } else {
+                                    Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'),
+                                        Lada.getApplication().bundle.getMsg('err.msg.generic.body'));
+                                }
+                            } else {
+                                Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.delete.title'),
+                                    Lada.getApplication().bundle.getMsg('err.msg.response.body'));
+                            }
                         }
                     });
                 }


More information about the Lada-commits mailing list