|
|
|
@ -227,7 +227,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function flipSortDir(dir) {
|
|
|
|
|
return (dir || 'asc') == 'asc' ? 'desc' : 'asc'
|
|
|
|
|
return (dir || 'asc') === 'asc' ? 'desc' : 'asc'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function clearSortAttributes(tbl) {
|
|
|
|
@ -240,7 +240,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
|
console.debug(tbl, ix, event)
|
|
|
|
|
|
|
|
|
|
const sortDir = event.target.getAttribute('data-sort') || 'asc'
|
|
|
|
|
const sortMod = sortDir == 'asc' ? 1 : -1;
|
|
|
|
|
const sortMod = sortDir === 'asc' ? -1 : 1;
|
|
|
|
|
|
|
|
|
|
const rows = tblRows(tbl)
|
|
|
|
|
const newTbody = document.createElement('tbody')
|
|
|
|
|