1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

Fix: Calculating the width of a table can be incorrect when the calculation table is hidden due to an issue with jQuery's

width/outerWidth calculation (http://bugs.jquery.com/ticket/9945). This is a bit of a work around to get the css value and check if it is
a percentage - this is not perfect (since other relative values aren't checked - although they are generally unlikely to be used), but it
is effective for most cases.
This commit is contained in:
Allan Jardine 2011-09-16 08:45:00 +01:00
parent 437ac29048
commit f175f3658e

View File

@ -1,6 +1,6 @@
/*
* File: jquery.dataTables.js
* Version: 1.8.2
* Version: 1.8.3.dev
* Description: Paginate, search and sort HTML tables
* Author: Allan Jardine (www.sprymedia.co.uk)
* Created: 28/3/2008
@ -67,7 +67,7 @@
* Notes: Allowed format is a.b.c.d.e where:
* a:int, b:int, c:int, d:string(dev|beta), e:int. d and e are optional
*/
_oExt.sVersion = "1.8.2";
_oExt.sVersion = "1.8.3.dev";
/*
* Variable: sErrMode
@ -5764,7 +5764,9 @@
}
}
oSettings.nTable.style.width = _fnStringToCss( $(nCalcTmp).outerWidth() );
var cssWidth = $(nCalcTmp).css('width');
oSettings.nTable.style.width = (cssWidth.indexOf('%') !== -1) ?
cssWidth : _fnStringToCss( $(nCalcTmp).outerWidth() );
nCalcTmp.parentNode.removeChild( nCalcTmp );
}
}