diff options
Diffstat (limited to 'web/app/view/ReportController.js')
-rw-r--r-- | web/app/view/ReportController.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js index 5d43007a..2ffca966 100644 --- a/web/app/view/ReportController.js +++ b/web/app/view/ReportController.js @@ -32,12 +32,13 @@ Ext.define('Traccar.view.ReportController', { listen: { controller: { '*': { - selectdevice: 'selectDevice', - showsingleevent: 'showSingleEvent', - deselectfeature: 'deselectFeature' + selectdevice: 'deselectReport', + selectevent: 'deselectReport', + showsingleevent: 'showSingleEvent' }, 'map': { - selectreport: 'selectReport' + selectreport: 'selectReport', + deselectfeature: 'deselectFeature' } }, global: { @@ -231,12 +232,6 @@ Ext.define('Traccar.view.ReportController', { } }, - selectDevice: function (device) { - if (device) { - this.getGrid().getSelectionModel().deselectAll(); - } - }, - selectReport: function (object) { var positionRelated, reportType = this.lookupReference('reportTypeField').getValue(); if (object instanceof Traccar.model.Position) { @@ -251,6 +246,12 @@ Ext.define('Traccar.view.ReportController', { } }, + deselectReport: function (object) { + if (object !== undefined) { + this.deselectFeature(); + } + }, + deselectFeature: function () { if (this.lookupReference('reportTypeField').getValue() !== 'trips') { this.getGrid().getSelectionModel().deselectAll(); |