aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-10-27 10:33:22 +0500
committerAbyss777 <abyss@fox5.ru>2016-10-27 10:33:22 +0500
commit1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0 (patch)
tree14cb9a24f9eb7ed877e567710cdab960a1f726dc /web/app/Application.js
parentf6915ca3bf4e8c2d9df5eb4cd5283614d4dd747e (diff)
downloadetbsa-traccar-web-1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0.tar.gz
etbsa-traccar-web-1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0.tar.bz2
etbsa-traccar-web-1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0.zip
Implement live routes
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 be75a60..743f8b1 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -106,6 +106,14 @@ Ext.define('Traccar.Application', {
}
},
+ getAttributePreference: function (key, defaultValue) {
+ if (this.getServer().get('forceSettings')) {
+ return this.getServer().get('attributes')[key] || this.getUser().get('attributes')[key] || defaultValue;
+ } else {
+ return this.getUser().get('attributes')[key] || this.getServer().get('attributes')[key] || defaultValue;
+ }
+ },
+
showError: function (response) {
var data;
if (Ext.isString(response)) {