This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2024-01-15 20:14:33 -07:00
parent be865b3692
commit 58c8b56f17

View File

@@ -1682,7 +1682,7 @@ function loadsortadscroll() {
} }
} }
console.log({ tipodato }) //console.log({ tipodato })
tthis.closest('tr').addClass('tsorterblock'); tthis.closest('tr').addClass('tsorterblock');
setTimeout( setTimeout(
function () { function () {
@@ -1897,22 +1897,14 @@ function loadsortadscroll() {
var texto = null; var texto = null;
var texton = 0; var texton = 0;
if (tdtexto && tdtexto.length > index) { if (tdtexto && tdtexto.length > index) {
texto = $(tdtexto[index]).data('order'); texton = Number($(tdtexto[index]).data('order'));
if (texto.length > 0) {
var vnum = texto.replace("$", "").replace("%", "").replace("-", "").replace("(", "").replace(")", "").replace(re, "").trim();
if (vnum.length > 0) {
if ($.isNumeric(vnum)) {
texton = Number(vnum);
}
}
}
} else { } else {
texto = null; texto = null;
} }
return { index: i, value: texton, obj: el }; return { index: i, value: texton, obj: el };
}); });
console.log(mapped) //console.log(mapped)
mapped.sort(function (a, b) { mapped.sort(function (a, b) {
return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador; return (+(a.value > b.value) || +(a.value === b.value) - 1) * multiplicador;
}); });