/* * Variable: oApi * Purpose: Container for publicly exposed 'private' functions * Scope: jQuery.dataTable */ this.oApi = {}; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Section - API functions * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Function: fnDraw * Purpose: Redraw the table * Returns: - * Inputs: bool:bComplete - Refilter and resort (if enabled) the table before the draw. * Optional: default - true */ this.fnDraw = function( bComplete ) { var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] ); if ( typeof bComplete != 'undefined' && bComplete === false ) { _fnCalculateEnd( oSettings ); _fnDraw( oSettings ); } else { _fnReDraw( oSettings ); } }; /* * Function: fnFilter * Purpose: Filter the input based on data * Returns: - * Inputs: string:sInput - string to filter the table on * int:iColumn - optional - column to limit filtering to * bool:bRegex - optional - treat as regular expression or not - default false * bool:bSmart - optional - perform smart filtering or not - default true * bool:bShowGlobal - optional - show the input global filter in it's input box(es) * - default true */ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal ) { var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] ); if ( !oSettings.oFeatures.bFilter ) { return; } if ( typeof bRegex == 'undefined' ) { bRegex = false; } if ( typeof bSmart == 'undefined' ) { bSmart = true; } if ( typeof bShowGlobal == 'undefined' ) { bShowGlobal = true; } if ( typeof iColumn == "undefined" || iColumn === null ) { /* Global filter */ _fnFilterComplete( oSettings, { "sSearch":sInput, "bRegex": bRegex, "bSmart": bSmart }, 1 ); if ( bShowGlobal && typeof oSettings.aanFeatures.f != 'undefined' ) { var n = oSettings.aanFeatures.f; for ( var i=0, iLen=n.length ; i