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 be75a609..743f8b11 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)) {