From bd2e0fdc6fe222316e9e740aa265b6d132d407b6 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 23 Jun 2016 16:17:25 +0500 Subject: Added possibility to disable event and geofence subsystems --- web/app/view/DevicesController.js | 2 +- web/app/view/GroupsController.js | 2 +- web/app/view/UsersController.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'web/app/view') diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index cf31dd7bb..8b35fd859 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -125,7 +125,7 @@ Ext.define('Traccar.view.DevicesController', { var empty = selected.getCount() === 0; this.lookupReference('toolbarEditButton').setDisabled(empty); this.lookupReference('toolbarRemoveButton').setDisabled(empty); - this.lookupReference('toolbarGeofencesButton').setDisabled(empty); + this.lookupReference('toolbarGeofencesButton').setDisabled(empty || Traccar.app.withoutGeofences); this.lookupReference('deviceCommandButton').setDisabled(empty || (selected.getLastSelected().get('status') !== 'online')); if (!empty) { this.fireEvent('selectDevice', selected.getLastSelected(), true); diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js index bc713bb6d..ecacdb7f6 100644 --- a/web/app/view/GroupsController.js +++ b/web/app/view/GroupsController.js @@ -79,6 +79,6 @@ Ext.define('Traccar.view.GroupsController', { var disabled = selected.length > 0; this.lookupReference('toolbarEditButton').setDisabled(disabled); this.lookupReference('toolbarRemoveButton').setDisabled(disabled); - this.lookupReference('toolbarGeofencesButton').setDisabled(disabled); + this.lookupReference('toolbarGeofencesButton').setDisabled(disabled || Traccar.app.withoutGeofences); } }); diff --git a/web/app/view/UsersController.js b/web/app/view/UsersController.js index acba66b4d..d8e42570d 100644 --- a/web/app/view/UsersController.js +++ b/web/app/view/UsersController.js @@ -120,6 +120,6 @@ Ext.define('Traccar.view.UsersController', { this.lookupReference('toolbarRemoveButton').setDisabled(disabled); this.lookupReference('userDevicesButton').setDisabled(disabled); this.lookupReference('userGroupsButton').setDisabled(disabled); - this.lookupReference('userGeofencesButton').setDisabled(disabled); + this.lookupReference('userGeofencesButton').setDisabled(disabled || Traccar.app.withoutGeofences); } }); -- cgit v1.2.3