From a06be640a46635e371f1a0b0c250ce8e520cbff7 Mon Sep 17 00:00:00 2001 From: Joel Addison Date: Mon, 14 Oct 2019 22:28:41 +1000 Subject: [PATCH] Update registration report data tables Use latest version of DataTables CSS and JS. Change to Bootstrap 4 styles for DataTables. --- pinaxcon/templates/registrasion/report.html | 57 ++++++++++++--------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/pinaxcon/templates/registrasion/report.html b/pinaxcon/templates/registrasion/report.html index 79beb41d..7a4dcda0 100644 --- a/pinaxcon/templates/registrasion/report.html +++ b/pinaxcon/templates/registrasion/report.html @@ -25,7 +25,7 @@ {% if report.headings %} {% else %} -
+
{% endif %} @@ -47,32 +47,43 @@
-
+
{% endfor %} {% endblock %} {% block extra_script %} - - - - + + + + + + + $("table.table-reportdata").dataTable({ + "dom": + "<'row'<'col-sm-12 col-md-3'l><'col-sm-12 col-md-5'B><'col-sm-12 col-md-4'f>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + "stateSave": true, + "lengthMenu": [[10, 50, 100, -1], [10, 50, 100, "All"]], + "pageLength": 100, + "buttons": [ + "csv", + "print", + { + extend: 'copy', + text: 'Copy', + exportOptions: { + columns: ':visible' + } + }, + { + extend: 'collection', + text: 'Columns', + buttons: [ 'columnsToggle'] + } + ] + }); + {% endblock %}