aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/DevicesController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 14:11:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 14:11:58 +1300
commit2c71e521f5e2f60627d0c3df4b6649751dea1035 (patch)
tree833addc80c62b851cb008e965e3b5c88eb61e2c8 /web/app/view/DevicesController.js
parentcdd83e0d13961c3465c7faf554ea8c709bd761b3 (diff)
downloadtrackermap-server-2c71e521f5e2f60627d0c3df4b6649751dea1035.tar.gz
trackermap-server-2c71e521f5e2f60627d0c3df4b6649751dea1035.tar.bz2
trackermap-server-2c71e521f5e2f60627d0c3df4b6649751dea1035.zip
Handle map marker selections
Diffstat (limited to 'web/app/view/DevicesController.js')
-rw-r--r--web/app/view/DevicesController.js7
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();