diff options
Diffstat (limited to 'web/app/view/DevicesController.js')
-rw-r--r-- | web/app/view/DevicesController.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index dd3ca5a05..c29854d12 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -27,6 +27,7 @@ Ext.define('Traccar.view.DevicesController', { listen: { controller: { '*': { + selectDevice: 'selectDevice', selectReport: 'selectReport' } } @@ -87,10 +88,14 @@ Ext.define('Traccar.view.DevicesController', { this.lookupReference('toolbarRemoveButton').setDisabled(empty); this.lookupReference('deviceCommandButton').setDisabled(empty); if (!empty) { - this.fireEvent('selectDevice', selected.getLastSelected()); + this.fireEvent('selectDevice', selected.getLastSelected(), true); } }, + selectDevice: function (device, center) { + this.getView().getSelectionModel().select([device], false, true); + }, + selectReport: function (position) { if (position !== undefined) { this.getView().getSelectionModel().deselectAll(); |