diff options
Diffstat (limited to 'web/app/view/report')
-rw-r--r-- | web/app/view/report/Report.js | 4 | ||||
-rw-r--r-- | web/app/view/report/ReportController.js | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index 55c8bf0e7..df8843a55 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -70,6 +70,10 @@ Ext.define('Traccar.view.report.Report', { handler: 'onClearClick' }], + listeners: { + selectionchange: 'onSelectionChange' + }, + columns: [ { text: strings.report_valid, dataIndex: 'valid', flex: 1 }, { text: strings.report_time, dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', format: styles.report_format }, diff --git a/web/app/view/report/ReportController.js b/web/app/view/report/ReportController.js index 415cdfe3a..daeb8ddfc 100644 --- a/web/app/view/report/ReportController.js +++ b/web/app/view/report/ReportController.js @@ -52,6 +52,12 @@ Ext.define('Traccar.view.report.ReportController', { onClearClick: function() { Ext.getStore('Positions').removeAll(); this.fireEvent("reportClear"); + }, + + onSelectionChange: function(selected) { + if (selected.getCount() > 0) { + this.fireEvent("selectReport", selected.getLastSelected()); + } } }); |