Core & pager: use detach instead of empty on tbody rows

This commit is contained in:
Mottie 2014-05-08 12:07:13 -05:00
parent acefd269f9
commit 9c0017d44e
3 changed files with 5 additions and 5 deletions

View File

@ -289,7 +289,7 @@
exception === 'timeout' ? 'Time out error' :
exception === 'abort' ? 'Ajax Request aborted' :
'Uncaught error: ' + xhr.statusText + ' [' + xhr.status + ']' );
c.$tbodies.eq(0).empty();
c.$tbodies.eq(0).detach();
p.totalRows = 0;
} else {
// process ajax object
@ -311,7 +311,7 @@
if (d instanceof jQuery) {
if (p.processAjaxOnInit) {
// append jQuery object
c.$tbodies.eq(0).empty().append(d);
c.$tbodies.eq(0).detach().append(d);
}
} else if (l) {
// build table from array

View File

@ -1136,7 +1136,7 @@
};
ts.clearTableBody = function(table) {
$(table)[0].config.$tbodies.empty();
$(table)[0].config.$tbodies.detach();
};
ts.bindEvents = function(table, $headers, core){

View File

@ -486,7 +486,7 @@ tsp = ts.pager = {
ts.log('Ajax Error', xhr, exception);
}
ts.showError(table, exception.message + ' (' + xhr.status + ')');
c.$tbodies.eq(0).empty();
c.$tbodies.eq(0).detach();
p.totalRows = 0;
} else {
// process ajax object
@ -508,7 +508,7 @@ tsp = ts.pager = {
if (d instanceof jQuery) {
if (wo.pager_processAjaxOnInit) {
// append jQuery object
c.$tbodies.eq(0).empty().append(d);
c.$tbodies.eq(0).detach().append(d);
}
} else if (l) {
// build table from array