From 4c55754d36ca33647ca996e0396f21c7137dc673 Mon Sep 17 00:00:00 2001 From: Andrea Bruno <21980406+Andrea-Bruno@users.noreply.github.com> Date: Mon, 12 Oct 2026 00:01:12 +0200 Subject: [PATCH] Use the DataTables processing indicator with a FontAwesome spinner The tables showed a separate loader pinned to the bottom-right corner while results were loading. The DataTables library already provides a processing slot that is shown and hidden on its own, so the corner loader and its manual show/hide handlers are dropped in favour of that slot, filled with a FontAwesome spinner. --- assets/src/js/functions/datatables.js | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/assets/src/js/functions/datatables.js b/assets/src/js/functions/datatables.js index bdf6a6d62..f948f1754 100755 --- a/assets/src/js/functions/datatables.js +++ b/assets/src/js/functions/datatables.js @@ -66,12 +66,12 @@ function start_datatables( $elements ) { }); }); - $this.on('preInit.dt', function (ev, settings) { - $('#mini-loader').show(); - }); - - const table = $this.DataTable({ - language: globals.translations.datatables, + $this.DataTable({ + language: Object.assign({}, globals.translations.datatables, { + // Use the DataTables built-in processing slot with a FontAwesome + // spinner instead of the corner loader. + processing: '', + }), autoWidth: true, dom: "ti", serverSide: true, @@ -117,14 +117,6 @@ function start_datatables( $elements ) { drawCallback: drawCallback, footerCallback: footerCallback, }); - - table.on('processing.dt', function (e, settings, processing) { - if (processing) { - $('#mini-loader').show(); - } else { - $('#mini-loader').hide(); - } - }); } }); }