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:
parent
35e2b2d20d
commit
da38029ee7
|
@ -6,4 +6,12 @@ window.onload = () => {
|
||||||
document.getElementById('file-input').addEventListener('change', () => {
|
document.getElementById('file-input').addEventListener('change', () => {
|
||||||
document.getElementById('upload-form').submit();
|
document.getElementById('upload-form').submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".table").DataTable({
|
||||||
|
"paging": false,
|
||||||
|
"ordering": true,
|
||||||
|
"order": [[ 3, "desc" ]],
|
||||||
|
"info": false,
|
||||||
|
"dom": "t",
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,17 +5,6 @@
|
||||||
<title>Upload Multidata</title>
|
<title>Upload Multidata</title>
|
||||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("uploads.css") }}" />
|
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("uploads.css") }}" />
|
||||||
<script type="application/ecmascript" src="{{ static_autoversion("uploads.js") }}"></script>
|
<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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
Loading…
Reference in New Issue