I modified the location where the pager creates new <td> elements by first asking whether the data contains a td element and if it does, use that instead, this allows the ajax callback to output a fully rendered table with td elements already created, the callback to obtain those elements and just rebuild the columns using those elements, with all the required classnames, attributes, etc.

This commit is contained in:
Christopher Thomas 2013-11-24 21:00:25 +01:00
parent 0e3d8eeff6
commit d1f70cc522

View File

@ -279,7 +279,11 @@
tds += '<tr>';
for ( j = 0; j < d[i].length; j++ ) {
// build tbody cells
tds += '<td>' + d[i][j] + '</td>';
var temp = $("<td>").html(d[i][j]);
var inner = temp.find("td");
temp = inner.length ? inner : temp.wrap("<div>").parent();
tds += temp.wrap("<div>").parent().html();
}
tds += '</tr>';
}