aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ReportController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/ReportController.js')
-rw-r--r--web/app/view/ReportController.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index 2badfea63..9c2abcc71 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -22,7 +22,8 @@ Ext.define('Traccar.view.ReportController', {
listen: {
controller: {
'*': {
- selectDevice: 'selectDevice'
+ selectDevice: 'selectDevice',
+ selectReport: 'selectReport'
}
}
}
@@ -53,28 +54,27 @@ Ext.define('Traccar.view.ReportController', {
deviceId: deviceId,
from: from.toISOString(),
to: to.toISOString()
- },
- scope: this,
- callback: function () {
- this.fireEvent('reportShow');
}
});
},
onClearClick: function () {
Ext.getStore('Positions').removeAll();
- this.fireEvent('reportClear');
},
onSelectionChange: function (selected) {
if (selected.getCount() > 0) {
- this.fireEvent('selectReport', selected.getLastSelected());
+ this.fireEvent('selectReport', selected.getLastSelected(), true);
}
},
selectDevice: function (device) {
- if (device !== undefined) {
+ if (device) {
this.getView().getSelectionModel().deselectAll();
}
+ },
+
+ selectReport: function (position, center) {
+ this.getView().getSelectionModel().select([position], false, true);
}
});