mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-15 16:58:42 +00:00
Only sort table tbody - bug fix
This commit is contained in:
parent
3081f667f7
commit
a56f7dbad4
|
|
@ -98,7 +98,7 @@
|
||||||
jsOMS.preventAll(event);
|
jsOMS.preventAll(event);
|
||||||
|
|
||||||
const table = document.getElementById(id),
|
const table = document.getElementById(id),
|
||||||
rows = table.rows,
|
rows = table.getElementsByTagName('tbody')[0].rows,
|
||||||
rowLength = rows.length,
|
rowLength = rows.length,
|
||||||
cellId = this.closest('td').cellIndex;
|
cellId = this.closest('td').cellIndex;
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@
|
||||||
do {
|
do {
|
||||||
order = false;
|
order = false;
|
||||||
|
|
||||||
for (j = 1; j < rowLength - 1; ++j) {
|
for (j = 0; j < rowLength - 1; ++j) {
|
||||||
shouldSwitch = false;
|
shouldSwitch = false;
|
||||||
row1 = rows[j].getElementsByTagName('td')[cellId];
|
row1 = rows[j].getElementsByTagName('td')[cellId];
|
||||||
row2 = rows[j + 1].getElementsByTagName('td')[cellId];
|
row2 = rows[j + 1].getElementsByTagName('td')[cellId];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user