diff options
author | Abyss777 <abyss@fox5.ru> | 2016-12-01 17:45:19 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-12-01 17:45:19 +0500 |
commit | 5433c47155452951b8c75587725bf6c92f8ff11d (patch) | |
tree | 839945cf8cdd07c029564b885fae7d408e83e491 /web/app/view/ReportController.js | |
parent | 42574b6700384bd8a45d3410c4f8da644dad112e (diff) | |
download | trackermap-web-5433c47155452951b8c75587725bf6c92f8ff11d.tar.gz trackermap-web-5433c47155452951b8c75587725bf6c92f8ff11d.tar.bz2 trackermap-web-5433c47155452951b8c75587725bf6c92f8ff11d.zip |
Handle 'showsingleevent' only in one place
Diffstat (limited to 'web/app/view/ReportController.js')
-rw-r--r-- | web/app/view/ReportController.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js index e1a64e69..97407e23 100644 --- a/web/app/view/ReportController.js +++ b/web/app/view/ReportController.js @@ -210,9 +210,14 @@ Ext.define('Traccar.view.ReportController', { params: { id: positionIds }, + scope: this, callback: function (records, operation, success) { if (success) { Ext.getStore('ReportRoute').add(records); + if (this.singleEvent) { + this.singleEvent = false; + this.fireEvent('selectreport', records[0], false); + } } } }); @@ -220,6 +225,7 @@ Ext.define('Traccar.view.ReportController', { }, showSingleEvent: function (eventId) { + this.singleEvent = true; this.lookupReference('reportTypeField').setValue('events'); Ext.getStore('Events').load({ id: eventId, |