From 1fd5eb5ca7e2b4cfa1f1e373a3602825d8fa07c0 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 27 Oct 2016 10:33:22 +0500 Subject: Implement live routes --- web/app/Application.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'web/app/Application.js') 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)) { -- cgit v1.2.3