Fix upload button doing nothing. Caused by script tag in head overriding window.onload, which was already declared in uploads.js

This commit is contained in:
Chris Wilson 2020-07-22 22:44:52 -04:00
parent 35e2b2d20d
commit da38029ee7
2 changed files with 8 additions and 11 deletions

View File

@ -6,4 +6,12 @@ window.onload = () => {
document.getElementById('file-input').addEventListener('change', () => {
document.getElementById('upload-form').submit();
});
$(".table").DataTable({
"paging": false,
"ordering": true,
"order": [[ 3, "desc" ]],
"info": false,
"dom": "t",
});
};

View File

@ -5,17 +5,6 @@
<title>Upload Multidata</title>
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("uploads.css") }}" />
<script type="application/ecmascript" src="{{ static_autoversion("uploads.js") }}"></script>
<script>
window.onload = () => {
let tables = $(".table").DataTable({
"paging": false,
"ordering": true,
"order": [[ 3, "desc" ]],
"info": false,
"dom": "t",
});
}
</script>
{% endblock %}
{% block body %}