mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Merge pull request #91 from timtucker/patch-7
Update media/src/core/core.scrolling.js
This commit is contained in:
commit
95381359ed
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add any control elements for the table - specifically scrolling
|
* Add any control elements for the table - specifically scrolling
|
||||||
* @param {object} oSettings dataTables settings object
|
* @param {object} oSettings dataTables settings object
|
||||||
@ -194,7 +193,7 @@ function _fnScrollDraw ( o )
|
|||||||
nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null,
|
nScrollFootInner = (o.nTFoot !== null) ? o.nScrollFoot.getElementsByTagName('div')[0] : null,
|
||||||
nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null,
|
nScrollFootTable = (o.nTFoot !== null) ? nScrollFootInner.getElementsByTagName('table')[0] : null,
|
||||||
ie67 = o.oBrowser.bScrollOversize,
|
ie67 = o.oBrowser.bScrollOversize,
|
||||||
zeroOut = function(nSizer, nToSize) {
|
zeroOut = function(nSizer) {
|
||||||
oStyle = nSizer.style;
|
oStyle = nSizer.style;
|
||||||
oStyle.paddingTop = "0";
|
oStyle.paddingTop = "0";
|
||||||
oStyle.paddingBottom = "0";
|
oStyle.paddingBottom = "0";
|
||||||
@ -312,19 +311,19 @@ function _fnScrollDraw ( o )
|
|||||||
|
|
||||||
// Apply all styles in one pass. Invalidates layout only once because we don't read any
|
// Apply all styles in one pass. Invalidates layout only once because we don't read any
|
||||||
// DOM properties.
|
// DOM properties.
|
||||||
_fnApplyToChildren( zeroOut, anHeadSizers, anHeadToSize );
|
_fnApplyToChildren( zeroOut, anHeadSizers );
|
||||||
|
|
||||||
// Read all widths in next pass. Forces layout only once because we do not change
|
// Read all widths in next pass. Forces layout only once because we do not change
|
||||||
// any DOM properties.
|
// any DOM properties.
|
||||||
_fnApplyToChildren( function(nSizer, nToSize) {
|
_fnApplyToChildren( function(nSizer) {
|
||||||
aApplied.push( _fnStringToCss( $(nSizer).width() ) );
|
aApplied.push( _fnStringToCss( $(nSizer).width() ) );
|
||||||
}, anHeadSizers, anHeadToSize );
|
}, anHeadSizers );
|
||||||
|
|
||||||
// Apply all widths in final pass. Invalidates layout only once because we do not
|
// Apply all widths in final pass. Invalidates layout only once because we do not
|
||||||
// read any DOM properties.
|
// read any DOM properties.
|
||||||
_fnApplyToChildren( function(nSizer, nToSize, i) {
|
_fnApplyToChildren( function(nToSize, i) {
|
||||||
nToSize.style.width = aApplied[i];
|
nToSize.style.width = aApplied[i];
|
||||||
}, anHeadSizers, anHeadToSize );
|
}, anHeadToSize );
|
||||||
|
|
||||||
$(anHeadSizers).height(0);
|
$(anHeadSizers).height(0);
|
||||||
|
|
||||||
@ -334,15 +333,15 @@ function _fnScrollDraw ( o )
|
|||||||
anFootSizers = nTfootSize.getElementsByTagName('tr');
|
anFootSizers = nTfootSize.getElementsByTagName('tr');
|
||||||
anFootToSize = o.nTFoot.getElementsByTagName('tr');
|
anFootToSize = o.nTFoot.getElementsByTagName('tr');
|
||||||
|
|
||||||
_fnApplyToChildren( zeroOut, anFootSizers, anFootToSize );
|
_fnApplyToChildren( zeroOut, anFootSizers );
|
||||||
|
|
||||||
_fnApplyToChildren( function(nSizer, nToSize) {
|
_fnApplyToChildren( function(nSizer) {
|
||||||
aAppliedFooter.push( _fnStringToCss( $(nSizer).width() ) );
|
aAppliedFooter.push( _fnStringToCss( $(nSizer).width() ) );
|
||||||
}, anFootSizers, anFootToSize );
|
}, anFootSizers );
|
||||||
|
|
||||||
_fnApplyToChildren( function(nSizer, nToSize, i) {
|
_fnApplyToChildren( function(nToSize, i) {
|
||||||
nToSize.style.width = aAppliedFooter[i];
|
nToSize.style.width = aAppliedFooter[i];
|
||||||
}, anFootSizers, anFootToSize );
|
}, anFootToSize );
|
||||||
|
|
||||||
$(anFootSizers).height(0);
|
$(anFootSizers).height(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user