aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/SettingsMenuController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 23:10:25 +1200
committerGitHub <noreply@github.com>2017-08-18 23:10:25 +1200
commitf7edbe59ae418d12871b483a8533af3ac28fbff6 (patch)
tree287a5ade49ee4f51328aa93216545d41117f2d95 /web/app/view/SettingsMenuController.js
parentcbc90c04da15fe0d57910e6180205351a894166b (diff)
parentf26159a40b3b23fbd63de312f121b1fe1bf64bd1 (diff)
downloadtrackermap-web-f7edbe59ae418d12871b483a8533af3ac28fbff6.tar.gz
trackermap-web-f7edbe59ae418d12871b483a8533af3ac28fbff6.tar.bz2
trackermap-web-f7edbe59ae418d12871b483a8533af3ac28fbff6.zip
Merge pull request #556 from Abyss777/disable_vehicle_features
Disable some UI features
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r--web/app/view/SettingsMenuController.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
index d435e35b..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) {
this.lookupReference('settingsAttributeAliasesButton').setHidden(false);
- this.lookupReference('settingsComputedAttributesButton').setHidden(false);
+ this.lookupReference('settingsComputedAttributesButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes'));
}
},