This commit is contained in:
@@ -94,7 +94,10 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
if (!window.jQuery || !window.jQuery.fn || !window.jQuery.fn.DataTable) return;
|
||||
|
||||
const $ = window.jQuery;
|
||||
const table = $('#movementsTable').DataTable({
|
||||
pageLength: 100,
|
||||
order: [[1, 'desc']], // 0=checkbox, 1=ID
|
||||
@@ -199,9 +202,9 @@
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// jQuery-free fallback: enables bulk delete buttons and single delete
|
||||
// Fallback when DataTables/jQuery are not present: enables bulk delete buttons and single delete.
|
||||
(function(){
|
||||
if (window.jQuery) return; // jQuery path already binds everything
|
||||
if (window.jQuery && window.jQuery.fn && window.jQuery.fn.DataTable) return;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
function qsa(sel, root){ return Array.prototype.slice.call((root||document).querySelectorAll(sel)); }
|
||||
|
||||
Reference in New Issue
Block a user