aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/Application.js')
-rw-r--r--web/app/Application.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index ebf685dbc..34d65d13a 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -78,6 +78,14 @@ Ext.define('Traccar.Application', {
return this.getUser().get(key) || this.getServer().get(key) || defaultValue;
},
+ showError: function (response) {
+ if (response.statusText) {
+ Ext.Msg.alert(Strings.errorTitle, response.statusText);
+ } else {
+ Ext.Msg.alert(Strings.errorTitle, Strings.errorConnection);
+ }
+ },
+
getErrorHandler: function (scope, handler) {
return function (options, success, response) {
var result;