admin/public/js/plugins/dataTables/jquery.dataTables.js
function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
	{
		var i, iLen, j, jLen, k, kLen, def;
	
		// Column definitions with aTargets
		if ( aoColDefs )
		{
			/* Loop over the definitions array - loop in reverse so first instance has priority */
			for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
			{
				def = aoColDefs[i];
	
				/* Each definition can target multiple columns, as it is an array */
				var aTargets = def.targets !== undefined ?
					def.targets :
					def.aTargets;
	
				if ( ! $.isArray( aTargets ) )
				{
					aTargets = [ aTargets ];
				}
	
				for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
				{
					if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
					{
						/* Add columns that we don't yet know about */
						while( oSettings.aoColumns.length <= aTargets[j] )
						{
							_fnAddColumn( oSettings );
						}
	
						/* Integer, basic index */
						fn( aTargets[j], def );
					}
					else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
					{
						/* Negative integer, right to left column counting */
						fn( oSettings.aoColumns.length+aTargets[j], def );
					}
					else if ( typeof aTargets[j] === 'string' )
					{
						/* Class name matching on TH element */
						for ( k=0, kLen=oSettings.aoColumns.length ; k<kLen ; k++ )
						{
							if ( aTargets[j] == "_all" ||
							     $(oSettings.aoColumns[k].nTh).hasClass( aTargets[j] ) )
							{
								fn( k, def );
							}
						}
					}
				}
			}
		}
	
		// Statically defined columns array
		if ( aoCols )
		{
			for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
			{
				fn( i, aoCols[i] );
			}
		}
	}
function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
	{
		var i, iLen, j, jLen, k, kLen, def;
	
		// Column definitions with aTargets
		if ( aoColDefs )
		{
			/* Loop over the definitions array - loop in reverse so first instance has priority */
			for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
			{
				def = aoColDefs[i];
	
				/* Each definition can target multiple columns, as it is an array */
				var aTargets = def.targets !== undefined ?
					def.targets :
					def.aTargets;
	
				if ( ! $.isArray( aTargets ) )
				{
					aTargets = [ aTargets ];
				}
	
				for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
				{
					if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
					{
						/* Add columns that we don't yet know about */
						while( oSettings.aoColumns.length <= aTargets[j] )
						{
							_fnAddColumn( oSettings );
						}
	
						/* Integer, basic index */
						fn( aTargets[j], def );
					}
					else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
					{
						/* Negative integer, right to left column counting */
						fn( oSettings.aoColumns.length+aTargets[j], def );
					}
					else if ( typeof aTargets[j] === 'string' )
					{
						/* Class name matching on TH element */
						for ( k=0, kLen=oSettings.aoColumns.length ; k<kLen ; k++ )
						{
							if ( aTargets[j] == "_all" ||
							     $(oSettings.aoColumns[k].nTh).hasClass( aTargets[j] ) )
							{
								fn( k, def );
							}
						}
					}
				}
			}
		}
	
		// Statically defined columns array
		if ( aoCols )
		{
			for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
			{
				fn( i, aoCols[i] );
			}
		}
	}
function _fnApplyColumnDefs ( oSettings , aoColDefs , aoCols , fn ) { var i , iLen , j , jLen , k , kLen , def ; // Column definitions with aTargets
 if ( aoColDefs ) { /* Loop over the definitions array - loop in reverse so first instance has priority */ for ( i = aoColDefs . length - 1 ; i >= 0 ; i -- ) { def = aoColDefs [ i ] ; /* Each definition can target multiple columns, as it is an array */ var aTargets = def . targets !== undefined ? def . targets : def . aTargets ; if ( ! $ . isArray ( aTargets ) ) { aTargets = [ aTargets ] ; } for ( j = 0 , jLen = aTargets . length ; j < jLen ; j ++ ) { if ( typeof aTargets [ j ] === 'number' && aTargets [ j ] >= 0 ) { /* Add columns that we don't yet know about */ while ( oSettings . aoColumns . length <= aTargets [ j ] ) { _fnAddColumn ( oSettings ) ; } /* Integer, basic index */ fn ( aTargets [ j ] , def ) ; } else if ( typeof aTargets [ j ] === 'number' && aTargets [ j ] < 0 ) { /* Negative integer, right to left column counting */ fn ( oSettings . aoColumns . length + aTargets [ j ] , def ) ; } else if ( typeof aTargets [ j ] === 'string' ) { /* Class name matching on TH element */ for ( k = 0 , kLen = oSettings . aoColumns . length ; k < kLen ; k ++ ) { if ( aTargets [ j ] == "_all" || $ ( oSettings . aoColumns [ k ] . nTh ) . hasClass ( aTargets [ j ] ) ) { fn ( k , def ) ; } } } } } } // Statically defined columns array
 if ( aoCols ) { for ( i = 0 , iLen = aoCols . length ; i < iLen ; i ++ ) { fn ( i , aoCols [ i ] ) ; } } }
Take the column definitions and static columns arrays and calculate how
they relate to column indexes. The callback function will then apply the
definition found for a column to a suitable configuration object.
@param {object} oSettings dataTables settings object
@param {array} aoColDefs The aoColumnDefs array that is to be applied
@param {array} aoCols The aoColumns array that defines columns individually
@param {function} fn Callback function - takes two parameters, the calculated
column index and the definition for that column.
@memberof DataTable#oApi
Take the column definitions and static columns arrays and calculate how they relate to column indexes . The callback function will then apply the definition found for a column to a suitable configuration object .