From 84d74fab778362829af0f0f8d096e3124f5dfbde Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 19 Dec 2020 19:29:33 +0100 Subject: [PATCH] use sortable table on Roll Results page (cherry picked from commit 32d8f33932d913154989e41c940ba24adc98a881) --- WebHostLib/static/assets/autodatatable.js | 9 +++++++++ WebHostLib/templates/autotablepage.html | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 WebHostLib/static/assets/autodatatable.js create mode 100644 WebHostLib/templates/autotablepage.html diff --git a/WebHostLib/static/assets/autodatatable.js b/WebHostLib/static/assets/autodatatable.js new file mode 100644 index 00000000..a1437514 --- /dev/null +++ b/WebHostLib/static/assets/autodatatable.js @@ -0,0 +1,9 @@ +window.addEventListener('load', () => { + let tables = $(".autodatatable").DataTable({ + "paging": false, + "ordering": true, + "info": false, + "dom": "t", + }); + console.log(tables); +}); diff --git a/WebHostLib/templates/autotablepage.html b/WebHostLib/templates/autotablepage.html new file mode 100644 index 00000000..0bb30f87 --- /dev/null +++ b/WebHostLib/templates/autotablepage.html @@ -0,0 +1,5 @@ +{% extends "tablepage.html" %} +{% block head %} + {{ super() }} + +{% endblock %}