diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 11:07:11 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 11:07:11 +1300 |
commit | 831a7b81004c0456c317ef4c521cbebd4cbf5fc2 (patch) | |
tree | 28c4d7a4ccb95f7b5fb9d947505b6ed717505583 /web/app/Application.js | |
parent | eadf492fe75fcfb0da617c9bc66bddd03139c96e (diff) | |
download | trackermap-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.js | 8 |
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; |