1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Blog: 2014-01-24 - JS Bin updates

This commit is contained in:
Allan Jardine 2014-01-31 13:25:55 +00:00
parent cea15987d3
commit 61e23fb2fb
3 changed files with 22 additions and 2 deletions

View File

@ -1 +1 @@
75b9c2a7f105519aa810cf28e65d23bdd494ced9
17650e654f3067856f042b94df4df75d249f6176

View File

@ -354,6 +354,15 @@ table.dataTable td {
.dataTables_wrapper .dataTables_scroll {
clear: both;
}
.dataTables_wrapper .dataTables_scroll table.no-footer {
margin-bottom: 0;
}
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollHead table.no-footer {
border-bottom: none;
}
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody table.no-footer {
margin-bottom: 0.5em;
}
.dataTables_wrapper .dataTables_scrollBody {
*margin-top: -1px;
-webkit-overflow-scrolling: touch;

View File

@ -3337,6 +3337,17 @@
return !s ? null : _fnStringToCss( s );
};
// This is fairly messy, but with x scrolling enabled, if the table has a
// width attribute, regardless of any width applied using the column width
// options, the browser will shrink or grow the table as needed to fit into
// that 100%. That would make the width options useless. So we remove it.
// This is okay, under the assumption that width:100% is applied to the
// table in CSS (it is in the default stylesheet) which will set the table
// width as appropriate (the attribute and css behave differently...)
if ( scroll.sX && table.attr('width') === '100%' ) {
table.removeAttr('width');
}
if ( ! footer.length ) {
footer = null;
}
@ -3937,7 +3948,7 @@
// allows the table sizing to automatically adjust when the window is
// resized. Use the width attr rather than CSS, since we can't know if the
// CSS is a relative value or absolute - DOM read is always px.
if ( tableWidthAttr ) {
if ( tableWidthAttr || scrollX ) {
table.style.width = _fnStringToCss( tableWidthAttr );
if ( ! oSettings._reszEvt ) {