Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions assets/src/js/functions/datatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<i class="fa fa-spinner fa-spin fa-2x"></i>',
}),
autoWidth: true,
dom: "ti",
serverSide: true,
Expand Down Expand Up @@ -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();
}
});
}
});
}
Expand Down