aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
authortsmgeek <tsmgeek@gmail.com>2017-08-22 00:21:29 +0100
committertsmgeek <tsmgeek@gmail.com>2017-08-22 00:21:29 +0100
commitfdf35488b5b3cd5725c6c2e179b65377d30c6577 (patch)
treeda0b3927f3049475cd67977fe093d198920c1c37 /web/app/Application.js
parentf8b98b236fd676fe8945d942842640ddea5bbac8 (diff)
parente0bb9b92d07176677b3043530660af3bc30774d7 (diff)
downloadetbsa-traccar-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.gz
etbsa-traccar-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.bz2
etbsa-traccar-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.zip
Merge from upstream, change .eslintrc.json
Diffstat (limited to 'web/app/Application.js')
-rw-r--r--web/app/Application.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index c14dd4d..e0f0aa4 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -83,10 +83,12 @@ Ext.define('Traccar.Application', {
'AllTimezones',
'VisibleDevices',
'DeviceStatuses',
+ 'CommonDeviceAttributes',
'DeviceAttributes',
'GeofenceAttributes',
'GroupAttributes',
'ServerAttributes',
+ 'CommonUserAttributes',
'UserAttributes',
'ComputedAttributes',
'AllComputedAttributes',
@@ -104,6 +106,10 @@ Ext.define('Traccar.Application', {
return window.matchMedia && window.matchMedia('(max-width: 768px)').matches;
},
+ getVehicleFeaturesDisabled: function () {
+ return this.getBooleanAttributePreference('ui.disableVehicleFetures');
+ },
+
getEventString: function (eventType) {
var key = 'event' + eventType.charAt(0).toUpperCase() + eventType.slice(1);
return Strings[key] || key;
@@ -161,6 +167,10 @@ Ext.define('Traccar.Application', {
}
},
+ getBooleanAttributePreference: function (key) {
+ return this.getAttributePreference(key, false).toString() === 'true';
+ },
+
getReportColor: function (deviceId) {
var index, reportColor, device = Ext.getStore('Devices').getById(deviceId);
if (device) {