aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/SettingsMenuController.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/view/SettingsMenuController.js
parentf8b98b236fd676fe8945d942842640ddea5bbac8 (diff)
parente0bb9b92d07176677b3043530660af3bc30774d7 (diff)
downloadtrackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.gz
trackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.tar.bz2
trackermap-web-fdf35488b5b3cd5725c6c2e179b65377d30c6577.zip
Merge from upstream, change .eslintrc.json
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r--web/app/view/SettingsMenuController.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
index 102120d8..7175260c 100644
--- a/web/app/view/SettingsMenuController.js
+++ b/web/app/view/SettingsMenuController.js
@@ -45,7 +45,7 @@ Ext.define('Traccar.view.SettingsMenuController', {
if (admin) {
this.lookupReference('settingsServerButton').setHidden(false);
this.lookupReference('settingsStatisticsButton').setHidden(false);
- this.lookupReference('settingsDeviceDistanceButton').setHidden(false);
+ this.lookupReference('settingsDeviceDistanceButton').setHidden(Traccar.app.getVehicleFeaturesDisabled());
}
if (admin || manager) {
this.lookupReference('settingsUsersButton').setHidden(false);
@@ -55,12 +55,15 @@ Ext.define('Traccar.view.SettingsMenuController', {
this.lookupReference('settingsGroupsButton').setHidden(false);
this.lookupReference('settingsGeofencesButton').setHidden(false);
this.lookupReference('settingsNotificationsButton').setHidden(false);
- this.lookupReference('settingsCalendarsButton').setHidden(false);
- this.lookupReference('settingsDriversButton').setHidden(false);
+ this.lookupReference('settingsCalendarsButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableCalendars'));
+ this.lookupReference('settingsDriversButton').setHidden(
+ Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers'));
}
- if (admin || (!deviceReadonly && !readonly)) {
+ if (admin || !deviceReadonly && !readonly) {
this.lookupReference('settingsAttributeAliasesButton').setHidden(false);
- this.lookupReference('settingsComputedAttributesButton').setHidden(false);
+ this.lookupReference('settingsComputedAttributesButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes'));
}
},