From da38029ee7fcf05c4769bbb9cf8953597084f898 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 22 Jul 2020 22:44:52 -0400 Subject: [PATCH] Fix upload button doing nothing. Caused by script tag in head overriding window.onload, which was already declared in uploads.js --- WebHostLib/static/uploads.js | 8 ++++++++ WebHostLib/templates/uploads.html | 11 ----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/WebHostLib/static/uploads.js b/WebHostLib/static/uploads.js index 4d51e276..61058117 100644 --- a/WebHostLib/static/uploads.js +++ b/WebHostLib/static/uploads.js @@ -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", + }); }; diff --git a/WebHostLib/templates/uploads.html b/WebHostLib/templates/uploads.html index 1089888c..f97c0a14 100644 --- a/WebHostLib/templates/uploads.html +++ b/WebHostLib/templates/uploads.html @@ -5,17 +5,6 @@ Upload Multidata - {% endblock %} {% block body %}