From 90599e45a65537ff6ee2115e166ee48d70080ed8 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 12 Nov 2013 19:16:15 +0000 Subject: [PATCH] Docs: Further documentation of the options DataTables has available --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 6731464a..03a426e1 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -f36773920884cfe0f05fbf81c132d0133f5d23dd +557aea23dadeda1dcd92743f395dd1c9de74d98b diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 10489882..16fdcb5f 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -7679,6 +7679,16 @@ } ); + /** + * + */ + _api_registerPlural( 'columns().footer()', 'column().footer()', function ( selector, opts ) { + return this.iterator( 'column', function ( settings, column ) { + return settings.aoColumns[column].nTf; + } ); + } ); + + /** * */ @@ -9243,7 +9253,7 @@ * @example * $(document).ready( function() { * $('#example').dataTable( { - * "ajaxSource": "sources/arrays.txt", + * "ajax": "sources/arrays.txt", * "deferRender": true * } ); * } ); @@ -9465,7 +9475,7 @@ /** * Configure DataTables to use server-side processing. Note that the - * `ajaxSource` parameter must also be given in order to give DataTables a + * `ajax` parameter must also be given in order to give DataTables a * source to obtain the required data for each draw. * @type boolean * @default false @@ -9631,7 +9641,7 @@ * @example * $(document).ready( function() { * $('#example').dataTable( { - * "fnDrawCallback": function( settings ) { + * "drawCallback": function( settings ) { * alert( 'DataTables has redrawn the table' ); * } * } ); @@ -9642,7 +9652,7 @@ /** * Identical to fnHeaderCallback() but for the table footer this function - * allows you to modify the table footer on every 'draw' even. + * allows you to modify the table footer on every 'draw' event. * @type function * @param {node} foot "TR" element for the footer * @param {array} data Full table data (as derived from the original HTML) @@ -9659,8 +9669,8 @@ * @example * $(document).ready( function() { * $('#example').dataTable( { - * "footerCallback": function( foot, data, start, end, display ) { - * foot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+start; + * "footerCallback": function( tfoot, data, start, end, display ) { + * tfoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+start; * } * } ); * } ) @@ -9754,7 +9764,7 @@ * * @example * $('#example').dataTable( { - * "infoCallback": function( settings, start, end, nax, total, pre ) { + * "infoCallback": function( settings, start, end, max, total, pre ) { * return start +" to "+ end; * } * } );