removed debug statements

This commit is contained in:
tracer 2022-10-25 18:27:13 +02:00
parent 8e0a2ff6e8
commit 47439fe358
1 changed files with 0 additions and 13 deletions

View File

@ -78,11 +78,8 @@ function deleteAddress(id) {
}
function sortBy(column) {
console.log("sortby: " + column)
// switch direction on every call
let currentSortOrder = document.getElementById(column + '_sort')
let sortOrder = 0
if (currentSortOrder.innerHTML === 'asc') {
currentSortOrder.innerHTML = 'desc'
} else {
@ -93,11 +90,9 @@ function sortBy(column) {
let dirty = true;
// loop until clean
while (dirty) {
console.log('dirty', dirty)
// assume we are finished
dirty = false
const rows = table.rows;
console.log(rows)
for (let i = 1; i < (rows.length - 2); i++) {
let x = rows[i]
let rowXId = x.id
@ -109,9 +104,6 @@ function sortBy(column) {
let rowYNumber = rowYId.charAt(rowYId.length -1)
let valueY = document.getElementById(column + '_' + rowYNumber).value
console.log(valueX, valueY)
// mind asc & desc
let currentSortOrder = document.getElementById(column + '_sort')
let sortOrder = 0
if (currentSortOrder.innerHTML === 'asc') {
@ -119,12 +111,7 @@ function sortBy(column) {
} else {
sortOrder = -1
}
console.log("cs", currentSortOrder.innerHTML)
console.log(valueX.localeCompare(valueY))
if (valueX.localeCompare(valueY) === sortOrder) {
console.log('switch A')
// switch rows
x.parentNode.insertBefore(y, x);
dirty = true
}