diff options
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/Devices.js | 1 | ||||
-rw-r--r-- | web/app/view/DevicesController.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js index f06c2658b..31eead2f7 100644 --- a/web/app/view/Devices.js +++ b/web/app/view/Devices.js @@ -17,6 +17,7 @@ Ext.define('Traccar.view.Devices', { extend: 'Ext.grid.Panel', xtype: 'devicesView', + id: 'devicesPanel', requires: [ 'Traccar.view.DevicesController', diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index 9dee0ff7c..8c1bba00f 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -103,7 +103,7 @@ Ext.define('Traccar.view.DevicesController', { var empty = selected.getCount() === 0; this.lookupReference('toolbarEditButton').setDisabled(empty); this.lookupReference('toolbarRemoveButton').setDisabled(empty); - this.lookupReference('deviceCommandButton').setDisabled(empty); + this.lookupReference('deviceCommandButton').setDisabled(empty || (selected.getLastSelected().get('status') !== 'online')); if (!empty) { this.fireEvent('selectDevice', selected.getLastSelected(), true); } |