From 2c71e521f5e2f60627d0c3df4b6649751dea1035 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 8 Nov 2015 14:11:58 +1300 Subject: Handle map marker selections --- web/app/view/DevicesController.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'web/app/view/DevicesController.js') 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(); -- cgit v1.2.3