aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/edit')
-rw-r--r--web/app/view/edit/AttributesController.js1
-rw-r--r--web/app/view/edit/DevicesController.js4
-rw-r--r--web/app/view/edit/GroupsController.js7
-rw-r--r--web/app/view/edit/UsersController.js6
4 files changed, 18 insertions, 0 deletions
diff --git a/web/app/view/edit/AttributesController.js b/web/app/view/edit/AttributesController.js
index 235f2c5b..c12c1968 100644
--- a/web/app/view/edit/AttributesController.js
+++ b/web/app/view/edit/AttributesController.js
@@ -90,6 +90,7 @@ Ext.define('Traccar.view.edit.AttributesController', {
displayField: 'name',
valueField: 'key',
allowBlank: false,
+ queryMode: 'local',
listeners: {
change: 'onNameChange'
}
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js
index 6de24983..df75b1d4 100644
--- a/web/app/view/edit/DevicesController.js
+++ b/web/app/view/edit/DevicesController.js
@@ -61,6 +61,10 @@ Ext.define('Traccar.view.edit.DevicesController', {
deviceReadonly = Traccar.app.getPreference('deviceReadonly', false) && !Traccar.app.getUser().get('admin');
readonly = Traccar.app.getPreference('readonly', false) && !Traccar.app.getUser().get('admin');
this.lookupReference('toolbarAddButton').setDisabled(readonly || deviceReadonly);
+ this.lookupReference('toolbarDriversButton').setHidden(
+ Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers'));
+ this.lookupReference('toolbarAttributesButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes'));
setInterval(function () {
self.getView().getView().refresh();
diff --git a/web/app/view/edit/GroupsController.js b/web/app/view/edit/GroupsController.js
index 21f17ffa..be26cc93 100644
--- a/web/app/view/edit/GroupsController.js
+++ b/web/app/view/edit/GroupsController.js
@@ -32,6 +32,13 @@ Ext.define('Traccar.view.edit.GroupsController', {
objectDialog: 'Traccar.view.dialog.Group',
removeTitle: Strings.groupDialog,
+ init: function () {
+ this.lookupReference('toolbarDriversButton').setHidden(
+ Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers'));
+ this.lookupReference('toolbarAttributesButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes'));
+ },
+
onGeofencesClick: function () {
var admin, group;
admin = Traccar.app.getUser().get('admin');
diff --git a/web/app/view/edit/UsersController.js b/web/app/view/edit/UsersController.js
index fb7a36e2..d67f5a70 100644
--- a/web/app/view/edit/UsersController.js
+++ b/web/app/view/edit/UsersController.js
@@ -41,6 +41,12 @@ Ext.define('Traccar.view.edit.UsersController', {
init: function () {
Ext.getStore('Users').load();
this.lookupReference('userUsersButton').setHidden(!Traccar.app.getUser().get('admin'));
+ this.lookupReference('userDriversButton').setHidden(
+ Traccar.app.isVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableDrivers'));
+ this.lookupReference('userAttributesButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes'));
+ this.lookupReference('userCalendarsButton').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableCalendars'));
},
onEditClick: function () {