aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ReportController.js
diff options
context:
space:
mode:
authorEvgeny S Maksimov <admin@vragam.net>2019-02-26 12:21:51 +0300
committerEvgeny S Maksimov <admin@vragam.net>2019-02-26 12:21:51 +0300
commitaf41d034854a8d267463759a72fe1f610c9d297d (patch)
treea102b1dd99936c161fa01673fee09bb56c71cd8d /web/app/view/ReportController.js
parent9a14f9599659c587a646ee322db5b65fa65d801d (diff)
downloadtrackermap-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.js21
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();