diff options
author | Evgeny S Maksimov <admin@vragam.net> | 2019-02-26 12:21:51 +0300 |
---|---|---|
committer | Evgeny S Maksimov <admin@vragam.net> | 2019-02-26 12:21:51 +0300 |
commit | af41d034854a8d267463759a72fe1f610c9d297d (patch) | |
tree | a102b1dd99936c161fa01673fee09bb56c71cd8d /web/app/view/ReportController.js | |
parent | 9a14f9599659c587a646ee322db5b65fa65d801d (diff) | |
download | trackermap-web-af41d034854a8d267463759a72fe1f610c9d297d.tar.gz trackermap-web-af41d034854a8d267463759a72fe1f610c9d297d.tar.bz2 trackermap-web-af41d034854a8d267463759a72fe1f610c9d297d.zip |
Implementation fixes
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(); |