aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-18 09:08:25 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-18 09:21:04 +0500
commit7f290bf996e6a91b1c5d2b5d74318f9c7a246d75 (patch)
tree2b641ed352c030201e145f973c7b0ef8e62de4ec /web/app
parentd2f7d47dfad47edd5bf604c76a20a130aa1cfee3 (diff)
downloadetbsa-traccar-web-7f290bf996e6a91b1c5d2b5d74318f9c7a246d75.tar.gz
etbsa-traccar-web-7f290bf996e6a91b1c5d2b5d74318f9c7a246d75.tar.bz2
etbsa-traccar-web-7f290bf996e6a91b1c5d2b5d74318f9c7a246d75.zip
Optimize calendar load
Diffstat (limited to 'web/app')
-rw-r--r--web/app/view/dialog/CalendarController.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/app/view/dialog/CalendarController.js b/web/app/view/dialog/CalendarController.js
index 54dc7a3..fb8cbff 100644
--- a/web/app/view/dialog/CalendarController.js
+++ b/web/app/view/dialog/CalendarController.js
@@ -26,12 +26,12 @@ Ext.define('Traccar.view.dialog.CalendarController', {
reader = new FileReader();
reader.onload = function (event) {
fileField.up('window').lookupReference('dataField').setValue(
- btoa(String.fromCharCode.apply(null, new Uint8Array(event.target.result))));
+ event.target.result.substr(event.target.result.indexOf(',') + 1));
};
reader.onerror = function (event) {
Traccar.app.showError(event.target.error);
};
- reader.readAsArrayBuffer(fileField.fileInputEl.dom.files[0]);
+ reader.readAsDataURL(fileField.fileInputEl.dom.files[0]);
}
}
});