From e8e30c35e06dea5e5d58a54bb0b44c16079b0ada Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 27 Apr 2011 18:06:29 +0100 Subject: [PATCH] Dev change: Put nTf back into aoColumns - it's actually quite useful! It is not maniditory that there need be a cell for every column however - the footer is a lot more relaxed than the header --- media/js/jquery.dataTables.js | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 171996e1..abc8964f 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2525,7 +2525,8 @@ "fnGetData": null, "fnSetData": null, "sSortDataType": 'std', - "nTh": nTh ? nTh : document.createElement('th') + "nTh": nTh ? nTh : document.createElement('th'), + "nTf": null }; oSettings.aoColumns.push( oCol ); @@ -3025,6 +3026,19 @@ { $('>tr>th', oSettings.nTFoot).addClass( oSettings.oClasses.sFooterTH ); } + + /* Cache the footer elements */ + if ( oSettings.nTFoot !== null ) + { + var anCells = _fnGetUniqueThs( oSettings, null, oSettings.aoFooter ); + for ( i=0, iLen=oSettings.aoColumns.length ; i