From e2ac47b6752dcf9c21191b25360512ba2b8c7501 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 8 Dec 2011 10:53:22 +0000 Subject: [PATCH] Had broken API extension methods... There was a bit of confusion between oApi as an internal variable and as an external variable. This commit effectively brings them together - you can access the internal functions as regular API methods now - although that might not be a particularly good idea just yet - not to be documented until I'm happy with this. --- media/js/jquery.dataTables.js | 3 ++- media/src/api/api.internal.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index d45df778..1fbf1d2d 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -5894,7 +5894,7 @@ "_fnApplyColumnDefs": _fnApplyColumnDefs }; - DataTable.ext.oApi = this.oApi; + $.extend( DataTable.ext.oApi, this.oApi ); /** @@ -5920,6 +5920,7 @@ } } + var _that = this; return this.each(function() { diff --git a/media/src/api/api.internal.js b/media/src/api/api.internal.js index b74c1a59..2b949650 100644 --- a/media/src/api/api.internal.js +++ b/media/src/api/api.internal.js @@ -90,7 +90,7 @@ this.oApi = { "_fnApplyColumnDefs": _fnApplyColumnDefs }; -DataTable.ext.oApi = this.oApi; +$.extend( DataTable.ext.oApi, this.oApi ); /** @@ -115,3 +115,4 @@ for ( var sFunc in DataTable.ext.oApi ) this[sFunc] = _fnExternApiFunc(sFunc); } } +