/*------------------------------------------------------------------------ - HTML Table Filter Generator - Populate Checklist filters feature v1.2 - By Max Guglielmi (tablefilter.free.fr) - Licensed under the MIT License -------------------------------------------------------------------------*/ TF.prototype.PopulateCheckList = function(colIndex, isExternal, extFltId) { this.EvtManager( this.Evt.name.populatechecklist, { slcIndex:colIndex, slcExternal:isExternal, slcId:extFltId } ); } TF.prototype._PopulateCheckList = function(colIndex, isExternal, extFltId) /*==================================================== - populates checklist filters =====================================================*/ { isExternal = (isExternal==undefined) ? false : isExternal; var divFltId = this.prfxCheckListDiv+colIndex+'_'+this.id; if( tf_Id(divFltId)==null && !isExternal ) return; if( tf_Id(extFltId)==null && isExternal ) return; var flt = (!isExternal) ? this.checkListDiv[colIndex] : tf_Id(extFltId); var ul = tf_CreateElm('ul',['id',this.fltIds[colIndex]],['colIndex',colIndex]); ul.className = this.checkListCssClass; ul.onchange = this.Evt._OnCheckListChange; var o = this, row = this.tbl.rows; var optArray = []; var isCustomSlc = (this.hasCustomSlcOptions //custom select test && this.customSlcOptions.cols.tf_Has(colIndex)); var optTxt = []; //custom selects text var activeFlt; if(this.refreshFilters && this.activeFilterId){ activeFlt = this.activeFilterId.split('_')[0]; activeFlt = activeFlt.split(this.prfxFlt)[1]; } var excludedOpts = null, filteredDataCol = null; if(this.refreshFilters && this.disableExcludedOptions){ excludedOpts = []; filteredDataCol = []; } for(var k=this.refRow; k 0){ if(o.hasCustomSlcOptions && o.customSlcOptions.cols.tf_Has(colIndex)){ fltArr.push(tmpVal); } else { fltArr = tmpVal.split(' '+o.orOperator+' '); } } for(var y=0; y