From 0e974f27e69255458d04e51514b32c0f86002263 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Fri, 31 Jan 2014 13:22:42 +0000 Subject: [PATCH] Dev: Add the ability to get a settings object from an API instance --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 1b8f1468..f511d7d5 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -afe19cd214391b3408a6c0cb2c38163d71c183cc +5d76c047878c0b74ad3adc7a0d135cbbb10eb9b4 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 7782d68d..4dd4e547 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -6349,6 +6349,7 @@ * * `node` - `TABLE` node which has already been formed into a DataTable. * * `jQuery` - A jQuery object of `TABLE` nodes. * * `object` - DataTables settings object + * * `DataTables.Api` - API instance * @return {array|null} Matching DataTables settings objects. `null` or * `undefined` is returned if no matching DataTable is found. * @ignore @@ -6370,6 +6371,9 @@ idx = $.inArray( mixed, tables ); return idx !== -1 ? [ settings[idx] ] : null; } + else if ( mixed && typeof mixed.settings === 'function' ) { + return mixed.settings(); + } else if ( typeof mixed === 'string' ) { // jQuery selector jq = $(mixed);