From 778eb2d90c07c65f6e5aaf0e036b781bfc77f6fe Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Mon, 3 Aug 2020 23:08:55 +0200 Subject: [PATCH] add global datatables configuration, fixes #525, fixes #572 --- src/static_src/js/bornhack.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/static_src/js/bornhack.js b/src/static_src/js/bornhack.js index 52736c10..a72f3167 100644 --- a/src/static_src/js/bornhack.js +++ b/src/static_src/js/bornhack.js @@ -12,8 +12,11 @@ $(document).ready(function(){ $.fn.dataTable.moment( "dddd, MMM Do, YYYY, HH:mm" ); // enable datatables for all tables on the page, - $('.datatable').DataTable(); - + $('.datatable').DataTable( { + "stateSave": true, + "pageLength": 100, + "lengthMenu": [ [10, 25, 50, 100, -1], [10, 25, 50, 100, "All"] ], + } ); } ); // function used in speakeravailability form tables to toggle background color