diff --git a/.datatables-commit-sync b/.datatables-commit-sync index a3f74ab5..6274ef69 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -a5ec3278bb4c799d750ce6301268be88a300e9b9 +d2937aa4bf198fc04533c0ed9e48dabeed4b967f diff --git a/media/css/jquery.dataTables.css b/media/css/jquery.dataTables.css index 9c710eda..b7806f1b 100644 --- a/media/css/jquery.dataTables.css +++ b/media/css/jquery.dataTables.css @@ -210,6 +210,10 @@ table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 { background-color: #a4b2cb; } +table.dataTable.no-footer { + border-bottom: 1px solid #111111; + margin-bottom: 0.5em; +} table.dataTable, table.dataTable th, diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index e0017ace..3f9d6861 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -1602,7 +1602,7 @@ if ( tfoot !== null ) { var cells = oSettings.aoFooter[0]; - for ( i=0, ien=columns.length ; i').appendTo(this); } oSettings.nTHead = thead[0]; var tbody = $(this).children('tbody'); if ( tbody.length === 0 ) { - tbody = [ document.createElement( 'tbody' ) ]; - this.appendChild( tbody[0] ); + tbody = $('').appendTo(this); } oSettings.nTBody = tbody[0]; @@ -6165,12 +6163,13 @@ { // If we are a scrolling table, and no footer has been given, then we need to create // a tfoot element for the caption element to be appended to - tfoot = [ document.createElement( 'tfoot' ) ]; - this.appendChild( tfoot[0] ); + tfoot = $('').appendTo(this); } - if ( tfoot.length > 0 ) - { + if ( tfoot.length === 0 || tfoot.children().length === 0 ) { + $(this).addClass( oSettings.oClasses.sNoFooter ); + } + else if ( tfoot.length > 0 ) { oSettings.nTFoot = tfoot[0]; _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot ); } @@ -13281,6 +13280,7 @@ $.extend( DataTable.ext.classes, { "sTable": "dataTable", + "sNoFooter": "no-footer", /* Paging buttons */ "sPageButton": "paginate_button",