function _fnFilterData ( settings )
		{
			var columns = settings.aoColumns;
			var column;
			var i, j, ien, jen, filterData, cellData, row;
			var wasInvalidated = false;
		
			for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
				row = settings.aoData[i];
		
				if ( ! row._aFilterData ) {
					filterData = [];
		
					for ( j=0, jen=columns.length ; j<jen ; j++ ) {
						column = columns[j];
		
						if ( column.bSearchable ) {
							cellData = _fnGetCellData( settings, i, j, 'filter' );
		
							// Search in DataTables 1.10 is string based. In 1.11 this
							// should be altered to also allow strict type checking.
							if ( cellData === null ) {
								cellData = '';
							}
		
							if ( typeof cellData !== 'string' && cellData.toString ) {
								cellData = cellData.toString();
							}
						}
						else {
							cellData = '';
						}
		
						// If it looks like there is an HTML entity in the string,
						// attempt to decode it so sorting works as expected. Note that
						// we could use a single line of jQuery to do this, but the DOM
						// method used here is much faster http://jsperf.com/html-decode
						if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
							__filter_div.innerHTML = cellData;
							cellData = __filter_div_textContent ?
								__filter_div.textContent :
								__filter_div.innerText;
						}
		
						if ( cellData.replace ) {
							cellData = cellData.replace(/[\r\n\u2028]/g, '');
						}
		
						filterData.push( cellData );
					}
		
					row._aFilterData = filterData;
					row._sFilterRow = filterData.join('  ');
					wasInvalidated = true;
				}
			}
		
			return wasInvalidated;
		}
// Update the filtering data for each row if needed (by invalidation or first run)
Update the filtering data for each row if needed (by invalidation or first run)
Update the filtering data for each row if needed ( by invalidation or first run )
function _fnFilterData ( settings )
		{
			var columns = settings.aoColumns;
			var column;
			var i, j, ien, jen, filterData, cellData, row;
			var wasInvalidated = false;
			for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
				row = settings.aoData[i];
				if ( ! row._aFilterData ) {
					filterData = [];
					for ( j=0, jen=columns.length ; j<jen ; j++ ) {
						column = columns[j];
						if ( column.bSearchable ) {
							cellData = _fnGetCellData( settings, i, j, 'filter' );
							if ( cellData === null ) {
								cellData = '';
							}
							if ( typeof cellData !== 'string' && cellData.toString ) {
								cellData = cellData.toString();
							}
						}
						else {
							cellData = '';
						}
						if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
							__filter_div.innerHTML = cellData;
							cellData = __filter_div_textContent ?
								__filter_div.textContent :
								__filter_div.innerText;
						}
						if ( cellData.replace ) {
							cellData = cellData.replace(/[\r\n\u2028]/g, '');
						}
						filterData.push( cellData );
					}
					row._aFilterData = filterData;
					row._sFilterRow = filterData.join('  ');
					wasInvalidated = true;
				}
			}
			return wasInvalidated;
		}
function _fnFilterData ( settings ) { var columns = settings . aoColumns ; var column ; var i , j , ien , jen , filterData , cellData , row ; var wasInvalidated = false ; for ( i = 0 , ien = settings . aoData . length ; i < ien ; i ++ ) { row = settings . aoData [ i ] ; if ( ! row . _aFilterData ) { filterData = [ ] ; for ( j = 0 , jen = columns . length ; j < jen ; j ++ ) { column = columns [ j ] ; if ( column . bSearchable ) { cellData = _fnGetCellData ( settings , i , j , 'filter' ) ; if ( cellData === null ) { cellData = '' ; } if ( typeof cellData !== 'string' && cellData . toString ) { cellData = cellData . toString ( ) ; } } else { cellData = '' ; } if ( cellData . indexOf && cellData . indexOf ( '&' ) !== - 1 ) { __filter_div . innerHTML = cellData ; cellData = __filter_div_textContent ? __filter_div . textContent : __filter_div . innerText ; } if ( cellData . replace ) { cellData = cellData . replace ( / [\r\n\u2028] / g , '' ) ; } filterData . push ( cellData ) ; } row . _aFilterData = filterData ; row . _sFilterRow = filterData . join ( '  ' ) ; wasInvalidated = true ; } } return wasInvalidated ; }
Update the filtering data for each row if needed (by invalidation or first run)
Update the filtering data for each row if needed ( by invalidation or first run )
// Search in DataTables 1.10 is string based. In 1.11 this // should be altered to also allow strict type checking. // If it looks like there is an HTML entity in the string, // attempt to decode it so sorting works as expected. Note that // we could use a single line of jQuery to do this, but the DOM // method used here is much faster http://jsperf.com/html-decode