aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/model/ReportSummary.js2
-rw-r--r--web/app/view/ReportController.js24
-rw-r--r--web/l10n/en.json6
3 files changed, 16 insertions, 16 deletions
diff --git a/web/app/model/ReportSummary.js b/web/app/model/ReportSummary.js
index 816dc76ab..7821e1c00 100644
--- a/web/app/model/ReportSummary.js
+++ b/web/app/model/ReportSummary.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index 7ff994202..ecc7b0f91 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -63,7 +63,7 @@ Ext.define('Traccar.view.ReportController', {
});
} else if (button.reference === "csvButton") {
url = this.getView().getStore().getProxy().url;
- this.doDownloadCsv(url, {
+ this.downloadCsv(url, {
deviceId: deviceId,
type: '%',
from: from.toISOString(),
@@ -95,7 +95,7 @@ Ext.define('Traccar.view.ReportController', {
}
},
- doDownloadCsv: function (requestUrl, requestParams) {
+ downloadCsv: function (requestUrl, requestParams) {
Ext.Ajax.request({
url: requestUrl,
method: 'GET',
@@ -104,7 +104,7 @@ Ext.define('Traccar.view.ReportController', {
Accept: 'text/csv'
},
success: function (response) {
- var disposition, filename, type, blob, url, downloadUrl, a;
+ var disposition, filename, type, blob, url, downloadUrl, elementA;
disposition = response.getResponseHeader('Content-Disposition');
filename = disposition.slice(disposition.indexOf("=") + 1, disposition.length);
type = response.getResponseHeader('Content-Type');
@@ -116,15 +116,15 @@ Ext.define('Traccar.view.ReportController', {
url = window.URL || window.webkitURL;
downloadUrl = URL.createObjectURL(blob);
if (filename) {
- a = document.createElement("a");
- a.href = downloadUrl;
- a.download = filename;
- document.body.appendChild(a);
- a.click();
+ elementA = document.createElement("a");
+ elementA.href = downloadUrl;
+ elementA.download = filename;
+ document.body.appendChild(elementA);
+ elementA.click();
}
setTimeout(function () {
- url.revokeObjectURL(downloadUrl);
- }, 100);
+ url.revokeObjectURL(downloadUrl);
+ }, 100);
}
}
});
@@ -218,12 +218,12 @@ Ext.define('Traccar.view.ReportController', {
flex: 1,
renderer: Traccar.AttributeFormatter.getFormatter('distance')
}, {
- text: Strings.summaryAverageSpeed,
+ text: Strings.reportAverageSpeed,
dataIndex: 'averageSpeed',
flex: 1,
renderer: Traccar.AttributeFormatter.getFormatter('speed')
}, {
- text: Strings.summaryMaximumSpeed,
+ text: Strings.reportMaximumSpeed,
dataIndex: 'maxSpeed',
flex: 1,
renderer: Traccar.AttributeFormatter.getFormatter('speed')
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 3c30353ac..b98e6d127 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -136,8 +136,8 @@
"reportRoute": "Route",
"reportEvents": "Events",
"reportSummary": "Summary",
- "reportCsv": "Csv",
+ "reportCsv": "CSV",
"reportDeviceName": "Device Name",
- "summaryAverageSpeed": "Average Speed",
- "summaryMaximumSpeed": "Maximum Speed"
+ "reportAverageSpeed": "Average Speed",
+ "reportMaximumSpeed": "Maximum Speed"
} \ No newline at end of file