/* * Variable: oApi * Purpose: Container for publicly exposed 'private' functions * Scope: jQuery.dataTable */ this.oApi = {}; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Section - API functions * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Redraw the table * @param {bool} [bComplete=true] Refilter and resort (if enabled) the table before the draw. */ this.fnDraw = function( bComplete ) { var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] ); if ( typeof bComplete != 'undefined' && bComplete === false ) { _fnCalculateEnd( oSettings ); _fnDraw( oSettings ); } else { _fnReDraw( oSettings ); } }; /** * Filter the input based on data * @param {string} sInput string to filter the table on * @param {int|null} [iColumn] column to limit filtering to * @param {bool} [bRegex=false] treat as regular expression or not * @param {bool} [bSmart=true] perform smart filtering or not * @param {bool} [bShowGlobal=true] show the input global filter in it's input box(es) */ 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