From aaf86d565653d32dee759ba219e1d8c2cae1a41e Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 15 Nov 2022 17:07:58 +0100 Subject: [PATCH] Make number of rows "sticky" --- assets/js/sections/contesting.js | 1 + assets/js/sections/station_locations.js | 6 ++++-- assets/js/sections/station_logbooks.js | 10 +++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/assets/js/sections/contesting.js b/assets/js/sections/contesting.js index 6f9af9fb..ca546a0a 100644 --- a/assets/js/sections/contesting.js +++ b/assets/js/sections/contesting.js @@ -490,6 +490,7 @@ function restoreContestSession() { }); if (!$.fn.DataTable.isDataTable('.qsotable')) { $('.qsotable').DataTable({ + "stateSave": true, "pageLength": 25, responsive: false, "scrollY": "400px", diff --git a/assets/js/sections/station_locations.js b/assets/js/sections/station_locations.js index 508a57ad..b1798657 100644 --- a/assets/js/sections/station_locations.js +++ b/assets/js/sections/station_locations.js @@ -1,3 +1,5 @@ $(document).ready( function () { - $('#station_locations_table').DataTable(); -} ); \ No newline at end of file + $('#station_locations_table').DataTable({ + "stateSave": true + }); +} ); diff --git a/assets/js/sections/station_logbooks.js b/assets/js/sections/station_logbooks.js index 90294868..04de1df9 100644 --- a/assets/js/sections/station_logbooks.js +++ b/assets/js/sections/station_logbooks.js @@ -1,7 +1,11 @@ $(document).ready( function () { - $('#station_logbooks_table').DataTable(); + $('#station_logbooks_table').DataTable({ + "stateSave": true + }); } ); $(document).ready( function () { - $('#station_logbooks_linked_table').DataTable(); -} ); \ No newline at end of file + $('#station_logbooks_linked_table').DataTable({ + "stateSave": true + }); +} );