diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-08 14:11:58 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-08 14:11:58 +1300 |
commit | 2c71e521f5e2f60627d0c3df4b6649751dea1035 (patch) | |
tree | 833addc80c62b851cb008e965e3b5c88eb61e2c8 /web/app/view/DevicesController.js | |
parent | cdd83e0d13961c3465c7faf554ea8c709bd761b3 (diff) | |
download | traccar-server-2c71e521f5e2f60627d0c3df4b6649751dea1035.tar.gz traccar-server-2c71e521f5e2f60627d0c3df4b6649751dea1035.tar.bz2 traccar-server-2c71e521f5e2f60627d0c3df4b6649751dea1035.zip |
Handle map marker selections
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(); |