some fiddling

integration-tests
Josha von Gizycki 6 years ago
parent 73be58fff3
commit 889bee9349

@ -41,10 +41,31 @@ document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.delete-btn').forEach(function(btn) {
btn.addEventListener('click', countdownDeleteButton)
})
function dynamicTables() {
const range = (x,y) =>
x > y ? [] : [x, ...range(x + 1, y)];
const pageSize = 50
const colsFromThead = thead =>
[...thead.children[0].children].map(th => th.innerText)
const visibleRows = page =>
range(page * pageSize, (page + 1) * pageSize - 1)
document.querySelectorAll('table').forEach(function(tbl) {
const thead = tbl.tHead
const tbody = tbl.tBodies[0]
const cols = colsFromThead(thead)
const rows = [...tbl.rows]
let page = 0
console.debug(visibleRows(1))
})
}
dynamicTables()
})
$(document).ready(function() {
return;
/*
$(document).ready(function() {
$('table').DataTable({
stateSave: true,
fixedHeader: true,
@ -56,4 +77,5 @@ $(document).ready(function() {
return JSON.parse(localStorage.getItem('DataTables'))
}
})
})
})
*/

Loading…
Cancel
Save