Original <table> classes are not overridden anymore

master
Frédéric Camblor 2012-02-26 03:00:45 +01:00
parent 8ac7bc7c41
commit fbbf58cb70
1 changed files with 13 additions and 2 deletions

View File

@ -85,6 +85,7 @@
$temp, $temp,
tfootHeight = 0; tfootHeight = 0;
settings.originalTable = $(this).clone();
settings.includePadding = helpers._isPaddingIncludedWithWidth(); settings.includePadding = helpers._isPaddingIncludedWithWidth();
settings.scrollbarOffset = helpers._getScrollbarWidth(); settings.scrollbarOffset = helpers._getScrollbarWidth();
settings.themeClassName = settings.themeClass; settings.themeClassName = settings.themeClass;
@ -138,6 +139,8 @@
$divHead = $('<div class="fht-thead"><table class="fht-table"></table></div>').prependTo($wrapper); $divHead = $('<div class="fht-thead"><table class="fht-table"></table></div>').prependTo($wrapper);
} }
$divHead.find('table.fht-table').addClass(settings.originalTable.attr('class'));
$thead.clone().appendTo($divHead.find('table')); $thead.clone().appendTo($divHead.find('table'));
} else { } else {
$divHead = $wrapper.find('div.fht-thead'); $divHead = $wrapper.find('div.fht-thead');
@ -410,6 +413,10 @@
fixedBodyHeight = $fixedBody.find('.fht-tbody').height() - settings.scrollbarOffset, fixedBodyHeight = $fixedBody.find('.fht-tbody').height() - settings.scrollbarOffset,
$newRow; $newRow;
$thead.find('table.fht-table').addClass(settings.originalTable.attr('class'));
$tbody.find('table.fht-table').addClass(settings.originalTable.attr('class'));
$tfoot.find('table.fht-table').addClass(settings.originalTable.attr('class'));
// Fix cell heights // Fix cell heights
helpers._fixHeightWithCss( $firstThChild, tableProps ); helpers._fixHeightWithCss( $firstThChild, tableProps );
helpers._fixWidthWithCss( $firstThChild, tableProps ); helpers._fixWidthWithCss( $firstThChild, tableProps );
@ -486,6 +493,8 @@
} else { } else {
$divFoot = $('<div class="fht-tfoot"><table class="fht-table"></table></div>').appendTo($wrapper); $divFoot = $('<div class="fht-tfoot"><table class="fht-table"></table></div>').appendTo($wrapper);
} }
$divFoot.find('table.fht-table').addClass(settings.originalTable.attr('class'));
} }
switch (true) { switch (true) {
@ -593,6 +602,8 @@
defaultHeight, defaultHeight,
newHeight; newHeight;
$obj.addClass(settings.originalTable.attr('class'));
$obj.appendTo('body'); $obj.appendTo('body');
defaultHeight = $obj.find('td').height(); defaultHeight = $obj.find('td').height();