aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/SettingsMenuController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r--web/app/view/SettingsMenuController.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
index e8893e3..56d9cf8 100644
--- a/web/app/view/SettingsMenuController.js
+++ b/web/app/view/SettingsMenuController.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2018 Anton Tananaev (anton@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@ Ext.define('Traccar.view.SettingsMenuController', {
'Traccar.view.dialog.DeviceDistance',
'Traccar.view.edit.Calendars',
'Traccar.view.edit.SavedCommands',
+ 'Traccar.view.edit.Maintenances',
'Traccar.view.BaseWindow'
],
@@ -59,6 +60,8 @@ Ext.define('Traccar.view.SettingsMenuController', {
this.lookupReference('settingsDriversButton').setHidden(
Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers'));
this.lookupReference('settingsCommandsButton').setHidden(Traccar.app.getPreference('limitCommands', false));
+ this.lookupReference('settingsMaintenancesButton').setHidden(
+ Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenances'));
}
if (admin || !deviceReadonly && !readonly) {
this.lookupReference('settingsComputedAttributesButton').setHidden(
@@ -162,6 +165,15 @@ Ext.define('Traccar.view.SettingsMenuController', {
}).show();
},
+ onMaintenancesClick: function () {
+ Ext.create('Traccar.view.BaseWindow', {
+ title: Strings.sharedMaintenances,
+ items: {
+ xtype: 'maintenancesView'
+ }
+ }).show();
+ },
+
onLogoutClick: function () {
Ext.create('Traccar.view.dialog.LoginController').logout();
}