Initial checkin
This commit is contained in:
commit
d75eb444fc
4304 changed files with 369634 additions and 0 deletions
130
js/datatables/media/src/api/api.internal.js
Normal file
130
js/datatables/media/src/api/api.internal.js
Normal file
|
@ -0,0 +1,130 @@
|
|||
|
||||
/*
|
||||
* This is really a good bit rubbish this method of exposing the internal methods
|
||||
* publicly... - To be fixed in 2.0 using methods on the prototype
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Create a wrapper function for exporting an internal functions to an external API.
|
||||
* @param {string} sFunc API function name
|
||||
* @returns {function} wrapped function
|
||||
* @memberof DataTable#oApi
|
||||
*/
|
||||
function _fnExternApiFunc (sFunc)
|
||||
{
|
||||
return function() {
|
||||
var aArgs = [_fnSettingsFromNode(this[DataTable.ext.iApiIndex])].concat(
|
||||
Array.prototype.slice.call(arguments) );
|
||||
return DataTable.ext.oApi[sFunc].apply( this, aArgs );
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reference to internal functions for use by plug-in developers. Note that these
|
||||
* methods are references to internal functions and are considered to be private.
|
||||
* If you use these methods, be aware that they are liable to change between versions
|
||||
* (check the upgrade notes).
|
||||
* @namespace
|
||||
*/
|
||||
this.oApi = {
|
||||
"_fnExternApiFunc": _fnExternApiFunc,
|
||||
"_fnInitialise": _fnInitialise,
|
||||
"_fnInitComplete": _fnInitComplete,
|
||||
"_fnLanguageCompat": _fnLanguageCompat,
|
||||
"_fnAddColumn": _fnAddColumn,
|
||||
"_fnColumnOptions": _fnColumnOptions,
|
||||
"_fnAddData": _fnAddData,
|
||||
"_fnCreateTr": _fnCreateTr,
|
||||
"_fnGatherData": _fnGatherData,
|
||||
"_fnBuildHead": _fnBuildHead,
|
||||
"_fnDrawHead": _fnDrawHead,
|
||||
"_fnDraw": _fnDraw,
|
||||
"_fnReDraw": _fnReDraw,
|
||||
"_fnAjaxUpdate": _fnAjaxUpdate,
|
||||
"_fnAjaxParameters": _fnAjaxParameters,
|
||||
"_fnAjaxUpdateDraw": _fnAjaxUpdateDraw,
|
||||
"_fnServerParams": _fnServerParams,
|
||||
"_fnAddOptionsHtml": _fnAddOptionsHtml,
|
||||
"_fnFeatureHtmlTable": _fnFeatureHtmlTable,
|
||||
"_fnScrollDraw": _fnScrollDraw,
|
||||
"_fnAdjustColumnSizing": _fnAdjustColumnSizing,
|
||||
"_fnFeatureHtmlFilter": _fnFeatureHtmlFilter,
|
||||
"_fnFilterComplete": _fnFilterComplete,
|
||||
"_fnFilterCustom": _fnFilterCustom,
|
||||
"_fnFilterColumn": _fnFilterColumn,
|
||||
"_fnFilter": _fnFilter,
|
||||
"_fnBuildSearchArray": _fnBuildSearchArray,
|
||||
"_fnBuildSearchRow": _fnBuildSearchRow,
|
||||
"_fnFilterCreateSearch": _fnFilterCreateSearch,
|
||||
"_fnDataToSearch": _fnDataToSearch,
|
||||
"_fnSort": _fnSort,
|
||||
"_fnSortAttachListener": _fnSortAttachListener,
|
||||
"_fnSortingClasses": _fnSortingClasses,
|
||||
"_fnFeatureHtmlPaginate": _fnFeatureHtmlPaginate,
|
||||
"_fnPageChange": _fnPageChange,
|
||||
"_fnFeatureHtmlInfo": _fnFeatureHtmlInfo,
|
||||
"_fnUpdateInfo": _fnUpdateInfo,
|
||||
"_fnFeatureHtmlLength": _fnFeatureHtmlLength,
|
||||
"_fnFeatureHtmlProcessing": _fnFeatureHtmlProcessing,
|
||||
"_fnProcessingDisplay": _fnProcessingDisplay,
|
||||
"_fnVisibleToColumnIndex": _fnVisibleToColumnIndex,
|
||||
"_fnColumnIndexToVisible": _fnColumnIndexToVisible,
|
||||
"_fnNodeToDataIndex": _fnNodeToDataIndex,
|
||||
"_fnVisbleColumns": _fnVisbleColumns,
|
||||
"_fnCalculateEnd": _fnCalculateEnd,
|
||||
"_fnConvertToWidth": _fnConvertToWidth,
|
||||
"_fnCalculateColumnWidths": _fnCalculateColumnWidths,
|
||||
"_fnScrollingWidthAdjust": _fnScrollingWidthAdjust,
|
||||
"_fnGetWidestNode": _fnGetWidestNode,
|
||||
"_fnGetMaxLenString": _fnGetMaxLenString,
|
||||
"_fnStringToCss": _fnStringToCss,
|
||||
"_fnDetectType": _fnDetectType,
|
||||
"_fnSettingsFromNode": _fnSettingsFromNode,
|
||||
"_fnGetDataMaster": _fnGetDataMaster,
|
||||
"_fnGetTrNodes": _fnGetTrNodes,
|
||||
"_fnGetTdNodes": _fnGetTdNodes,
|
||||
"_fnEscapeRegex": _fnEscapeRegex,
|
||||
"_fnDeleteIndex": _fnDeleteIndex,
|
||||
"_fnReOrderIndex": _fnReOrderIndex,
|
||||
"_fnColumnOrdering": _fnColumnOrdering,
|
||||
"_fnLog": _fnLog,
|
||||
"_fnClearTable": _fnClearTable,
|
||||
"_fnSaveState": _fnSaveState,
|
||||
"_fnLoadState": _fnLoadState,
|
||||
"_fnCreateCookie": _fnCreateCookie,
|
||||
"_fnReadCookie": _fnReadCookie,
|
||||
"_fnDetectHeader": _fnDetectHeader,
|
||||
"_fnGetUniqueThs": _fnGetUniqueThs,
|
||||
"_fnScrollBarWidth": _fnScrollBarWidth,
|
||||
"_fnApplyToChildren": _fnApplyToChildren,
|
||||
"_fnMap": _fnMap,
|
||||
"_fnGetRowData": _fnGetRowData,
|
||||
"_fnGetCellData": _fnGetCellData,
|
||||
"_fnSetCellData": _fnSetCellData,
|
||||
"_fnGetObjectDataFn": _fnGetObjectDataFn,
|
||||
"_fnSetObjectDataFn": _fnSetObjectDataFn,
|
||||
"_fnApplyColumnDefs": _fnApplyColumnDefs,
|
||||
"_fnBindAction": _fnBindAction,
|
||||
"_fnExtend": _fnExtend,
|
||||
"_fnCallbackReg": _fnCallbackReg,
|
||||
"_fnCallbackFire": _fnCallbackFire,
|
||||
"_fnJsonString": _fnJsonString,
|
||||
"_fnRender": _fnRender,
|
||||
"_fnNodeToColumnIndex": _fnNodeToColumnIndex,
|
||||
"_fnInfoMacros": _fnInfoMacros,
|
||||
"_fnBrowserDetect": _fnBrowserDetect,
|
||||
"_fnGetColumns": _fnGetColumns
|
||||
};
|
||||
|
||||
$.extend( DataTable.ext.oApi, this.oApi );
|
||||
|
||||
for ( var sFunc in DataTable.ext.oApi )
|
||||
{
|
||||
if ( sFunc )
|
||||
{
|
||||
this[sFunc] = _fnExternApiFunc(sFunc);
|
||||
}
|
||||
}
|
||||
|
1294
js/datatables/media/src/api/api.methods.js
Normal file
1294
js/datatables/media/src/api/api.methods.js
Normal file
File diff suppressed because it is too large
Load diff
98
js/datatables/media/src/api/api.static.js
Normal file
98
js/datatables/media/src/api/api.static.js
Normal file
|
@ -0,0 +1,98 @@
|
|||
|
||||
|
||||
/**
|
||||
* Provide a common method for plug-ins to check the version of DataTables being used, in order
|
||||
* to ensure compatibility.
|
||||
* @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
|
||||
* formats "X" and "X.Y" are also acceptable.
|
||||
* @returns {boolean} true if this version of DataTables is greater or equal to the required
|
||||
* version, or false if this version of DataTales is not suitable
|
||||
* @static
|
||||
* @dtopt API-Static
|
||||
*
|
||||
* @example
|
||||
* alert( $.fn.dataTable.fnVersionCheck( '1.9.0' ) );
|
||||
*/
|
||||
DataTable.fnVersionCheck = function( sVersion )
|
||||
{
|
||||
/* This is cheap, but effective */
|
||||
var fnZPad = function (Zpad, count)
|
||||
{
|
||||
while(Zpad.length < count) {
|
||||
Zpad += '0';
|
||||
}
|
||||
return Zpad;
|
||||
};
|
||||
var aThis = DataTable.ext.sVersion.split('.');
|
||||
var aThat = sVersion.split('.');
|
||||
var sThis = '', sThat = '';
|
||||
|
||||
for ( var i=0, iLen=aThat.length ; i<iLen ; i++ )
|
||||
{
|
||||
sThis += fnZPad( aThis[i], 3 );
|
||||
sThat += fnZPad( aThat[i], 3 );
|
||||
}
|
||||
|
||||
return parseInt(sThis, 10) >= parseInt(sThat, 10);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Check if a TABLE node is a DataTable table already or not.
|
||||
* @param {node} nTable The TABLE node to check if it is a DataTable or not (note that other
|
||||
* node types can be passed in, but will always return false).
|
||||
* @returns {boolean} true the table given is a DataTable, or false otherwise
|
||||
* @static
|
||||
* @dtopt API-Static
|
||||
*
|
||||
* @example
|
||||
* var ex = document.getElementById('example');
|
||||
* if ( ! $.fn.DataTable.fnIsDataTable( ex ) ) {
|
||||
* $(ex).dataTable();
|
||||
* }
|
||||
*/
|
||||
DataTable.fnIsDataTable = function ( nTable )
|
||||
{
|
||||
var o = DataTable.settings;
|
||||
|
||||
for ( var i=0 ; i<o.length ; i++ )
|
||||
{
|
||||
if ( o[i].nTable === nTable || o[i].nScrollHead === nTable || o[i].nScrollFoot === nTable )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get all DataTable tables that have been initialised - optionally you can select to
|
||||
* get only currently visible tables.
|
||||
* @param {boolean} [bVisible=false] Flag to indicate if you want all (default) or
|
||||
* visible tables only.
|
||||
* @returns {array} Array of TABLE nodes (not DataTable instances) which are DataTables
|
||||
* @static
|
||||
* @dtopt API-Static
|
||||
*
|
||||
* @example
|
||||
* var table = $.fn.dataTable.fnTables(true);
|
||||
* if ( table.length > 0 ) {
|
||||
* $(table).dataTable().fnAdjustColumnSizing();
|
||||
* }
|
||||
*/
|
||||
DataTable.fnTables = function ( bVisible )
|
||||
{
|
||||
var out = [];
|
||||
|
||||
jQuery.each( DataTable.settings, function (i, o) {
|
||||
if ( !bVisible || (bVisible === true && $(o.nTable).is(':visible')) )
|
||||
{
|
||||
out.push( o.nTable );
|
||||
}
|
||||
} );
|
||||
|
||||
return out;
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue