mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Core: use plain js to set index attr & remove unused variable. See #1048
This commit is contained in:
parent
23760ef2c3
commit
c317ded727
@ -1158,8 +1158,7 @@
|
|||||||
ts.computeColumnIndex = function(trs) {
|
ts.computeColumnIndex = function(trs) {
|
||||||
var i, j, k, l, $cell, cell, cells, rowIndex, cellId, rowSpan, colSpan, firstAvailCol,
|
var i, j, k, l, $cell, cell, cells, rowIndex, cellId, rowSpan, colSpan, firstAvailCol,
|
||||||
matrix = [],
|
matrix = [],
|
||||||
matrixrow = [],
|
matrixrow = [];
|
||||||
lookup = {};
|
|
||||||
for (i = 0; i < trs.length; i++) {
|
for (i = 0; i < trs.length; i++) {
|
||||||
cells = trs[i].cells;
|
cells = trs[i].cells;
|
||||||
for (j = 0; j < cells.length; j++) {
|
for (j = 0; j < cells.length; j++) {
|
||||||
@ -1179,9 +1178,9 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lookup[cellId] = firstAvailCol;
|
|
||||||
// add data-column
|
// add data-column
|
||||||
$cell.attr({ 'data-column' : firstAvailCol }); // 'data-row' : rowIndex
|
// $cell.attr({ 'data-column' : firstAvailCol });
|
||||||
|
$cell[0].setAttribute( 'data-column', firstAvailCol );
|
||||||
for (k = rowIndex; k < rowIndex + rowSpan; k++) {
|
for (k = rowIndex; k < rowIndex + rowSpan; k++) {
|
||||||
if (typeof matrix[k] === 'undefined') {
|
if (typeof matrix[k] === 'undefined') {
|
||||||
matrix[k] = [];
|
matrix[k] = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user