aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ReportController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-30 11:15:07 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-30 11:15:07 +0500
commitcffccb69b067fe0f838b0257d8cb48fa4e13ce2f (patch)
treea06888808d0d28003cc939dfd8d96cfd57397310 /web/app/view/ReportController.js
parent8ead897ea6b562567aceedee85a6c5c4f9088a5d (diff)
downloadtrackermap-web-cffccb69b067fe0f838b0257d8cb48fa4e13ce2f.tar.gz
trackermap-web-cffccb69b067fe0f838b0257d8cb48fa4e13ce2f.tar.bz2
trackermap-web-cffccb69b067fe0f838b0257d8cb48fa4e13ce2f.zip
- Removed unnecessary check
- Use array instead of object - Use id as parameter name
Diffstat (limited to 'web/app/view/ReportController.js')
-rw-r--r--web/app/view/ReportController.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index a9c98a96..50775ace 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -195,20 +195,20 @@ Ext.define('Traccar.view.ReportController', {
},
loadEvents: function (store, data) {
- var i, eventObject, positionIds = {};
+ var i, eventObject, positionIds = [];
Ext.getStore('ReportRoute').removeAll();
if (data.length > 0) {
for (i = 0; i < data.length; i++) {
eventObject = data[i];
if (eventObject.get('positionId')) {
- positionIds[eventObject.get('positionId')] = true;
+ positionIds.push(eventObject.get('positionId'));
}
}
}
- if (Object.keys(positionIds).length > 0) {
+ if (positionIds.length > 0) {
Ext.getStore('Positions').load({
params: {
- positionId: Object.keys(positionIds)
+ id: positionIds
},
callback: function (records, operation, success) {
if (success) {