1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-18 11:52:11 +01:00

Dev: Removing trailing white-space

- Non-functional change - just to tidy up the code styling a bit
This commit is contained in:
Allan Jardine 2013-05-26 09:58:32 +01:00
parent cb3174c29e
commit 4f1d05b65f
22 changed files with 359 additions and 359 deletions

View File

@ -64,11 +64,11 @@ _api.register( 'destroy()', function ( remove ) {
var jqWrapper = $(settings.nTableWrapper);
var rows = _pluck( settings.aoData, 'nTr' );
var i, ien;
// Flag to note that the table is currently being destroyed - no action
// should be taken
settings.bDestroying = true;
// Fire off the destroy callbacks for plug-ins etc
_fnCallbackFire( settings, "aoDestroyCallback", "destroy", [settings] );
@ -76,32 +76,32 @@ _api.register( 'destroy()', function ( remove ) {
if ( ! remove ) {
new _api( settings ).columns().visible( true );
}
// Blitz all DT events
jqWrapper.unbind('.DT').find('*').unbind('.DT');
$(window).unbind('.DT-'+settings.sInstance);
// When scrolling we had to break the table up - restore it
if ( table != thead.parentNode ) {
jqTable.children('thead').remove();
jqTable( thead );
}
if ( tfoot && table != tfoot.parentNode ) {
jqTable.children('tfoot').remove();
jqTable( tfoot );
}
// Remove the DataTables generated nodes, events and classes
jqTable.remove();
jqWrapper.remove();
settings.aaSorting = [];
settings.aaSortingFixed = [];
_fnSortingClasses( settings );
$( rows ).removeClass( settings.asStripeClasses.join(' ') );
$('th, td', thead).removeClass( classes.sSortable+' '+
classes.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone
);
@ -123,13 +123,13 @@ _api.register( 'destroy()', function ( remove ) {
// Add the TR elements back into the table in their original order
jqTbody.children().detach();
jqTbody.append( rows );
// Restore the width of the original table - was read from the style property,
// so we can restore directly to that
jqTable
.css( 'width', settings.sDestroyWidth )
.removeClass( classes.sTable );
// If the were originally stripe classes - then we add them back here.
// Note this is not fool proof (for example if not all rows had stripe
// classes - but it's a good effort without getting carried away
@ -140,7 +140,7 @@ _api.register( 'destroy()', function ( remove ) {
$(this).addClass( settings.asDestroyStripes[i % ien] );
} );
}
/* Remove the settings object from the settings array */
var idx = $.inArray( settings, DataTable.settings );
if ( idx !== -1 ) {

View File

@ -136,7 +136,7 @@ function _fnAjaxParameters( oSettings )
var param = function ( name, value ) {
aoData.push( { 'name': name, 'value': value } );
};
param( 'sEcho', oSettings.iDraw );
param( 'iColumns', iColumns );
param( 'sColumns', _fnColumnOrdering(oSettings) );
@ -144,13 +144,13 @@ function _fnAjaxParameters( oSettings )
param( 'iDisplayLength', oSettings.oFeatures.bPaginate !== false ?
oSettings._iDisplayLength : -1
);
for ( i=0 ; i<iColumns ; i++ )
{
mDataProp = aoColumns[i].mData;
param( "mDataProp_"+i, typeof(mDataProp)==="function" ? 'function' : mDataProp );
}
/* Filtering */
if ( oSettings.oFeatures.bFilter !== false )
{
@ -163,7 +163,7 @@ function _fnAjaxParameters( oSettings )
param( 'bSearchable_'+i, aoColumns[i].bSearchable );
}
}
/* Sorting */
if ( oSettings.oFeatures.bSort !== false )
{
@ -172,11 +172,11 @@ function _fnAjaxParameters( oSettings )
aaSort = ( oSettings.aaSortingFixed !== null ) ?
oSettings.aaSortingFixed.concat( oSettings.aaSorting ) :
oSettings.aaSorting.slice();
for ( i=0 ; i<aaSort.length ; i++ )
{
aDataSort = aoColumns[ aaSort[i][0] ].aDataSort;
for ( j=0 ; j<aDataSort.length ; j++ )
{
param( 'iSortCol_'+iCounter, aDataSort[j] );
@ -185,13 +185,13 @@ function _fnAjaxParameters( oSettings )
}
}
param( 'iSortingCols', iCounter );
for ( i=0 ; i<iColumns ; i++ )
{
param( 'bSortable_'+i, aoColumns[i].bSortable );
}
}
return aoData;
}
@ -220,21 +220,21 @@ function _fnAjaxUpdateDraw ( oSettings, json )
}
oSettings.iDraw = json.sEcho * 1;
}
if ( !oSettings.oScroll.bInfinite || oSettings.bSorted || oSettings.bFiltered )
{
_fnClearTable( oSettings );
}
oSettings._iRecordsTotal = parseInt(json.iTotalRecords, 10);
oSettings._iRecordsDisplay = parseInt(json.iTotalDisplayRecords, 10);
var aData = _fnAjaxDataSrc( oSettings, json );
for ( var i=0, iLen=aData.length ; i<iLen ; i++ )
{
_fnAddData( oSettings, aData[i] );
}
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
oSettings.bAjaxDataGet = false;
_fnDraw( oSettings );
@ -242,7 +242,7 @@ function _fnAjaxUpdateDraw ( oSettings, json )
{
_fnInitComplete( oSettings, json );
}
oSettings.bAjaxDataGet = true;
_fnProcessingDisplay( oSettings, false );
}

View File

@ -17,7 +17,7 @@ function _fnAddColumn( oSettings, nTh )
"mData": oDefaults.mData ? oDefaults.oDefaults : iCol
} );
oSettings.aoColumns.push( oCol );
/* Add a column specific filter */
if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null )
{
@ -26,24 +26,24 @@ function _fnAddColumn( oSettings, nTh )
else
{
var oPre = oSettings.aoPreSearchCols[ iCol ];
/* Don't require that the user must specify bRegex, bSmart or bCaseInsensitive */
if ( oPre.bRegex === undefined )
{
oPre.bRegex = true;
}
if ( oPre.bSmart === undefined )
{
oPre.bSmart = true;
}
if ( oPre.bCaseInsensitive === undefined )
{
oPre.bCaseInsensitive = true;
}
}
/* Use the column options function to initialise classes etc */
_fnColumnOptions( oSettings, iCol, null );
}
@ -60,13 +60,13 @@ function _fnColumnOptions( oSettings, iCol, oOptions )
{
var oCol = oSettings.aoColumns[ iCol ];
var oClasses = oSettings.oClasses;
/* User specified column options */
if ( oOptions !== undefined && oOptions !== null )
{
// Map camel case parameters to their Hungarian counterparts
_fnCamelToHungarian( DataTable.defaults.column, oOptions );
/* Backwards compatibility for mDataProp */
if ( oOptions.mDataProp !== undefined && !oOptions.mData )
{
@ -242,7 +242,7 @@ function _fnDetectType( sData )
{
var aTypes = DataTable.ext.aTypes;
var iLen = aTypes.length;
for ( var i=0 ; i<iLen ; i++ )
{
var sType = aTypes[i]( sData );
@ -251,7 +251,7 @@ function _fnDetectType( sData )
return sType;
}
}
return 'string';
}

View File

@ -48,7 +48,7 @@ for ( i=0, iLen=DataTable.settings.length ; i<iLen ; i++ )
return;
}
}
/* If the element we are initialising has the same ID as a table which was previously
* initialised, but the table nodes don't match (from before) then we destroy the old
* instance by simply deleting it. This is under the assumption that the table has been
@ -172,7 +172,7 @@ if ( oInit.bJQueryUI )
* you want to have multiple tables with multiple independent classes
*/
$.extend( oSettings.oClasses, DataTable.ext.oJUIClasses );
if ( oInit.sDom === DataTable.defaults.sDom && DataTable.defaults.sDom === "lfrtip" )
{
/* Set the DOM to use a layout suitable for jQuery UI's theming */
@ -300,7 +300,7 @@ for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )
}
aoColumnsInit[i].bVisible = oInit.saved_aoColumns[i].bVisible;
}
_fnAddColumn( oSettings, anThs ? anThs[i] : null );
}
@ -321,19 +321,19 @@ for ( i=0, iLen=oSettings.aaSorting.length ; i<iLen ; i++ )
oSettings.aaSorting[i][0] = 0;
}
var oColumn = oSettings.aoColumns[ oSettings.aaSorting[i][0] ];
/* Add a default sorting index */
if ( oSettings.aaSorting[i][2] === undefined )
{
oSettings.aaSorting[i][2] = 0;
}
/* If aaSorting is not defined, then we use the first indicator in asSorting */
if ( oInit.aaSorting === undefined && oSettings.saved_aaSorting === undefined )
{
oSettings.aaSorting[i][1] = oColumn.asSorting[0];
}
/* Set the current sorting index based on aoColumns.asSorting */
for ( j=0, jLen=oColumn.asSorting.length ; j<jLen ; j++ )
{
@ -344,7 +344,7 @@ for ( i=0, iLen=oSettings.aaSorting.length ; i<iLen ; i++ )
}
}
}
/* Do a first pass on the sorting classes (allows any size changes to be taken into
* account, and also will apply sorting disabled classes if disabled
*/

View File

@ -31,7 +31,7 @@ function _fnAddData ( oSettings, aDataIn, nTr, anTds )
oCol = oSettings.aoColumns[i];
_fnSetCellData( oSettings, iRow, i, _fnGetCellData( oSettings, iRow, i ) );
/* See if we should auto-detect the column type */
if ( oCol._bAutoType && oCol.sType != 'string' )
{
@ -52,7 +52,7 @@ function _fnAddData ( oSettings, aDataIn, nTr, anTds )
}
}
}
/* Add to the display array */
oSettings.aiDisplayMaster.push( iRow );
@ -284,7 +284,7 @@ function _fnGetObjectDataFn( mSource )
data = data[ a[i] ];
}
out = [];
// Get the remainder of the nested object to get
a.splice( 0, i+1 );
innerSrc = a.join('.');
@ -384,7 +384,7 @@ function _fnSetObjectDataFn( mSource )
{
a[i] = a[i].replace(__reArray, '');
data[ a[i] ] = [];
// Get the remainder of the nested object to set so we can recurse
b = a.slice();
b.splice( 0, i+1 );

View File

@ -50,7 +50,7 @@ function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
{
nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );
}
/* Add user defined class */
if ( oCol.sClass !== null )
{
@ -94,7 +94,7 @@ function _fnBuildHead( oSettings )
var iThs = $('th, td', oSettings.nTHead).length;
var iCorrector = 0;
var jqChildren;
/* If there is a header in place - then use it - otherwise it's going to get nuked... */
if ( iThs !== 0 )
{
@ -113,7 +113,7 @@ function _fnBuildHead( oSettings )
{
$(nTh).addClass( oSettings.aoColumns[i].sClass );
}
/* Set the title of the column if it is user defined (not what was auto detected) */
if ( oSettings.aoColumns[i].sTitle != nTh.innerHTML )
{
@ -125,24 +125,24 @@ function _fnBuildHead( oSettings )
{
/* We don't have a header in the DOM - so we are going to have to create one */
var nTr = document.createElement( "tr" );
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
{
nTh = oSettings.aoColumns[i].nTh;
nTh.innerHTML = oSettings.aoColumns[i].sTitle;
nTh.setAttribute('tabindex', '0');
if ( oSettings.aoColumns[i].sClass !== null )
{
$(nTh).addClass( oSettings.aoColumns[i].sClass );
}
nTr.appendChild( nTh );
}
$(oSettings.nTHead).html( '' )[0].appendChild( nTr );
_fnDetectHeader( oSettings.aoHeader, oSettings.nTHead );
}
/* ARIA role for the rows */
$(oSettings.nTHead).children('tr').attr('role', 'row');
@ -152,18 +152,18 @@ function _fnBuildHead( oSettings )
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
{
nTh = oSettings.aoColumns[i].nTh;
var nDiv = document.createElement('div');
nDiv.className = oSettings.oClasses.sSortJUIWrapper;
$(nTh).contents().appendTo(nDiv);
var nSpan = document.createElement('span');
nSpan.className = oSettings.oClasses.sSortIcon+' '+oSettings.aoColumns[i].sSortingClassJUI;
nDiv.appendChild( nSpan );
nTh.appendChild( nDiv );
}
}
if ( oSettings.oFeatures.bSort )
{
for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
@ -176,13 +176,13 @@ function _fnBuildHead( oSettings )
}
}
}
/* Deal with the footer - add classes if required */
if ( oSettings.oClasses.sFooterTH !== "" )
{
$(oSettings.nTFoot).children('tr').children('th').addClass( oSettings.oClasses.sFooterTH );
}
/* Cache the footer elements */
if ( oSettings.nTFoot !== null )
{
@ -255,7 +255,7 @@ function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
for ( i=0, iLen=aoLocal.length ; i<iLen ; i++ )
{
nLocalTr = aoLocal[i].nTr;
/* All cells are going to be replaced, so empty out the row */
if ( nLocalTr )
{
@ -321,7 +321,7 @@ function _fnDraw( oSettings )
_fnProcessingDisplay( oSettings, false );
return;
}
var i, iLen, n;
var anRows = [];
var iRowCount = 0;
@ -334,9 +334,9 @@ function _fnDraw( oSettings )
var iDisplayEnd = oSettings.fnDisplayEnd();
var bServerSide = oSettings.oFeatures.bServerSide;
var aiDisplay = oSettings.aiDisplay;
oSettings.bDrawing = true;
/* Check and see if we have an initial draw position from state saving */
if ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 )
{
@ -348,7 +348,7 @@ function _fnDraw( oSettings )
oSettings.iInitDisplayStart = -1;
}
/* Server-side processing draw intercept */
if ( oSettings.bDeferLoading )
{
@ -363,12 +363,12 @@ function _fnDraw( oSettings )
{
return;
}
if ( aiDisplay.length !== 0 )
{
var iStart = bServerSide ? 0 : iDisplayStart;
var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;
for ( var j=iStart ; j<iEnd ; j++ )
{
var iDataIndex = aiDisplay[j];
@ -379,7 +379,7 @@ function _fnDraw( oSettings )
}
var nRow = aoData.nTr;
/* Remove the old striping classes and then add the new one */
if ( iStripes !== 0 )
{
@ -390,11 +390,11 @@ function _fnDraw( oSettings )
aoData._sRowStripe = sStripe;
}
}
/* Row callback functions - might want to manipulate the row */
_fnCallbackFire( oSettings, 'aoRowCallback', null,
[nRow, aoData._aData, iRowCount, j] );
anRows.push( nRow );
iRowCount++;
}
@ -419,11 +419,11 @@ function _fnDraw( oSettings )
'class': oSettings.oClasses.sRowEmpty
} ).html( sZero ) )[0];
}
/* Header and footer callbacks */
_fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],
_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
_fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],
_fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
@ -439,10 +439,10 @@ function _fnDraw( oSettings )
}
body.append( $(anRows) );
/* Call all required callback functions for the end of a draw */
_fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] );
/* Draw is complete, sorting and filtering must be as well */
oSettings.bSorted = false;
oSettings.bFiltered = false;
@ -497,7 +497,7 @@ function _fnAddOptionsHtml ( oSettings )
*/
var nHolding = $('<div></div>')[0];
oSettings.nTable.parentNode.insertBefore( nHolding, oSettings.nTable );
/*
* All DataTables are wrapped in a div
*/
@ -506,7 +506,7 @@ function _fnAddOptionsHtml ( oSettings )
/* Track where we want to insert the option */
var nInsertNode = oSettings.nTableWrapper;
/* Loop over the user set positioning and place the elements as needed */
var aDom = oSettings.sDom.split('');
var nTmp, iPushFeature, cOption, nNewNode, cNext, sAttr, j;
@ -514,12 +514,12 @@ function _fnAddOptionsHtml ( oSettings )
{
iPushFeature = 0;
cOption = aDom[i];
if ( cOption == '<' )
{
/* New container div */
nNewNode = $('<div></div>')[0];
/* Check to see if we should append an id and/or a class name to the container */
cNext = aDom[i+1];
if ( cNext == "'" || cNext == '"' )
@ -531,7 +531,7 @@ function _fnAddOptionsHtml ( oSettings )
sAttr += aDom[i+j];
j++;
}
/* Replace jQuery UI constants */
if ( sAttr == "H" )
{
@ -541,7 +541,7 @@ function _fnAddOptionsHtml ( oSettings )
{
sAttr = oSettings.oClasses.sJUIFooter;
}
/* The attribute can be in the format of "#id.class", "#id" or "class" This logic
* breaks the string into parts and applies them as needed
*/
@ -559,10 +559,10 @@ function _fnAddOptionsHtml ( oSettings )
{
nNewNode.className = sAttr;
}
i += j; /* Move along the position array */
}
nInsertNode.appendChild( nNewNode );
nInsertNode = nNewNode;
}
@ -625,7 +625,7 @@ function _fnAddOptionsHtml ( oSettings )
}
}
}
/* Add to the 2D features array */
if ( iPushFeature == 1 && nTmp !== null )
{
@ -637,7 +637,7 @@ function _fnAddOptionsHtml ( oSettings )
nInsertNode.appendChild( nTmp );
}
}
/* Built our DOM structure - replace the holding div with what we want */
nHolding.parentNode.replaceChild( oSettings.nTableWrapper, nHolding );
}
@ -667,19 +667,19 @@ function _fnDetectHeader ( aLayout, nThead )
};
aLayout.splice( 0, aLayout.length );
/* We know how many rows there are in the layout - so prep it */
for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
{
aLayout.push( [] );
}
/* Calculate a layout array */
for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
{
nTr = nTrs[i];
iColumn = 0;
/* For every cell in the row... */
nCell = nTr.firstChild;
while ( nCell ) {
@ -696,10 +696,10 @@ function _fnDetectHeader ( aLayout, nThead )
* accordingly
*/
iColShifted = fnShiftCol( aLayout, i, iColumn );
/* Cache calculation for unique columns */
bUnique = iColspan === 1 ? true : false;
/* If there is col / rowspan, copy the information into the layout grid */
for ( l=0 ; l<iColspan ; l++ )
{
@ -751,7 +751,7 @@ function _fnGetUniqueThs ( oSettings, nHeader, aLayout )
}
}
}
return aReturn;
}

View File

@ -9,7 +9,7 @@ function _fnFeatureHtmlInfo ( settings )
var
tid = settings.sTableId,
nodes = settings.aanFeatures.i;
if ( ! nodes ) {
// Update display on each draw
settings.aoDrawCallback.push( {
@ -40,7 +40,7 @@ function _fnUpdateInfo ( settings )
if ( nodes.length === 0 ) {
return;
}
var
lang = settings.oLanguage,
start = settings._iDisplayStart+1,
@ -59,14 +59,14 @@ function _fnUpdateInfo ( settings )
// Convert the macros
out += lang.sInfoPostFix;
out = _fnInfoMacros( settings, out );
var callback = lang.fnInfoCallback;
if ( callback !== null ) {
out = callback.call( settings.oInstance,
settings, start, end, max, total, out
);
}
$(nodes).html( out );
}

View File

@ -8,17 +8,17 @@
function _fnInitialise ( oSettings )
{
var i, iLen, iAjaxStart=oSettings.iInitDisplayStart;
/* Ensure that the table data is fully initialised */
if ( oSettings.bInitialised === false )
{
setTimeout( function(){ _fnInitialise( oSettings ); }, 200 );
return;
}
/* Show the display HTML options */
_fnAddOptionsHtml( oSettings );
/* Build and draw the header / footer for the table */
_fnBuildHead( oSettings );
_fnDrawHead( oSettings, oSettings.aoHeader );
@ -26,13 +26,13 @@ function _fnInitialise ( oSettings )
/* Okay to show that something is going on now */
_fnProcessingDisplay( oSettings, true );
/* Calculate sizes for columns */
if ( oSettings.oFeatures.bAutoWidth )
{
_fnCalculateColumnWidths( oSettings );
}
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
{
if ( oSettings.aoColumns[i].sWidth !== null )
@ -40,13 +40,13 @@ function _fnInitialise ( oSettings )
oSettings.aoColumns[i].nTh.style.width = _fnStringToCss( oSettings.aoColumns[i].sWidth );
}
}
/* If there is default sorting required - let's do it. The sort function will do the
* drawing for us. Otherwise we draw the table regardless of the Ajax source - this allows
* the table to look initialised for Ajax sourcing data (show 'loading' message possibly)
*/
_fnReDraw( oSettings );
/* if there is an ajax source load the data */
if ( (oSettings.sAjaxSource || oSettings.ajax) && !oSettings.oFeatures.bServerSide )
{
@ -59,20 +59,20 @@ function _fnInitialise ( oSettings )
{
_fnAddData( oSettings, aData[i] );
}
/* Reset the init display for cookie saving. We've already done a filter, and
* therefore cleared it before. So we need to make it appear 'fresh'
*/
oSettings.iInitDisplayStart = iAjaxStart;
_fnReDraw( oSettings );
_fnProcessingDisplay( oSettings, false );
_fnInitComplete( oSettings, json );
}, oSettings );
return;
}
/* Server-side processing init complete is done by _fnAjaxUpdateDraw */
if ( !oSettings.oFeatures.bServerSide )
{

View File

@ -17,7 +17,7 @@ function _fnFeatureHtmlPaginate ( settings )
{
return null;
}
var
type = settings.sPaginationType,
plugin = DataTable.ext.oPagination[ type ],
@ -27,7 +27,7 @@ function _fnFeatureHtmlPaginate ( settings )
node = $('<div/>').addClass( settings.oClasses.sPaging + type )[0];
plugin.fnInit( settings, node, redraw );
/* Add a draw callback for the pagination on first instance, to update the paging display */
if ( ! settings.aanFeatures.p )
{
@ -106,7 +106,7 @@ function _fnPageChange ( settings, action )
settings._iDisplayStart = start;
$(settings.oInstance).trigger('page', settings);
return changed;
}

View File

@ -11,7 +11,7 @@ function _fnFeatureHtmlTable ( oSettings )
{
return oSettings.nTable;
}
/*
* The HTML structure that we want to generate in this function is:
* div - nScroller
@ -41,7 +41,7 @@ function _fnFeatureHtmlTable ( oSettings )
nTfoot = oSettings.nTable.getElementsByTagName('tfoot').length === 0 ? null :
oSettings.nTable.getElementsByTagName('tfoot')[0],
oClasses = oSettings.oClasses;
nScrollHead.appendChild( nScrollHeadInner );
nScrollFoot.appendChild( nScrollFootInner );
nScrollBody.appendChild( oSettings.nTable );
@ -55,14 +55,14 @@ function _fnFeatureHtmlTable ( oSettings )
nScrollFootInner.appendChild( nScrollFootTable );
nScrollFootTable.appendChild( nTfoot );
}
nScroller.className = oClasses.sScrollWrapper;
nScrollHead.className = oClasses.sScrollHead;
nScrollHeadInner.className = oClasses.sScrollHeadInner;
nScrollBody.className = oClasses.sScrollBody;
nScrollFoot.className = oClasses.sScrollFoot;
nScrollFootInner.className = oClasses.sScrollFootInner;
if ( oSettings.oScroll.bAutoCss )
{
nScrollHead.style.overflow = "hidden";
@ -70,13 +70,13 @@ function _fnFeatureHtmlTable ( oSettings )
nScrollFoot.style.overflow = "hidden";
nScrollBody.style.overflow = "auto";
}
nScrollHead.style.border = "0";
nScrollHead.style.width = "100%";
nScrollFoot.style.border = "0";
nScrollHeadInner.style.width = oSettings.oScroll.sXInner !== "" ?
oSettings.oScroll.sXInner : "100%"; /* will be overwritten */
/* Modify attributes to respect the clones */
nScrollHeadTable.removeAttribute('id');
nScrollHeadTable.style.marginLeft = "0";
@ -86,7 +86,7 @@ function _fnFeatureHtmlTable ( oSettings )
nScrollFootTable.removeAttribute('id');
nScrollFootTable.style.marginLeft = "0";
}
/* Move caption elements from the body to the header, footer or leave where it is
* depending on the configuration. Note that the DTD says there can be only one caption */
var nCaption = $(oSettings.nTable).children('caption');
@ -102,7 +102,7 @@ function _fnFeatureHtmlTable ( oSettings )
nScrollFootTable.appendChild( nCaption );
}
}
/*
* Sizing
*/
@ -111,35 +111,35 @@ function _fnFeatureHtmlTable ( oSettings )
{
nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX );
nScrollBody.style.width = _fnStringToCss( oSettings.oScroll.sX );
if ( nTfoot !== null )
{
nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX );
nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX );
}
/* When the body is scrolled, then we also want to scroll the headers */
$(nScrollBody).scroll( function (e) {
nScrollHead.scrollLeft = this.scrollLeft;
if ( nTfoot !== null )
{
nScrollFoot.scrollLeft = this.scrollLeft;
}
} );
}
/* When yscrolling, add the height */
if ( oSettings.oScroll.sY !== "" )
{
nScrollBody.style.height = _fnStringToCss( oSettings.oScroll.sY );
}
/* Redraw - align columns across the tables */
oSettings.aoDrawCallback.push( {
"fn": _fnScrollDraw,
"sName": "scrolling"
} );
/* Infinite scrolling event handlers */
if ( oSettings.oScroll.bInfinite )
{
@ -161,10 +161,10 @@ function _fnFeatureHtmlTable ( oSettings )
}
} );
}
oSettings.nScrollHead = nScrollHead;
oSettings.nScrollFoot = nScrollFoot;
return nScroller;
}
@ -200,11 +200,11 @@ function _fnScrollDraw ( o )
oStyle.borderBottomWidth = "0";
oStyle.height = 0;
};
/*
* 1. Re-create the table inside the scrolling div
*/
/* Remove the old minimised thead and tfoot elements in the inner table */
$(o.nTable).children('thead, tfoot').remove();
@ -214,7 +214,7 @@ function _fnScrollDraw ( o )
anHeadToSize = o.nTHead.getElementsByTagName('tr');
anHeadSizers = nTheadSize.getElementsByTagName('tr');
$('th, td', nTheadSize).removeAttr('tabindex');
if ( o.nTFoot !== null )
{
nTfootSize = $(o.nTFoot).clone()[0];
@ -222,11 +222,11 @@ function _fnScrollDraw ( o )
anFootToSize = o.nTFoot.getElementsByTagName('tr');
anFootSizers = nTfootSize.getElementsByTagName('tr');
}
/*
* 2. Take live measurements from the DOM - do not alter the DOM itself!
*/
/* Remove old sizing and apply the calculated column widths
* Get the unique column headers in the newly created (cloned) header. We want to apply the
* calculated sizes to this header
@ -236,14 +236,14 @@ function _fnScrollDraw ( o )
nScrollBody.style.width = '100%';
nScrollHeadInner.parentNode.style.width = '100%';
}
var nThs = _fnGetUniqueThs( o, nTheadSize );
for ( i=0, iLen=nThs.length ; i<iLen ; i++ )
{
iVis = _fnVisibleToColumnIndex( o, i );
nThs[i].style.width = o.aoColumns[iVis].sWidth;
}
if ( o.nTFoot !== null )
{
_fnApplyToChildren( function(n) {
@ -258,14 +258,14 @@ function _fnScrollDraw ( o )
{
nScrollBody.style.height = (nScrollBody.offsetHeight + o.nTHead.offsetHeight)+"px";
}
/* Size the table as a whole */
iSanityWidth = $(o.nTable).outerWidth();
if ( o.oScroll.sX === "" )
{
/* No x scrolling */
o.nTable.style.width = "100%";
/* I know this is rubbish - but IE7 will make the width of the table when 100% include
* the scrollbar - which is shouldn't. When there is a scrollbar we need to take this
* into account.
@ -300,17 +300,17 @@ function _fnScrollDraw ( o )
o.nTable.style.width = _fnStringToCss( iSanityWidth );
}
}
/* Recalculate the sanity width - now that we've applied the required width, before it was
* a temporary variable. This is required because the column width calculation is done
* before this table DOM is created.
*/
iSanityWidth = $(o.nTable).outerWidth();
/* We want the hidden header to have zero height, so remove padding and borders. Then
* set the width based on the real headers
*/
// Apply all styles in one pass. Invalidates layout only once because we don't read any
// DOM properties.
_fnApplyToChildren( zeroOut, anHeadSizers );
@ -328,7 +328,7 @@ function _fnScrollDraw ( o )
}, anHeadToSize );
$(anHeadSizers).height(0);
/* Same again with the footer if we have one */
if ( o.nTFoot !== null )
{
@ -344,11 +344,11 @@ function _fnScrollDraw ( o )
$(anFootSizers).height(0);
}
/*
* 3. Apply the measurements
*/
/* "Hide" the header and footer that we used for the sizing. We want to also fix their width
* to what they currently are
*/
@ -356,7 +356,7 @@ function _fnScrollDraw ( o )
nSizer.innerHTML = "";
nSizer.style.width = aApplied[i];
}, anHeadSizers );
if ( o.nTFoot !== null )
{
_fnApplyToChildren( function(nSizer, i) {
@ -364,7 +364,7 @@ function _fnScrollDraw ( o )
nSizer.style.width = aAppliedFooter[i];
}, anFootSizers );
}
/* Sanity check that the table is of a sensible width. If not then we are going to get
* misalignment - try to prevent this by not allowing the table to shrink below its min width
*/
@ -374,23 +374,23 @@ function _fnScrollDraw ( o )
var iCorrection = ((nScrollBody.scrollHeight > nScrollBody.offsetHeight ||
$(nScrollBody).css('overflow-y') == "scroll")) ?
iSanityWidth+o.oScroll.iBarWidth : iSanityWidth;
/* IE6/7 are a law unto themselves... */
if ( ie67 && (nScrollBody.scrollHeight >
nScrollBody.offsetHeight || $(nScrollBody).css('overflow-y') == "scroll") )
{
o.nTable.style.width = _fnStringToCss( iCorrection-o.oScroll.iBarWidth );
}
/* Apply the calculated minimum width to the table wrappers */
nScrollBody.style.width = _fnStringToCss( iCorrection );
o.nScrollHead.style.width = _fnStringToCss( iCorrection );
if ( o.nTFoot !== null )
{
o.nScrollFoot.style.width = _fnStringToCss( iCorrection );
}
/* And give the user a warning that we've stopped the table getting too small */
if ( o.oScroll.sX === "" || o.oScroll.sXInner !== "" )
{
@ -401,14 +401,14 @@ function _fnScrollDraw ( o )
{
nScrollBody.style.width = _fnStringToCss( '100%' );
o.nScrollHead.style.width = _fnStringToCss( '100%' );
if ( o.nTFoot !== null )
{
o.nScrollFoot.style.width = _fnStringToCss( '100%' );
}
}
/*
* 4. Clean up
*/
@ -423,19 +423,19 @@ function _fnScrollDraw ( o )
nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+o.oScroll.iBarWidth );
}
}
if ( o.oScroll.sY !== "" && o.oScroll.bCollapse )
{
nScrollBody.style.height = _fnStringToCss( o.oScroll.sY );
var iExtra = (o.oScroll.sX !== "" && o.nTable.offsetWidth > nScrollBody.offsetWidth) ?
o.oScroll.iBarWidth : 0;
o.oScroll.iBarWidth : 0;
if ( o.nTable.offsetHeight < nScrollBody.offsetHeight )
{
nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+iExtra );
}
}
/* Finally set the width's of the header and footer tables */
var iOuterWidth = $(o.nTable).outerWidth();
nScrollHeadTable.style.width = _fnStringToCss( iOuterWidth );
@ -446,7 +446,7 @@ function _fnScrollDraw ( o )
var bScrolling = $(o.nTable).height() > nScrollBody.clientHeight || $(nScrollBody).css('overflow-y') == "scroll";
var padding = o.oBrowser.bScrollbarLeft ? 'paddingLeft' : 'paddingRight';
nScrollHeadInner.style[padding] = bScrolling ? o.oScroll.iBarWidth+"px" : "0px";
if ( o.nTFoot !== null )
{
nScrollFootTable.style.width = _fnStringToCss( iOuterWidth );
@ -456,7 +456,7 @@ function _fnScrollDraw ( o )
/* Adjust the position of the header in case we loose the y-scrollbar */
$(nScrollBody).scroll();
/* If sorting or filtering has occurred, jump the scrolling back to the top */
if ( o.bSorted || o.bFiltered )
{

View File

@ -11,19 +11,19 @@ function _fnConvertToWidth ( sWidth, nParent )
{
return 0;
}
if ( ! nParent )
{
nParent = document.body;
}
var n = $('<div/>')
.css( 'width', _fnStringToCss( sWidth ) )
.appendTo( nParent );
var width = n[0].offsetWidth;
n.remove();
return width;
}
@ -44,14 +44,14 @@ function _fnCalculateColumnWidths ( oSettings )
var oHeaders = $('th', oSettings.nTHead);
var widthAttr = oSettings.nTable.getAttribute('width');
var nWrapper = oSettings.nTable.parentNode;
/* Convert any user input sizes into pixel sizes */
for ( i=0 ; i<iColums ; i++ )
{
if ( oSettings.aoColumns[i].bVisible )
{
iVisibleColumns++;
if ( oSettings.aoColumns[i].sWidth !== null )
{
iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidthOrig,
@ -60,12 +60,12 @@ function _fnCalculateColumnWidths ( oSettings )
{
oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
}
iUserInputs++;
}
}
}
/* If the number of columns in the DOM equals the number that we have to process in
* DataTables, then we can use the offsets that are created by the web-browser. No custom
* sizes can be set in order for this to happen, nor scrolling used
@ -95,7 +95,7 @@ function _fnCalculateColumnWidths ( oSettings )
nBody = document.createElement( 'tbody' ),
nTr = document.createElement( 'tr' ),
nDivSizing;
nCalcTmp.removeAttribute( "id" );
nCalcTmp.appendChild( nTheadClone );
if ( oSettings.nTFoot !== null )
@ -105,10 +105,10 @@ function _fnCalculateColumnWidths ( oSettings )
n.style.width = "";
}, nCalcTmp.getElementsByTagName('tr') );
}
nCalcTmp.appendChild( nBody );
nBody.appendChild( nTr );
/* Remove any sizing that was previously applied by the styles */
var jqColSizing = $('thead th', nCalcTmp);
if ( jqColSizing.length === 0 )
@ -153,10 +153,10 @@ function _fnCalculateColumnWidths ( oSettings )
}
}
}
/* Build the table and 'display' it */
nWrapper.appendChild( nCalcTmp );
/* When scrolling (X or Y) we want to set the width of the table as appropriate. However,
* when not scrolling leave the table width as it is. This results in slightly different,
* but I think correct behaviour
@ -182,10 +182,10 @@ function _fnCalculateColumnWidths ( oSettings )
nCalcTmp.style.width = _fnStringToCss( widthAttr );
}
nCalcTmp.style.visibility = "hidden";
/* Scrolling considerations */
_fnScrollingWidthAdjust( oSettings, nCalcTmp );
/* Read the width's calculated by the browser and store them for use by the caller. We
* first of all try to use the elements in the body, but it is possible that there are
* no elements there, under which circumstances we use the header elements
@ -221,7 +221,7 @@ function _fnCalculateColumnWidths ( oSettings )
iCorrector++;
}
}
nCalcTmp.style.width = _fnStringToCss( iTotal );
oSettings.nTable.style.width = _fnStringToCss( iTotal );
}
@ -320,7 +320,7 @@ var __re_html_remove = /<.*?>/g;
function _fnGetMaxLenString( oSettings, iCol )
{
var s, iMax=-1, iMaxIndex = -1;
for ( var i=0 ; i<oSettings.aoData.length ; i++ )
{
s = _fnGetCellData( oSettings, i, iCol, 'display' )+'';
@ -332,7 +332,7 @@ function _fnGetMaxLenString( oSettings, iCol )
iMaxIndex = i;
}
}
return iMaxIndex;
}
@ -350,7 +350,7 @@ function _fnStringToCss( s )
{
return "0px";
}
if ( typeof s == 'number' )
{
if ( s < 0 )
@ -359,7 +359,7 @@ function _fnStringToCss( s )
}
return s+"px";
}
/* Check if the last character is not 0-9 */
var c = s.charCodeAt( s.length-1 );
if (c < 0x30 || c > 0x39)
@ -406,7 +406,7 @@ function _fnScrollBarWidth ()
{
w2 = outer[0].clientWidth;
}
outer.remove();
DataTable.__scrollbarWidth = w1 - w2;

View File

@ -30,7 +30,7 @@ function _fnSaveState ( oSettings )
}
_fnCallbackFire( oSettings, "aoStateSaveParams", 'stateSaveParams', [oSettings, oState] );
oSettings.fnStateSaveCallback.call( oSettings.oInstance, oSettings, oState );
}
@ -53,7 +53,7 @@ function _fnLoadState ( oSettings, oInit )
{
return;
}
/* Allow custom and plug-in manipulation functions to alter the saved data set and
* cancelling of loading by returning false
*/
@ -67,21 +67,21 @@ function _fnLoadState ( oSettings, oInit )
if ( oData.iCreate < new Date().getTime() - (oSettings.iStateDuration*1000) ) {
return;
}
/* Store the saved state so it might be accessed at any time */
oSettings.oLoadedState = $.extend( true, {}, oData );
/* Restore key features */
oSettings._iDisplayStart = oData.iStart;
oSettings.iInitDisplayStart = oData.iStart;
oSettings._iDisplayLength = oData.iLength;
oSettings.aaSorting = oData.aaSorting.slice();
oSettings.saved_aaSorting = oData.aaSorting.slice();
/* Search filtering */
$.extend( oSettings.oPreviousSearch, oData.oSearch );
$.extend( true, oSettings.aoPreSearchCols, oData.aoSearchCols );
/* Column visibility state
* Pass back visibility settings to the init handler, but to do not here override
* the init object that the user might have passed in

View File

@ -83,7 +83,7 @@ function _fnMap( oRet, oSrc, sName, sMappedName )
function _fnExtend( oOut, oExtender )
{
var val;
for ( var prop in oExtender )
{
if ( oExtender.hasOwnProperty(prop) )

View File

@ -9,7 +9,7 @@ $.extend( DataTable.ext.oStdClasses, {
"sPageNextDisabled": "paginate_disabled_next",
"sPageJUINext": "",
"sPageJUIPrev": "",
/* Full numbers paging buttons */
"sPageButton": "paginate_button",
"sPageButtonActive": "paginate_active",
@ -18,14 +18,14 @@ $.extend( DataTable.ext.oStdClasses, {
"sPagePrevious": "previous",
"sPageNext": "next",
"sPageLast": "last",
/* Striping classes */
"sStripeOdd": "odd",
"sStripeEven": "even",
/* Empty row */
"sRowEmpty": "dataTables_empty",
/* Features */
"sWrapper": "dataTables_wrapper",
"sFilter": "dataTables_filter",
@ -33,7 +33,7 @@ $.extend( DataTable.ext.oStdClasses, {
"sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */
"sLength": "dataTables_length",
"sProcessing": "dataTables_processing",
/* Sorting */
"sSortAsc": "sorting_asc",
"sSortDesc": "sorting_desc",
@ -49,7 +49,7 @@ $.extend( DataTable.ext.oStdClasses, {
"sSortJUIDescAllowed": "",
"sSortJUIWrapper": "",
"sSortIcon": "",
/* Scrolling */
"sScrollWrapper": "dataTables_scroll",
"sScrollHead": "dataTables_scrollHead",
@ -57,7 +57,7 @@ $.extend( DataTable.ext.oStdClasses, {
"sScrollBody": "dataTables_scrollBody",
"sScrollFoot": "dataTables_scrollFoot",
"sScrollFootInner": "dataTables_scrollFootInner",
/* Misc */
"sFooterTH": "",
"sJUIHeader": "",
@ -73,18 +73,18 @@ $.extend( DataTable.ext.oJUIClasses, DataTable.ext.oStdClasses, {
"sPageNextDisabled": "fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",
"sPageJUINext": "ui-icon ui-icon-circle-arrow-e",
"sPageJUIPrev": "ui-icon ui-icon-circle-arrow-w",
/* Full numbers paging buttons */
"sPageButton": "fg-button ui-button ui-state-default",
"sPageButtonActive": "fg-button ui-button ui-state-default ui-state-disabled",
"sPageButtonStaticDisabled": "fg-button ui-button ui-state-default ui-state-disabled",
"sPageFirst": "first ui-corner-tl ui-corner-bl",
"sPageLast": "last ui-corner-tr ui-corner-br",
/* Features */
"sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+
"ui-buttonset-multi paging_", /* Note that the type is postfixed */
/* Sorting */
"sSortAsc": "ui-state-default",
"sSortDesc": "ui-state-default",
@ -99,11 +99,11 @@ $.extend( DataTable.ext.oJUIClasses, DataTable.ext.oStdClasses, {
"sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s",
"sSortJUIWrapper": "DataTables_sort_wrapper",
"sSortIcon": "DataTables_sort_icon",
/* Scrolling */
"sScrollHead": "dataTables_scrollHead ui-state-default",
"sScrollFoot": "dataTables_scrollFoot ui-state-default",
/* Misc */
"sFooterTH": "ui-state-default",
"sJUIHeader": "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",

View File

@ -36,14 +36,14 @@ $.extend( DataTable.ext.oPagination, {
'<a class="'+oSettings.oClasses.sPagePrevDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button"><span class="'+oSettings.oClasses.sPageJUIPrev+'"></span></a>'+
'<a class="'+oSettings.oClasses.sPageNextDisabled+'" tabindex="'+oSettings.iTabIndex+'" role="button"><span class="'+oSettings.oClasses.sPageJUINext+'"></span></a>';
$(nPaging).append( sAppend );
var els = $('a', nPaging);
var nPrevious = els[0],
nNext = els[1];
oSettings.oApi._fnBindAction( nPrevious, {action: "previous"}, fnClickHandler );
oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler );
/* ID the first elements only */
if ( !oSettings.aanFeatures.p )
{
@ -55,7 +55,7 @@ $.extend( DataTable.ext.oPagination, {
nNext.setAttribute('aria-controls', oSettings.sTableId);
}
},
/*
* Function: oPagination.two_button.fnUpdate
* Purpose: Update the two button pagination at the end of the draw
@ -69,7 +69,7 @@ $.extend( DataTable.ext.oPagination, {
{
return;
}
var oClasses = oSettings.oClasses;
var an = oSettings.aanFeatures.p;
var nNode;
@ -92,15 +92,15 @@ $.extend( DataTable.ext.oPagination, {
}
}
},
/*
* Variable: iFullNumbersShowPages
* Purpose: Change the number of pages which can be seen
* Scope: jQuery.fn.dataTableExt.oPagination
*/
"iFullNumbersShowPages": 5,
/*
* Variable: full_numbers
* Purpose: Full numbers pagination
@ -138,12 +138,12 @@ $.extend( DataTable.ext.oPagination, {
nPrev = els[1],
nNext = els[2],
nLast = els[3];
oSettings.oApi._fnBindAction( nFirst, {action: "first"}, fnClickHandler );
oSettings.oApi._fnBindAction( nPrev, {action: "previous"}, fnClickHandler );
oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler );
oSettings.oApi._fnBindAction( nLast, {action: "last"}, fnClickHandler );
/* ID the first elements only */
if ( !oSettings.aanFeatures.p )
{
@ -154,7 +154,7 @@ $.extend( DataTable.ext.oPagination, {
nLast.id =oSettings.sTableId+'_last';
}
},
/*
* Function: oPagination.full_numbers.fnUpdate
* Purpose: Update the list of page buttons shows
@ -168,7 +168,7 @@ $.extend( DataTable.ext.oPagination, {
{
return;
}
var iPageCount = DataTable.ext.oPagination.iFullNumbersShowPages;
var iPageCountHalf = Math.floor(iPageCount / 2);
var iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength);
@ -186,7 +186,7 @@ $.extend( DataTable.ext.oPagination, {
e.preventDefault();
} );
};
/* Pages calculation */
if ( oSettings._iDisplayLength === -1 )
{
@ -215,7 +215,7 @@ $.extend( DataTable.ext.oPagination, {
iEndButton = iStartButton + iPageCount - 1;
}
/* Build the dynamic list */
for ( i=iStartButton ; i<=iEndButton ; i++ )
{
@ -223,7 +223,7 @@ $.extend( DataTable.ext.oPagination, {
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+'">'+oSettings.fnFormatNumber(i)+'</a>' :
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButtonActive+'">'+oSettings.fnFormatNumber(i)+'</a>';
}
/* Loop over each instance of the pager */
for ( i=0, iLen=an.length ; i<iLen ; i++ )
{
@ -232,12 +232,12 @@ $.extend( DataTable.ext.oPagination, {
{
continue;
}
/* Build up the dynamic list first - html and listeners */
$('span:eq(0)', nNode)
.html( sList )
.children('a').each( fnBind );
/* Update the permanent button's classes */
anButtons = nNode.getElementsByTagName('a');
anStatic = [

View File

@ -20,13 +20,13 @@ $.extend( DataTable.ext.oSort, {
{
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
},
"string-desc": function ( x, y )
{
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
},
/*
* html sorting (ignore html tags)
*/
@ -34,23 +34,23 @@ $.extend( DataTable.ext.oSort, {
{
return a.replace( /<.*?>/g, "" ).toLowerCase();
},
/*
* date sorting
*/
"date-pre": function ( a )
{
var x = Date.parse( a );
if ( isNaN(x) || x==="" )
{
x = Date.parse( "01/01/1970 00:00:00" );
}
return x;
},
/*
* numerical sorting
*/

View File

@ -9,7 +9,7 @@ $.extend( DataTable.ext.aTypes, [
return data==='' || data==='-' || (!isNaN( parseFloat(data) ) && isFinite( data )) ?
'numeric' : null;
},
// Dates (only those recognised by the browser's Date.parse)
function ( data )
{
@ -17,7 +17,7 @@ $.extend( DataTable.ext.aTypes, [
return (parsed !== null && !isNaN(parsed)) || (typeof data==='string' && data.length===0) ?
'date' : null;
},
// HTML
function ( data )
{

View File

@ -33,26 +33,26 @@ DataTable.models.oColumn = {
* @type array
*/
"asSorting": null,
/**
* Flag to indicate if the column is searchable, and thus should be included
* in the filtering or not.
* @type boolean
*/
"bSearchable": null,
/**
* Flag to indicate if the column is sortable or not.
* @type boolean
*/
"bSortable": null,
/**
* Flag to indicate if the column is currently visible in the table or not
* @type boolean
*/
"bVisible": null,
/**
* Flag to indicate to the type detection method if the automatic type
* detection should be used, or if a column type (sType) has been specified
@ -61,7 +61,7 @@ DataTable.models.oColumn = {
* @private
*/
"_bAutoType": true,
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
@ -75,7 +75,7 @@ DataTable.models.oColumn = {
* @default null
*/
"fnCreatedCell": null,
/**
* Function to get data from a cell in a column. You should <b>never</b>
* access data directly through _aData internally in DataTables - always use
@ -91,7 +91,7 @@ DataTable.models.oColumn = {
* @default null
*/
"fnGetData": null,
/**
* Function to set data for a cell in the column. You should <b>never</b>
* set the data directly to _aData internally in DataTables - always use
@ -104,7 +104,7 @@ DataTable.models.oColumn = {
* @default null
*/
"fnSetData": null,
/**
* Property to read the value for the cells in the column from the data
* source array / object. If null, then the default content is used, if a
@ -113,7 +113,7 @@ DataTable.models.oColumn = {
* @default null
*/
"mData": null,
/**
* Partner property to mData which is used (only when defined) to get
* the data - i.e. it is basically the same as mData, but without the
@ -123,7 +123,7 @@ DataTable.models.oColumn = {
* @default null
*/
"mRender": null,
/**
* Unique header TH/TD element for this column - this is what the sorting
* listener is attached to (if sorting is enabled.)
@ -131,7 +131,7 @@ DataTable.models.oColumn = {
* @default null
*/
"nTh": null,
/**
* Unique footer TH/TD element for this column (if there is one). Not used
* in DataTables as such, but can be used for plug-ins to reference the
@ -140,14 +140,14 @@ DataTable.models.oColumn = {
* @default null
*/
"nTf": null,
/**
* The class to apply to all TD elements in the table's TBODY for the column
* @type string
* @default null
*/
"sClass": null,
/**
* When DataTables calculates the column widths to assign to each column,
* it finds the longest string in each column and then constructs a
@ -160,7 +160,7 @@ DataTable.models.oColumn = {
* @type string
*/
"sContentPadding": null,
/**
* Allows a default value to be given for a column's data, and will be used
* whenever a null data source is encountered (this can be because mData
@ -169,14 +169,14 @@ DataTable.models.oColumn = {
* @default null
*/
"sDefaultContent": null,
/**
* Name for the column, allowing reference to the column by name as well as
* by index (needs a lookup to work by name).
* @type string
*/
"sName": null,
/**
* Custom sorting data type - defines which of the available plug-ins in
* afnSortData the custom sorting will use - if any is defined.
@ -184,14 +184,14 @@ DataTable.models.oColumn = {
* @default std
*/
"sSortDataType": 'std',
/**
* Class to be applied to the header element when sorting on this column
* @type string
* @default null
*/
"sSortingClass": null,
/**
* Class to be applied to the header element when sorting on this column -
* when jQuery UI theming is used.
@ -199,27 +199,27 @@ DataTable.models.oColumn = {
* @default null
*/
"sSortingClassJUI": null,
/**
* Title of the column - what is seen in the TH element (nTh).
* @type string
*/
"sTitle": null,
/**
* Column sorting and filtering type
* @type string
* @default null
*/
"sType": null,
/**
* Width of the column
* @type string
* @default null
*/
"sWidth": null,
/**
* Width of the column when it was first "encountered"
* @type string

View File

@ -185,8 +185,8 @@ DataTable.defaults.column = {
* } );
*/
"bVisible": true,
/**
* Developer definable function that is called whenever a cell is created (Ajax source,
* etc) or processed for input (DOM source). This can be used as a compliment to mRender
@ -616,7 +616,7 @@ DataTable.defaults.column = {
* } );
*/
"sClass": "",
/**
* When DataTables calculates the column widths to assign to each column,
* it finds the longest string in each column and then constructs a

View File

@ -933,7 +933,7 @@ DataTable.defaults = {
}
var s=(toFormat+""), a=s.split(""), out="", iLen=s.length;
for ( var i=0 ; i<iLen ; i++ )
{
if ( i%3 === 0 && i !== 0 )
@ -1554,8 +1554,8 @@ DataTable.defaults = {
* } );
*/
"sFirst": "First",
/**
* Text to use when using the 'full_numbers' type of pagination for the
* button to take the user to the last page.
@ -1577,8 +1577,8 @@ DataTable.defaults = {
* } );
*/
"sLast": "Last",
/**
* Text to use for the 'next' pagination button (to take the user to the
* next page).
@ -1600,8 +1600,8 @@ DataTable.defaults = {
* } );
*/
"sNext": "Next",
/**
* Text to use for the 'previous' pagination button (to take the user to
* the previous page).
@ -1624,7 +1624,7 @@ DataTable.defaults = {
*/
"sPrevious": "Previous"
},
/**
* This string is shown in preference to `zeroRecords` when the table is
* empty of data (regardless of filtering). Note that this is an optional
@ -1646,8 +1646,8 @@ DataTable.defaults = {
* } );
*/
"sEmptyTable": "No data available in table",
/**
* This string gives information to the end user about the information that
* is current on display on the page. The _START_, _END_ and _TOTAL_
@ -1669,8 +1669,8 @@ DataTable.defaults = {
* } );
*/
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
/**
* Display information string for when the table is empty. Typically the
* format of this string should match `info`.
@ -1690,8 +1690,8 @@ DataTable.defaults = {
* } );
*/
"sInfoEmpty": "Showing 0 to 0 of 0 entries",
/**
* When a user filters the information in a table, this string is appended
* to the information (`info`) to give an idea of how strong the filtering
@ -1712,8 +1712,8 @@ DataTable.defaults = {
* } );
*/
"sInfoFiltered": "(filtered from _MAX_ total entries)",
/**
* If can be useful to append extra information to the info string at times,
* and this variable does exactly that. This information will be appended to
@ -1735,8 +1735,8 @@ DataTable.defaults = {
* } );
*/
"sInfoPostFix": "",
/**
* DataTables has a build in number formatter (`formatNumber`) which is used
* to format large numbers that are used in the table information. By
@ -1758,8 +1758,8 @@ DataTable.defaults = {
* } );
*/
"sInfoThousands": ",",
/**
* Detail the action that will be taken when the drop down menu for the
* pagination length option is changed. The '_MENU_' variable is replaced
@ -1799,8 +1799,8 @@ DataTable.defaults = {
* } );
*/
"sLengthMenu": "Show _MENU_ entries",
/**
* When using Ajax sourced data and during the first draw when DataTables is
* gathering the data, this message is shown in an empty row in the table to
@ -1823,8 +1823,8 @@ DataTable.defaults = {
* } );
*/
"sLoadingRecords": "Loading...",
/**
* Text which is displayed when the table is processing a user action
* (usually a sort command or similar).
@ -1844,8 +1844,8 @@ DataTable.defaults = {
* } );
*/
"sProcessing": "Processing...",
/**
* Details the actions that will be taken when the user types into the
* filtering input text box. The variable "_INPUT_", if used in the string,
@ -1879,8 +1879,8 @@ DataTable.defaults = {
* } );
*/
"sSearch": "Search:",
/**
* All of the language information can be stored in a file on the
* server-side, which DataTables will look up if this parameter is passed.
@ -1904,8 +1904,8 @@ DataTable.defaults = {
* } );
*/
"sUrl": "",
/**
* Text shown inside the table records when the is no information to be
* displayed after filtering. `emptyTable` is shown when there is simply no

View File

@ -274,7 +274,7 @@ DataTable.models.ext = {
* @default {}
*/
"oStdClasses": {},
/**
* Storage for the various classes that DataTables uses - jQuery UI suitable

View File

@ -28,7 +28,7 @@ DataTable.models.oSettings = {
* @namespace
*/
"oFeatures": {
/**
* Flag to say if DataTables should automatically try to calculate the
* optimum table and columns widths (true) or not (false).
@ -48,7 +48,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bDeferRender": null,
/**
* Enable filtering on the table or not. Note that if this is disabled
* then there is no filtering at all on the table, including fnFilter.
@ -58,7 +58,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bFilter": null,
/**
* Table information element (the 'Showing x of y records' div) enable
* flag.
@ -67,7 +67,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bInfo": null,
/**
* Present a user control allowing the end user to change the page size
* when pagination is enabled.
@ -85,7 +85,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bPaginate": null,
/**
* Processing indicator enable flag whenever DataTables is enacting a
* user request - typically an Ajax request for server-side processing.
@ -94,7 +94,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bProcessing": null,
/**
* Server-side processing enabled flag - when enabled DataTables will
* get all data from the server for every draw - there is no filtering,
@ -104,7 +104,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bServerSide": null,
/**
* Sorting enablement flag.
* Note that this parameter will be set by the initialisation routine. To
@ -112,7 +112,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bSort": null,
/**
* Apply a class to the columns which are being sorted to provide a
* visual highlight or not. This can slow things down when enabled since
@ -122,7 +122,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bSortClasses": null,
/**
* State saving enablement flag.
* Note that this parameter will be set by the initialisation routine. To
@ -131,7 +131,7 @@ DataTable.models.oSettings = {
*/
"bStateSave": null
},
/**
* Scrolling settings for a table.
@ -147,7 +147,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bAutoCss": null,
/**
* When the table is shorter in height than sScrollY, collapse the
* table container down to the height of the table (when true).
@ -156,7 +156,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bCollapse": null,
/**
* Infinite scrolling enablement flag. Now deprecated in favour of
* using the Scroller plug-in.
@ -165,7 +165,7 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bInfinite": null,
/**
* Width of the scrollbar for the web-browser's platform. Calculated
* during table initialisation.
@ -173,7 +173,7 @@ DataTable.models.oSettings = {
* @default 0
*/
"iBarWidth": 0,
/**
* Space (in pixels) between the bottom of the scrolling container and
* the bottom of the scrolling viewport before the next page is loaded
@ -183,7 +183,7 @@ DataTable.models.oSettings = {
* @type int
*/
"iLoadGap": null,
/**
* Viewport width for horizontal scrolling. Horizontal scrolling is
* disabled if an empty string.
@ -192,7 +192,7 @@ DataTable.models.oSettings = {
* @type string
*/
"sX": null,
/**
* Width to expand the table to when using x-scrolling. Typically you
* should not need to use this.
@ -202,7 +202,7 @@ DataTable.models.oSettings = {
* @deprecated
*/
"sXInner": null,
/**
* Viewport height for vertical scrolling. Vertical scrolling is disabled
* if an empty string.
@ -212,7 +212,7 @@ DataTable.models.oSettings = {
*/
"sY": null
},
/**
* Language information for the table.
* @namespace
@ -227,7 +227,7 @@ DataTable.models.oSettings = {
*/
"fnInfoCallback": null
},
/**
* Browser support parameters
* @namespace
@ -250,11 +250,11 @@ DataTable.models.oSettings = {
*/
"bScrollbarLeft": false
},
"ajax": null,
/**
* Array referencing the nodes which are used for the features. The
* parameters of this object match what is allowed by sDom - i.e.
@ -270,7 +270,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aanFeatures": [],
/**
* Store data information - see {@link DataTable.models.oRow} for detailed
* information.
@ -278,49 +278,49 @@ DataTable.models.oSettings = {
* @default []
*/
"aoData": [],
/**
* Array of indexes which are in the current display (after filtering etc)
* @type array
* @default []
*/
"aiDisplay": [],
/**
* Array of indexes for display - no filtering
* @type array
* @default []
*/
"aiDisplayMaster": [],
/**
* Store information about each column that is in use
* @type array
* @default []
*/
"aoColumns": [],
/**
* Store information about the table's header
* @type array
* @default []
*/
"aoHeader": [],
/**
* Store information about the table's footer
* @type array
* @default []
*/
"aoFooter": [],
/**
* Search data array for regular expression searching
* @type array
* @default []
*/
"asDataSearch": [],
/**
* Store the applied global search information in case we want to force a
* research or compare the old search to a new one.
@ -330,7 +330,7 @@ DataTable.models.oSettings = {
* @extends DataTable.models.oSearch
*/
"oPreviousSearch": {},
/**
* Store the applied search for each column - see
* {@link DataTable.models.oSearch} for the format that is used for the
@ -339,7 +339,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aoPreSearchCols": [],
/**
* Sorting that is applied to the table. Note that the inner arrays are
* used in the following manner:
@ -354,7 +354,7 @@ DataTable.models.oSettings = {
* @todo These inner arrays should really be objects
*/
"aaSorting": null,
/**
* Sorting that is always applied to the table (i.e. prefixed in front of
* aaSorting).
@ -364,7 +364,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aaSortingFixed": [],
/**
* Classes to use for the striping of a table.
* Note that this parameter will be set by the initialisation routine. To
@ -373,56 +373,56 @@ DataTable.models.oSettings = {
* @default []
*/
"asStripeClasses": null,
/**
* If restoring a table - we should restore its striping classes as well
* @type array
* @default []
*/
"asDestroyStripes": [],
/**
* If restoring a table - we should restore its width
* @type int
* @default 0
*/
"sDestroyWidth": 0,
/**
* Callback functions array for every time a row is inserted (i.e. on a draw).
* @type array
* @default []
*/
"aoRowCallback": [],
/**
* Callback functions for the header on each draw.
* @type array
* @default []
*/
"aoHeaderCallback": [],
/**
* Callback function for the footer on each draw.
* @type array
* @default []
*/
"aoFooterCallback": [],
/**
* Array of callback functions for draw callback functions
* @type array
* @default []
*/
"aoDrawCallback": [],
/**
* Array of callback functions for row created function
* @type array
* @default []
*/
"aoRowCreatedCallback": [],
/**
* Callback functions for just before the table is redrawn. A return of
* false will be used to cancel the draw.
@ -430,7 +430,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aoPreDrawCallback": [],
/**
* Callback functions for when the table has been initialised.
* @type array
@ -438,7 +438,7 @@ DataTable.models.oSettings = {
*/
"aoInitComplete": [],
/**
* Callbacks for modifying the settings to be stored for state saving, prior to
* saving state.
@ -446,7 +446,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aoStateSaveParams": [],
/**
* Callbacks for modifying the settings that have been stored for state saving
* prior to using the stored values to restore the state.
@ -454,7 +454,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aoStateLoadParams": [],
/**
* Callbacks for operating on the settings object once the saved state has been
* loaded
@ -462,49 +462,49 @@ DataTable.models.oSettings = {
* @default []
*/
"aoStateLoaded": [],
/**
* Cache the table ID for quick access
* @type string
* @default <i>Empty string</i>
*/
"sTableId": "",
/**
* The TABLE node for the main table
* @type node
* @default null
*/
"nTable": null,
/**
* Permanent ref to the thead element
* @type node
* @default null
*/
"nTHead": null,
/**
* Permanent ref to the tfoot element - if it exists
* @type node
* @default null
*/
"nTFoot": null,
/**
* Permanent ref to the tbody element
* @type node
* @default null
*/
"nTBody": null,
/**
* Cache the wrapper node (contains all DataTables controlled elements)
* @type node
* @default null
*/
"nTableWrapper": null,
/**
* Indicate if when using server-side processing the loading of data
* should be deferred until the second draw.
@ -514,14 +514,14 @@ DataTable.models.oSettings = {
* @default false
*/
"bDeferLoading": false,
/**
* Indicate if all required information has been read in
* @type boolean
* @default false
*/
"bInitialised": false,
/**
* Information about open rows. Each object in the array has the parameters
* 'nTr' and 'nParent'
@ -529,7 +529,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aoOpenRows": [],
/**
* Dictate the positioning of DataTables' control elements - see
* {@link DataTable.model.oInit.sDom}.
@ -539,7 +539,7 @@ DataTable.models.oSettings = {
* @default null
*/
"sDom": null,
/**
* Which type of pagination should be used.
* Note that this parameter will be set by the initialisation routine. To
@ -548,7 +548,7 @@ DataTable.models.oSettings = {
* @default two_button
*/
"sPaginationType": "two_button",
/**
* The state duration (for `stateSave`) in seconds.
* Note that this parameter will be set by the initialisation routine. To
@ -557,7 +557,7 @@ DataTable.models.oSettings = {
* @default 0
*/
"iStateDuration": 0,
/**
* Array of callback functions for state saving. Each array element is an
* object with the following parameters:
@ -572,7 +572,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aoStateSave": [],
/**
* Array of callback functions for state loading. Each array element is an
* object with the following parameters:
@ -585,14 +585,14 @@ DataTable.models.oSettings = {
* @default []
*/
"aoStateLoad": [],
/**
* State that was loaded. Useful for back reference
* @type object
* @default null
*/
"oLoadedState": null,
/**
* Source url for AJAX data for the table.
* Note that this parameter will be set by the initialisation routine. To
@ -601,7 +601,7 @@ DataTable.models.oSettings = {
* @default null
*/
"sAjaxSource": null,
/**
* Property from a given object from which to read the table data from. This
* can be an empty string (when not server-side processing), in which case
@ -611,14 +611,14 @@ DataTable.models.oSettings = {
* @type string
*/
"sAjaxDataProp": null,
/**
* Note if draw should be blocked while getting data
* @type boolean
* @default true
*/
"bAjaxDataGet": true,
/**
* The last jQuery XHR object that was used for server-side data gathering.
* This can be used for working with the XHR information in one of the
@ -627,7 +627,7 @@ DataTable.models.oSettings = {
* @default null
*/
"jqXHR": null,
/**
* Function to get the server-side data.
* Note that this parameter will be set by the initialisation routine. To
@ -635,7 +635,7 @@ DataTable.models.oSettings = {
* @type function
*/
"fnServerData": null,
/**
* Functions which are called prior to sending an Ajax request so extra
* parameters can easily be sent to the server
@ -643,7 +643,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aoServerParams": [],
/**
* Send the XHR HTTP method - GET or POST (could be PUT or DELETE if
* required).
@ -652,7 +652,7 @@ DataTable.models.oSettings = {
* @type string
*/
"sServerMethod": null,
/**
* Format numbers for display.
* Note that this parameter will be set by the initialisation routine. To
@ -660,7 +660,7 @@ DataTable.models.oSettings = {
* @type function
*/
"fnFormatNumber": null,
/**
* List of options that can be used for the user selectable length menu.
* Note that this parameter will be set by the initialisation routine. To
@ -669,7 +669,7 @@ DataTable.models.oSettings = {
* @default []
*/
"aLengthMenu": null,
/**
* Counter for the draws that the table does. Also used as a tracker for
* server-side processing
@ -677,21 +677,21 @@ DataTable.models.oSettings = {
* @default 0
*/
"iDraw": 0,
/**
* Indicate if a redraw is being done - useful for Ajax
* @type boolean
* @default false
*/
"bDrawing": false,
/**
* Draw index (iDraw) of the last error when parsing the returned data
* @type int
* @default -1
*/
"iDrawError": -1,
/**
* Paging display length
* @type int
@ -705,7 +705,7 @@ DataTable.models.oSettings = {
* @default 0
*/
"_iDisplayStart": 0,
/**
* Server-side processing - number of records in the result set
* (i.e. before filtering), Use fnRecordsTotal rather than
@ -727,7 +727,7 @@ DataTable.models.oSettings = {
* @private
*/
"_iRecordsDisplay": 0,
/**
* Flag to indicate if jQuery UI marking and classes should be used.
* Note that this parameter will be set by the initialisation routine. To
@ -735,14 +735,14 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bJUI": null,
/**
* The classes to use for the table
* @type object
* @default {}
*/
"oClasses": {},
/**
* Flag attached to the settings object so you can check in the draw
* callback if filtering has been done in the draw. Deprecated in favour of
@ -752,7 +752,7 @@ DataTable.models.oSettings = {
* @deprecated
*/
"bFiltered": false,
/**
* Flag attached to the settings object so you can check in the draw
* callback if sorting has been done in the draw. Deprecated in favour of
@ -762,7 +762,7 @@ DataTable.models.oSettings = {
* @deprecated
*/
"bSorted": false,
/**
* Indicate that if multiple rows are in the header and there is more than
* one unique cell per column, if the top one (true) or bottom one (false)
@ -772,14 +772,14 @@ DataTable.models.oSettings = {
* @type boolean
*/
"bSortCellsTop": null,
/**
* Initialisation object that is used for the table
* @type object
* @default null
*/
"oInit": null,
/**
* Destroy callback functions - for plug-ins to attach themselves to the
* destroy so they can clean up markup and events.
@ -788,7 +788,7 @@ DataTable.models.oSettings = {
*/
"aoDestroyCallback": [],
/**
* Get the number of records in the current record set, before filtering
* @type function
@ -799,7 +799,7 @@ DataTable.models.oSettings = {
parseInt(this._iRecordsTotal, 10) :
this.aiDisplayMaster.length;
},
/**
* Get the number of records in the current record set, after filtering
* @type function
@ -810,7 +810,7 @@ DataTable.models.oSettings = {
parseInt(this._iRecordsDisplay, 10) :
this.aiDisplay.length;
},
/**
* Get the display end point - aiDisplay index
* @type function
@ -836,14 +836,14 @@ DataTable.models.oSettings = {
calc;
}
},
/**
* The DataTables object for this table
* @type object
* @default null
*/
"oInstance": null,
/**
* Unique identifier for each instance of the DataTables object. If there
* is an ID on the table node, then it takes that value, otherwise an