0
|
1
|
|
2 /*
|
|
3 * This is really a good bit rubbish this method of exposing the internal methods
|
|
4 * publicly... - To be fixed in 2.0 using methods on the prototype
|
|
5 */
|
|
6
|
|
7
|
|
8 /**
|
|
9 * Create a wrapper function for exporting an internal functions to an external API.
|
|
10 * @param {string} sFunc API function name
|
|
11 * @returns {function} wrapped function
|
|
12 * @memberof DataTable#oApi
|
|
13 */
|
|
14 function _fnExternApiFunc (sFunc)
|
|
15 {
|
|
16 return function() {
|
|
17 var aArgs = [_fnSettingsFromNode(this[DataTable.ext.iApiIndex])].concat(
|
|
18 Array.prototype.slice.call(arguments) );
|
|
19 return DataTable.ext.oApi[sFunc].apply( this, aArgs );
|
|
20 };
|
|
21 }
|
|
22
|
|
23
|
|
24 /**
|
|
25 * Reference to internal functions for use by plug-in developers. Note that these
|
|
26 * methods are references to internal functions and are considered to be private.
|
|
27 * If you use these methods, be aware that they are liable to change between versions
|
|
28 * (check the upgrade notes).
|
|
29 * @namespace
|
|
30 */
|
|
31 this.oApi = {
|
|
32 "_fnExternApiFunc": _fnExternApiFunc,
|
|
33 "_fnInitialise": _fnInitialise,
|
|
34 "_fnInitComplete": _fnInitComplete,
|
|
35 "_fnLanguageCompat": _fnLanguageCompat,
|
|
36 "_fnAddColumn": _fnAddColumn,
|
|
37 "_fnColumnOptions": _fnColumnOptions,
|
|
38 "_fnAddData": _fnAddData,
|
|
39 "_fnCreateTr": _fnCreateTr,
|
|
40 "_fnGatherData": _fnGatherData,
|
|
41 "_fnBuildHead": _fnBuildHead,
|
|
42 "_fnDrawHead": _fnDrawHead,
|
|
43 "_fnDraw": _fnDraw,
|
|
44 "_fnReDraw": _fnReDraw,
|
|
45 "_fnAjaxUpdate": _fnAjaxUpdate,
|
|
46 "_fnAjaxParameters": _fnAjaxParameters,
|
|
47 "_fnAjaxUpdateDraw": _fnAjaxUpdateDraw,
|
|
48 "_fnServerParams": _fnServerParams,
|
|
49 "_fnAddOptionsHtml": _fnAddOptionsHtml,
|
|
50 "_fnFeatureHtmlTable": _fnFeatureHtmlTable,
|
|
51 "_fnScrollDraw": _fnScrollDraw,
|
|
52 "_fnAdjustColumnSizing": _fnAdjustColumnSizing,
|
|
53 "_fnFeatureHtmlFilter": _fnFeatureHtmlFilter,
|
|
54 "_fnFilterComplete": _fnFilterComplete,
|
|
55 "_fnFilterCustom": _fnFilterCustom,
|
|
56 "_fnFilterColumn": _fnFilterColumn,
|
|
57 "_fnFilter": _fnFilter,
|
|
58 "_fnBuildSearchArray": _fnBuildSearchArray,
|
|
59 "_fnBuildSearchRow": _fnBuildSearchRow,
|
|
60 "_fnFilterCreateSearch": _fnFilterCreateSearch,
|
|
61 "_fnDataToSearch": _fnDataToSearch,
|
|
62 "_fnSort": _fnSort,
|
|
63 "_fnSortAttachListener": _fnSortAttachListener,
|
|
64 "_fnSortingClasses": _fnSortingClasses,
|
|
65 "_fnFeatureHtmlPaginate": _fnFeatureHtmlPaginate,
|
|
66 "_fnPageChange": _fnPageChange,
|
|
67 "_fnFeatureHtmlInfo": _fnFeatureHtmlInfo,
|
|
68 "_fnUpdateInfo": _fnUpdateInfo,
|
|
69 "_fnFeatureHtmlLength": _fnFeatureHtmlLength,
|
|
70 "_fnFeatureHtmlProcessing": _fnFeatureHtmlProcessing,
|
|
71 "_fnProcessingDisplay": _fnProcessingDisplay,
|
|
72 "_fnVisibleToColumnIndex": _fnVisibleToColumnIndex,
|
|
73 "_fnColumnIndexToVisible": _fnColumnIndexToVisible,
|
|
74 "_fnNodeToDataIndex": _fnNodeToDataIndex,
|
|
75 "_fnVisbleColumns": _fnVisbleColumns,
|
|
76 "_fnCalculateEnd": _fnCalculateEnd,
|
|
77 "_fnConvertToWidth": _fnConvertToWidth,
|
|
78 "_fnCalculateColumnWidths": _fnCalculateColumnWidths,
|
|
79 "_fnScrollingWidthAdjust": _fnScrollingWidthAdjust,
|
|
80 "_fnGetWidestNode": _fnGetWidestNode,
|
|
81 "_fnGetMaxLenString": _fnGetMaxLenString,
|
|
82 "_fnStringToCss": _fnStringToCss,
|
|
83 "_fnDetectType": _fnDetectType,
|
|
84 "_fnSettingsFromNode": _fnSettingsFromNode,
|
|
85 "_fnGetDataMaster": _fnGetDataMaster,
|
|
86 "_fnGetTrNodes": _fnGetTrNodes,
|
|
87 "_fnGetTdNodes": _fnGetTdNodes,
|
|
88 "_fnEscapeRegex": _fnEscapeRegex,
|
|
89 "_fnDeleteIndex": _fnDeleteIndex,
|
|
90 "_fnReOrderIndex": _fnReOrderIndex,
|
|
91 "_fnColumnOrdering": _fnColumnOrdering,
|
|
92 "_fnLog": _fnLog,
|
|
93 "_fnClearTable": _fnClearTable,
|
|
94 "_fnSaveState": _fnSaveState,
|
|
95 "_fnLoadState": _fnLoadState,
|
|
96 "_fnCreateCookie": _fnCreateCookie,
|
|
97 "_fnReadCookie": _fnReadCookie,
|
|
98 "_fnDetectHeader": _fnDetectHeader,
|
|
99 "_fnGetUniqueThs": _fnGetUniqueThs,
|
|
100 "_fnScrollBarWidth": _fnScrollBarWidth,
|
|
101 "_fnApplyToChildren": _fnApplyToChildren,
|
|
102 "_fnMap": _fnMap,
|
|
103 "_fnGetRowData": _fnGetRowData,
|
|
104 "_fnGetCellData": _fnGetCellData,
|
|
105 "_fnSetCellData": _fnSetCellData,
|
|
106 "_fnGetObjectDataFn": _fnGetObjectDataFn,
|
|
107 "_fnSetObjectDataFn": _fnSetObjectDataFn,
|
|
108 "_fnApplyColumnDefs": _fnApplyColumnDefs,
|
|
109 "_fnBindAction": _fnBindAction,
|
|
110 "_fnExtend": _fnExtend,
|
|
111 "_fnCallbackReg": _fnCallbackReg,
|
|
112 "_fnCallbackFire": _fnCallbackFire,
|
|
113 "_fnJsonString": _fnJsonString,
|
|
114 "_fnRender": _fnRender,
|
|
115 "_fnNodeToColumnIndex": _fnNodeToColumnIndex,
|
|
116 "_fnInfoMacros": _fnInfoMacros,
|
|
117 "_fnBrowserDetect": _fnBrowserDetect,
|
|
118 "_fnGetColumns": _fnGetColumns
|
|
119 };
|
|
120
|
|
121 $.extend( DataTable.ext.oApi, this.oApi );
|
|
122
|
|
123 for ( var sFunc in DataTable.ext.oApi )
|
|
124 {
|
|
125 if ( sFunc )
|
|
126 {
|
|
127 this[sFunc] = _fnExternApiFunc(sFunc);
|
|
128 }
|
|
129 }
|
|
130
|