From 338b5e81cf92842e3153b47e720f37d96274e662 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 25 Jun 2013 08:27:49 +0100 Subject: [PATCH] New: columns().nodes() and column().nodes() methods - Previously there was columns().cells() and column().cells(), but these were removed in f0a73ce due to the changes for the new top level cell() and cells() selector methods. - This commit effectively re-instates those functions but under the `nodes()` name, matching the row and cell selection options. This is for completeness in the API. --- media/js/jquery.dataTables.js | 8 ++++++++ media/src/api/api.columns.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 718cf5e3..ad269f0f 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -7736,6 +7736,14 @@ } ); + _api.registerPlural( 'columns().nodes()', 'columns().nodes()', function () { + return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) { + return _pluck_order( settings.aoData, rows, 'anCells', column ) ; + } ); + } ); + + + _api.registerPlural( 'columns().visible()', 'column().visible()', function ( vis ) { return this.iterator( 'column', function ( settings, column ) { return _setColumnVis( settings, column, vis ); diff --git a/media/src/api/api.columns.js b/media/src/api/api.columns.js index 3a1efa79..5120d5a8 100644 --- a/media/src/api/api.columns.js +++ b/media/src/api/api.columns.js @@ -110,6 +110,14 @@ _api.registerPlural( 'columns().data()', 'column().data()', function () { } ); +_api.registerPlural( 'columns().nodes()', 'columns().nodes()', function () { + return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) { + return _pluck_order( settings.aoData, rows, 'anCells', column ) ; + } ); +} ); + + + _api.registerPlural( 'columns().visible()', 'column().visible()', function ( vis ) { return this.iterator( 'column', function ( settings, column ) { return _setColumnVis( settings, column, vis );