annotate DataTables-1.9.4/media/src/api/api.internal.js @ 2:e8755431a0cd draft

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