From 88c87b2ce54733c06db810e51a749797ba03e913 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 26 Jun 2015 19:22:04 +1200 Subject: Sync device and report selections --- web/app/view/report/ReportController.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'web/app/view/report') diff --git a/web/app/view/report/ReportController.js b/web/app/view/report/ReportController.js index daeb8ddfc..ffc75dc1c 100644 --- a/web/app/view/report/ReportController.js +++ b/web/app/view/report/ReportController.js @@ -18,6 +18,16 @@ Ext.define('Traccar.view.report.ReportController', { extend: 'Ext.app.ViewController', alias: 'controller.report', + config: { + listen: { + controller: { + '*': { + selectDevice: 'selectDevice' + } + } + } + }, + onShowClick: function() { var deviceId = this.lookupReference('deviceField').getValue(); @@ -58,6 +68,12 @@ Ext.define('Traccar.view.report.ReportController', { if (selected.getCount() > 0) { this.fireEvent("selectReport", selected.getLastSelected()); } + }, + + selectDevice: function(device) { + if (device !== undefined) { + this.getView().getSelectionModel().deselectAll(); + } } }); -- cgit v1.2.3