aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/SettingsMenuController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-09-12 17:39:43 +0500
committerAbyss777 <abyss@fox5.ru>2017-09-13 13:51:35 +0500
commita5d36c62facad98c409b9fcd4f8b92c3d47601ab (patch)
tree368a2ed169c1457a1cc2dd69a811f2dccc59ce04 /web/app/view/SettingsMenuController.js
parent31a6fed66b4f077d2b6443fdd34229befe8777c3 (diff)
downloadtrackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.tar.gz
trackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.tar.bz2
trackermap-web-a5d36c62facad98c409b9fcd4f8b92c3d47601ab.zip
Implement Saved Commands
Diffstat (limited to 'web/app/view/SettingsMenuController.js')
-rw-r--r--web/app/view/SettingsMenuController.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js
index 5968a537..caa57a67 100644
--- a/web/app/view/SettingsMenuController.js
+++ b/web/app/view/SettingsMenuController.js
@@ -32,6 +32,7 @@ Ext.define('Traccar.view.SettingsMenuController', {
'Traccar.view.Statistics',
'Traccar.view.dialog.DeviceDistance',
'Traccar.view.edit.Calendars',
+ 'Traccar.view.edit.SavedCommands',
'Traccar.view.BaseWindow'
],
@@ -58,6 +59,7 @@ Ext.define('Traccar.view.SettingsMenuController', {
Traccar.app.getBooleanAttributePreference('ui.disableCalendars'));
this.lookupReference('settingsDriversButton').setHidden(
Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers'));
+ this.lookupReference('settingsCommandsButton').setHidden(Traccar.app.getPreference('limitCommands', false));
}
if (admin || !deviceReadonly && !readonly) {
this.lookupReference('settingsComputedAttributesButton').setHidden(
@@ -159,6 +161,15 @@ Ext.define('Traccar.view.SettingsMenuController', {
}).show();
},
+ onCommandsClick: function () {
+ Ext.create('Traccar.view.BaseWindow', {
+ title: Strings.sharedSavedCommands,
+ items: {
+ xtype: 'savedCommandsView'
+ }
+ }).show();
+ },
+
onLogoutClick: function () {
Ext.create('Traccar.view.dialog.LoginController').logout();
}