aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ReportController.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/ReportController.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/ReportController.js')
-rw-r--r--web/app/view/ReportController.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index 660fe786d..9c2abcc71 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -22,7 +22,8 @@ Ext.define('Traccar.view.ReportController', {
listen: {
controller: {
'*': {
- selectDevice: 'selectDevice'
+ selectDevice: 'selectDevice',
+ selectReport: 'selectReport'
}
}
}
@@ -63,13 +64,17 @@ Ext.define('Traccar.view.ReportController', {
onSelectionChange: function (selected) {
if (selected.getCount() > 0) {
- this.fireEvent('selectReport', selected.getLastSelected());
+ this.fireEvent('selectReport', selected.getLastSelected(), true);
}
},
selectDevice: function (device) {
- if (device !== undefined) {
+ if (device) {
this.getView().getSelectionModel().deselectAll();
}
+ },
+
+ selectReport: function (position, center) {
+ this.getView().getSelectionModel().select([position], false, true);
}
});