aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-02 11:07:11 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-02 11:07:11 +1300
commit831a7b81004c0456c317ef4c521cbebd4cbf5fc2 (patch)
tree28c4d7a4ccb95f7b5fb9d947505b6ed717505583 /web/app/Application.js
parenteadf492fe75fcfb0da617c9bc66bddd03139c96e (diff)
downloadtrackermap-server-831a7b81004c0456c317ef4c521cbebd4cbf5fc2.tar.gz
trackermap-server-831a7b81004c0456c317ef4c521cbebd4cbf5fc2.tar.bz2
trackermap-server-831a7b81004c0456c317ef4c521cbebd4cbf5fc2.zip
Start web app migration to REST API
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;