aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/SettingsMenuController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-14 22:59:54 +1200
committerGitHub <noreply@github.com>2017-09-14 22:59:54 +1200
commitca960df40e15d7bfb88d2e0e41a269d4b069058c (patch)
tree0b41508a3f856700c353e5a5082c6ea829f13d43 /web/app/view/SettingsMenuController.js
parent4193ac77fd9f0da264284a6f73601963995554c8 (diff)
parentbe47d612285d484e2d0a2aa43174fb8e36acd816 (diff)
downloadtrackermap-web-ca960df40e15d7bfb88d2e0e41a269d4b069058c.tar.gz
trackermap-web-ca960df40e15d7bfb88d2e0e41a269d4b069058c.tar.bz2
trackermap-web-ca960df40e15d7bfb88d2e0e41a269d4b069058c.zip
Merge pull request #585 from Abyss777/saved_commands
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();
}