2014-09-07 09:56:17 +02:00
/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- TableFilter v1 . 0 by Max Guglielmi
2014-10-06 13:08:29 +02:00
- build date : Mon Oct 06 2014 22 : 02 : 06
2014-09-07 09:56:17 +02:00
- http : //tablefilter.free.fr
- Copyright ( c ) 2014 , Licensed under the MIT License
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- * /
2014-10-06 13:08:29 +02:00
function TF ( a ) { "use strict" ; if ( 0 !== arguments . length ) { if ( this . id = a , this . version = "2.5" , this . year = ( new Date ) . getFullYear ( ) , this . tbl = tf _Id ( a ) , this . startRow = null , this . refRow = null , this . headersRow = null , this . fObj = null , this . nbFilterableRows = null , this . nbRows = null , this . nbCells = null , this . hasGrid = ! 1 , this . enableModules = ! 1 , ! this . tbl || "table" !== this . tbl . nodeName . tf _LCase ( ) || 0 === this . GetRowsNb ( ) ) throw new Error ( "Could not instantiate TF object: table not found." ) ; if ( arguments . length > 1 ) for ( var b = 0 ; b < arguments . length ; b ++ ) { var c = arguments [ b ] , d = typeof c ; switch ( d . tf _LCase ( ) ) { case "number" : this . startRow = c ; break ; case "object" : this . fObj = c } } var e = this . fObj || { } ; this . refRow = null === this . startRow ? 2 : this . startRow + 1 ; try { this . nbCells = this . GetCellsNb ( this . refRow ) } catch ( f ) { this . nbCells = this . GetCellsNb ( 0 ) } this . basePath = void 0 !== e . base _path ? e . base _path : "TableFilter/" , this . fltTypeInp = "input" , this . fltTypeSlc = "select" , this . fltTypeMulti = "multiple" , this . fltTypeCheckList = "checklist" , this . fltTypeNone = "none" , this . fltCol = [ ] ; for ( var g = 0 ; g < this . nbCells ; g ++ ) { var h = this [ "col" + g ] , i = e [ "col_" + g ] ; void 0 === h && ( h = void 0 === i ? this . fltTypeInp : i . tf _LCase ( ) ) , this . fltCol . push ( h ) } this . publicMethods = void 0 !== e . public _methods ? e . public _methods : ! 1 , this . fltGrid = e . grid === ! 1 ? ! 1 : ! 0 , this . gridLayout = e . grid _layout ? ! 0 : ! 1 , this . hasGridWidthsRow = ! 1 , this . gridColElms = [ ] , this . sourceTblHtml = null , this . gridLayout && ( void 0 === this . tbl . outerHTML && tf _SetOuterHtml ( ) , this . sourceTblHtml = this . tbl . outerHTML ) , this . filtersRowIndex = e . filters _row _index || 0 , this . headersRow = e . headers _row _index || ( 0 === this . filtersRowIndex ? 1 : 0 ) , this . gridLayout && ( this . headersRow > 1 ? this . filtersRowIndex = this . headersRow + 1 : ( this . filtersRowIndex = 1 , this . headersRow = 0 ) ) , this . fltCellTag = "th" !== e . filters _cell _tag || "td" !== e . filters _cell _tag ? "td" : e . filters _cell _tag , this . fltIds = [ ] , this . fltElms = [ ] , this . searchArgs = null , this . tblData = [ ] , this . validRowsIndex = null , this . fltGridEl = null , this . isFirstLoad = ! 0 , this . infDiv = null , this . lDiv = null , this . rDiv = null , this . mDiv = null , this . contDiv = null , this . infDivCssClass = e . inf _div _css _class || "inf" , this . lDivCssClass = e . left _div _css _class || "ldiv" , this . rDivCssClass = e . right _div _css _class || "rdiv" , this . mDivCssClass = e . middle _div _css _class || "mdiv" , this . contDivCssClass = e . content _div _css _class || "cont" , this . stylesheet = e . stylesheet || this . basePath + "filtergrid.css" , this . stylesheetId = this . id + "_style" , this . fltsRowCssClass = e . flts _row _css _class || "fltrow" , this . enableIcons = e . enable _icons === ! 1 ? ! 1 : ! 0 , this . alternateBgs = e . alternate _rows === ! 0 ? ! 0 : ! 1 , this . hasColWidth = e . col _width === ! 0 ? ! 0 : ! 1 , this . colWidth = this . hasColWidth ? e . col _width : null , this . fixedHeaders = e . fixed _headers === ! 0 ? ! 0 : ! 1 , this . tBodyH = isNaN ( e . tbody _height ) ? 200 : e . tbody _height , this . fltCssClass = e . flt _css _class || "flt" , this . fltMultiCssClass = e . flt _multi _css _class || "flt_multi" , this . fltSmallCssClass = e . flt _small _css _class || "flt_s" , this . singleFltCssClass = e . single _flt _css _class || "single_flt" , this . isStartBgAlternate = ! 0 , this . rowBgEvenCssClass = e . even _row _css _class || "even" , this . rowBgOddCssClass = e . odd _row _css _class || "odd" , this . enterKey = e . enter _key === ! 1 ? ! 1 : ! 0 , this . isModFilterFn = e . mod _filter _fn === ! 0 ? ! 0 : ! 1 , this . modFilterFn = this . isModFilterFn ? e . mod _filter _fn : null , this . onBeforeFilter = tf _IsFn ( e . on _before _filter ) ? e . on _before _filter : null , this . onAfterFilter = tf _IsFn ( e . on _after _filter ) ? e . on _after _filter : null , this . matchCase = e . match _case === ! 0 ? ! 0 : ! 1 , this . exactMatch = e . exact _match === ! 0 ? ! 0 : ! 1 , this . refreshFilters = e . refresh _filters === ! 0 ? ! 0 : ! 1 , this . disableExcludedOptions = e . disable _excluded _options === ! 0 ? ! 0 : ! 1 , this . activeFlt = null , this . activeFilterId = null , this . hasColOperation = e . col _operation === ! 0 ? ! 0 : ! 1 , this . colOperation = null , this . hasVisibleRows = e . rows _always _visible === ! 0 ? ! 0 : ! 1 , this . visibleRows = this . hasVisibleRows ? e . rows _always _visible : [ ] , this . searchType = e . search _type || "include" , this . isExternalFlt = e . external _flt _grid === ! 0 ? ! 0 : ! 1 , this . externalFltTgtIds = e . external _flt _grid _ids || null , this . externalFltEls = [ ] , this . execDelay = isNaN ( e . exec _delay ) ? 100 : parseInt ( e . exec _delay , 10 ) , this . status = e . status === ! 0 ? ! 0 : ! 1 , this . onFiltersLoaded = tf _IsFn ( e . on _filters _loaded ) ? e . on _filters _loaded : null , this . singleSearchFlt = e . single _search _filter === ! 0 ? ! 0 : ! 1 , this . onRowVal
break ; case d . Evt . name . resetvalues : d . _ResetValues ( ) , d . _Filter ( ) ; break ; case d . Evt . name . resetpage : d . _ResetPage ( d . pgNbCookie ) ; break ; case d . Evt . name . resetpagelength : d . _ResetPageLength ( d . pgLenCookie ) ; break ; case d . Evt . name . sort : break ; case d . Evt . name . loadextensions : d . _LoadExtensions ( ) ; break ; case d . Evt . name . loadthemes : d . _LoadThemes ( ) ; break ; default : d [ "_" + a ] . call ( null , d , b ) } ( d . status || d . statusBar ) && d . StatusMsg ( "" ) , d . loader && d . ShowLoader ( "none" ) } } var d = this , e = b && void 0 !== b . slcIndex ? b . slcIndex : null , f = b && void 0 !== b . slcExternal ? b . slcExternal : ! 1 , g = b && void 0 !== b . slcId ? b . slcId : null , h = b && void 0 !== b . pgIndex ? b . pgIndex : null ; if ( this . loader || this . status || this . statusBar ) { try { this . ShowLoader ( "" ) , this . StatusMsg ( d [ "msg" + a ] ) } catch ( i ) { } window . setTimeout ( c , this . execDelay ) } else c ( ) } , ImportModule : function ( a ) { a . path && a . name && this . IncludeFile ( a . name , a . path , a . init ) } , LoadExtensions : function ( ) { if ( ! this . Ext ) { var a = this ; this . Ext = { list : { } , add : function ( b , c , d , e ) { var f = d . split ( "/" ) [ d . split ( "/" ) . length - 1 ] , g = new RegExp ( f ) , h = d . replace ( g , "" ) ; a . Ext . list [ b ] = { name : b , description : c , file : f , path : h , callback : e } } } } this . EvtManager ( this . Evt . name . loadextensions ) } , _LoadExtensions : function ( ) { if ( this . hasExtensions && tf _IsArray ( this . extensions . name ) && tf _IsArray ( this . extensions . src ) ) for ( var a = this . extensions , b = 0 ; b < a . name . length ; b ++ ) { var c = a . src [ b ] , d = a . name [ b ] , e = a . initialize && a . initialize [ b ] ? a . initialize [ b ] : null , f = a . description && a . description [ b ] ? a . description [ b ] : null ; this . Ext . add ( d , f , c , e ) , tf _IsImported ( c ) ? e . call ( null , this ) : this . IncludeFile ( d , c , e ) } } , LoadThemes : function ( ) { this . EvtManager ( this . Evt . name . loadthemes ) } , _LoadThemes : function ( ) { if ( this . hasThemes ) { if ( ! this . Thm ) { var a = this ; this . Thm = { list : { } , add : function ( b , c , d , e ) { var f = d . split ( "/" ) [ d . split ( "/" ) . length - 1 ] , g = new RegExp ( f ) , h = d . replace ( g , "" ) ; a . Thm . list [ b ] = { name : b , description : c , file : f , path : h , callback : e } } } } if ( this . enableDefaultTheme && ( this . themes = { name : [ "DefaultTheme" ] , src : [ this . themesPath + "Default/TF_Default.css" ] , description : [ "Default Theme" ] } , this . Thm . add ( "DefaultTheme" , this . themesPath + "Default/TF_Default.css" , "Default Theme" ) ) , tf _IsArray ( this . themes . name ) && tf _IsArray ( this . themes . src ) ) for ( var b = this . themes , c = 0 ; c < b . name . length ; c ++ ) { var d = b . src [ c ] , e = b . name [ c ] , f = b . initialize && b . initialize [ c ] ? b . initialize [ c ] : null , g = b . description && b . description [ c ] ? b . description [ c ] : null ; this . Thm . add ( e , g , d , f ) , tf _IsImported ( d , "link" ) || this . IncludeFile ( e , d , null , "link" ) , tf _IsFn ( f ) && f . call ( null , this ) } this . btnResetText = null , this . btnResetHtml = '<input type="button" value="" class="' + this . btnResetCssClass + '" title="Clear filters" />' , this . btnPrevPageHtml = '<input type="button" value="" class="' + this . btnPageCssClass + ' previousPage" title="Previous page" />' , this . btnNextPageHtml = '<input type="button" value="" class="' + this . btnPageCssClass + ' nextPage" title="Next page" />' , this . btnFirstPageHtml = '<input type="button" value="" class="' + this . btnPageCssClass + ' firstPage" title="First page" />' , this . btnLastPageHtml = '<input type="button" value="" class="' + this . btnPageCssClass + ' lastPage" title="Last page" />' , this . loader = ! 0 , this . loaderHtml = '<div class="defaultLoader"></div>' , this . loaderText = null } } , RemoveGrid : function ( ) { if ( this . fltGrid && this . hasGrid ) { var a = this . tbl . rows ; this . paging && this . RemovePaging ( ) , this . statusBar && this . RemoveStatusBar ( ) , this . rowsCounter && this . RemoveRowsCounter ( ) , this . btnReset && this . RemoveResetBtn ( ) , ( this . helpInstructions || ! this . helpInstructions ) && this . RemoveHelpInstructions ( ) , this . paging && this . RemoveResultsPerPage ( ) , this . isExternalFlt && ! this . popUpFilters && this . RemoveExternalFlts ( ) , this . fixedHeaders && this . RemoveFixedHeaders ( ) , this . infDiv && this . RemoveTopDiv ( ) , this . highlightKeywords && this . UnhighlightAll ( ) , this . sort && this . RemoveSort ( ) , this . loader && this . RemoveLoader ( ) , this . popUpFilters && this . RemovePopupFilters ( ) , this . markActiveColumns && this . ClearActiveColumns ( ) , ( this . editable || this . selectable ) && this . RemoveEditable ( ) ; for ( var b = this . refRow ; b < this . nbRows ; b ++ ) { a [ b ] . style . display = "" ; try { a [ b ] . hasAttribute ( "validRow" ) && a [ b ] . removeAttribute ( "validRow" ) } catch ( c ) { for ( var d = a [ b ] , e = d . attributes , f = 0 ; f < e . length ; f ++ ) "validrow" === e . nodeName . tf _LCase ( ) && d . removeAttribute ( " validRo
} } b = b ? b : ! 1 ; var f = this . prfxCheckListDiv + a + "_" + this . id ; if ( ( tf _Id ( f ) || b ) && ( tf _Id ( c ) || ! b ) ) { var g = b ? tf _Id ( c ) : this . checkListDiv [ a ] , h = tf _CreateElm ( "ul" , [ "id" , this . fltIds [ a ] ] , [ "colIndex" , a ] ) ; h . className = this . checkListCssClass , h . onchange = this . Evt . _OnCheckListChange ; var i , j = this , k = this . tbl . rows , l = [ ] , m = this . hasCustomSlcOptions && this . customSlcOptions . cols . tf _Has ( a ) , n = [ ] ; this . refreshFilters && this . activeFilterId && ( i = this . activeFilterId . split ( "_" ) [ 0 ] , i = i . split ( this . prfxFlt ) [ 1 ] ) ; var o , p ; this . refreshFilters && this . disableExcludedOptions && ( o = [ ] , p = [ ] ) ; for ( var q = this . refRow ; q < this . nbRows ; q ++ ) if ( ! this . hasVisibleRows || ! this . visibleRows . tf _Has ( q ) || this . paging ) { var r = k [ q ] . cells , s = r . length ; if ( s == this . nbCells && ! m ) for ( var t = 0 ; s > t ; t ++ ) if ( a === t && ( ! this . refreshFilters || this . refreshFilters && this . disableExcludedOptions ) || a === t && this . refreshFilters && ( "" === k [ q ] . style . display && ! this . paging || this . paging && ( ! i || i === a || i != a && this . validRowsIndex . tf _Has ( q ) ) ) ) { var u = this . GetCellData ( t , r [ t ] ) , v = u . tf _MatchCase ( this . matchCase ) ; l . tf _Has ( v , this . matchCase ) || l . push ( u ) ; var w = p [ t ] ; this . refreshFilters && this . disableExcludedOptions && ( w || ( p [ t ] = this . GetFilteredDataCol ( t ) ) , w . tf _Has ( v , this . matchCase ) || o . tf _Has ( v , this . matchCase ) || this . isFirstLoad || o . push ( u ) ) } } if ( m ) { var x = this . _ _getCustomValues ( a ) ; l = x [ 0 ] , n = x [ 1 ] } if ( this . sortSlc && ! m && ( this . matchCase ? ( l . sort ( ) , o && o . sort ( ) ) : ( l . sort ( tf _IgnoreCaseSort ) , o && o . sort ( tf _IgnoreCaseSort ) ) ) , this . sortNumAsc && this . sortNumAsc . tf _Has ( a ) ) try { l . sort ( tf _NumSortAsc ) , o && o . sort ( tf _NumSortAsc ) , m && n . sort ( tf _NumSortAsc ) } catch ( y ) { l . sort ( ) , o && o . sort ( ) , m && n . sort ( ) } if ( this . sortNumDesc && this . sortNumDesc . tf _Has ( a ) ) try { l . sort ( tf _NumSortDesc ) , o && o . sort ( tf _NumSortDesc ) , m && n . sort ( tf _NumSortDesc ) } catch ( y ) { l . sort ( ) , o && o . sort ( ) , m && n . sort ( ) } if ( e ( this . separator ) , this . fillSlcOnDemand && ( g . innerHTML = "" ) , g . appendChild ( h ) , g . setAttribute ( "filled" , "1" ) , j . rememberGridValues && tf _isIE ) { var z = h . getAttribute ( "indexes" ) ; if ( z ) for ( var A = z . split ( "," ) , B = 0 ; B < A . length ; B ++ ) { var C = tf _Id ( this . fltIds [ a ] + "_" + A [ B ] ) ; C && ( C . checked = ! 0 ) } } } } , _ _setCheckListValues : function ( a ) { if ( a ) { for ( var b = a . value , c = parseInt ( a . id . split ( "_" ) [ 2 ] , 10 ) , d = "ul" , e = "li" , f = a ; f . nodeName . tf _LCase ( ) !== d ; ) f = f . parentNode ; if ( f . nodeName . tf _LCase ( ) === d ) { var g = f . childNodes [ c ] , h = f . getAttribute ( "colIndex" ) , i = f . getAttribute ( "value" ) , j = f . getAttribute ( "indexes" ) ; if ( a . checked ) { if ( "" === b ) { if ( j && "" !== j ) for ( var k = j . split ( this . separator ) , l = 0 ; l < k . length ; l ++ ) { var m = tf _Id ( this . fltIds [ h ] + "_" + k [ l ] ) ; m && ( m . checked = ! 1 , tf _RemoveClass ( f . childNodes [ k [ l ] ] , this . checkListSlcItemCssClass ) ) } f . setAttribute ( "value" , "" ) , f . setAttribute ( "indexes" , "" ) } else i = i ? i : "" , b = ( i + " " + b + " " + this . orOperator ) . tf _Trim ( ) , c = j + c + this . separator , f . setAttribute ( "value" , b ) , f . setAttribute ( "indexes" , c ) , tf _Id ( this . fltIds [ h ] + "_0" ) && ( tf _Id ( this . fltIds [ h ] + "_0" ) . checked = ! 1 ) ; g . nodeName . tf _LCase ( ) === e && ( tf _RemoveClass ( f . childNodes [ 0 ] , this . checkListSlcItemCssClass ) , tf _AddClass ( g , this . checkListSlcItemCssClass ) ) } else { if ( "" !== b ) { var n = new RegExp ( tf _RegexpEscape ( b + " " + this . orOperator ) ) ; i = i . replace ( n , "" ) , f . setAttribute ( "value" , i . tf _Trim ( ) ) ; var o = new RegExp ( tf _RegexpEscape ( c + this . separator ) ) ; j = j . replace ( o , "" ) , f . setAttribute ( "indexes" , j ) } g . nodeName . tf _LCase ( ) === e && tf _RemoveClass ( g , this . checkListSlcItemCssClass ) } } } } , SetResetBtn : function ( ) { if ( this . hasGrid || this . isFirstLoad || ! this . btnResetEl ) { var a = this . fObj ; this . btnResetTgtId = a . btn _reset _target _id || null , this . btnResetEl = null , this . btnResetText = a . btn _reset _text || "Reset" , this . btnResetTooltip = a . btn _reset _tooltip || "Clear filters" , this . btnResetHtml = a . btn _reset _html || ( this . enableIcons ? '<input type="button" value="" class="' + this . btnResetCssClass + '" title="' + this . btnResetTooltip + '" />' : null ) ; var b = tf _CreateElm ( "span" , [ "id" , this . prfxResetSpan + this . id ] ) ; this . btnResetTgtId || this . SetTopDiv ( ) ; var c = this . btnResetTgtId ? tf _Id ( this . btnResetTgtId ) : this . rDiv ; if ( c . appendChild ( b ) , this . btnResetHtml ) { b . innerHTML = this . btnResetHtml ; var d = b . firstChild ; d . onclick = this . Evt . _Clear } else { var e = tf _CreateElm ( "a" , [ "href" , "javascript:void(0);" ] ) ; e . className = this . btnResetCssClass , e . appendChild ( tf _CreateText ( this . btnResetText ) ) , b . appendChild ( e ) , e . onclick = this . Evt . _Clear } this . btnResetEl = tf _Id ( thi
var d = b ? "" : "none" , e = b ? "true" : "false" ; c . style . display = d , this . paging && c . setAttribute ( "validRow" , e ) } } , ValidateAllRows : function ( ) { if ( this . hasGrid ) { this . validRowsIndex = [ ] ; for ( var a = this . refRow ; a < this . nbFilterableRows ; a ++ ) this . SetRowValidation ( a , ! 0 ) , this . validRowsIndex . push ( a ) } } , SetFilterValue : function ( a , b , c ) { if ( ( this . fltGrid || this . isFirstLoad ) && this . GetFilterElement ( a ) ) { var d = this . GetFilterElement ( a ) , e = void 0 === c ? ! 0 : c , f = this [ "col" + a ] ; if ( b = void 0 === b ? "" : b , f !== this . fltTypeMulti && f != this . fltTypeCheckList ) d . value = b , f === this . fltTypeInp && "" !== this . inpWatermark && tf _RemoveClass ( d , this . inpWatermarkCssClass ) ; else if ( f === this . fltTypeMulti ) { for ( var g = b . split ( " " + this . orOperator + " " ) , h = 0 , i = 0 ; i < d . options . length ; i ++ ) if ( "" === g && ( d . options [ i ] . selected = ! 1 ) , "" === d . options [ i ] . value && ( d . options [ i ] . selected = ! 1 ) , "" !== d . options [ i ] . value && g . tf _Has ( d . options [ i ] . value , ! 0 ) ) if ( tf _isIE ) { var j = h == g . length - 1 && e ? ! 0 : ! 1 ; this . _ _deferMultipleSelection ( d , i , j ) , h ++ } else d . options [ i ] . selected = ! 0 } else if ( f === this . fltTypeCheckList ) { b = b . tf _MatchCase ( this . matchCase ) ; for ( var k = b . split ( " " + this . orOperator + " " ) , l = ( d . setAttribute ( "value" , "" ) , d . setAttribute ( "indexes" , "" ) , 0 ) ; l < tf _Tag ( d , "li" ) . length ; l ++ ) { var m = tf _Tag ( d , "li" ) [ l ] , n = tf _Tag ( m , "label" ) [ 0 ] , o = tf _Tag ( m , "input" ) [ 0 ] , p = tf _GetNodeText ( n ) . tf _MatchCase ( this . matchCase ) ; "" !== p && k . tf _Has ( p , ! 0 ) ? ( o . checked = ! 0 , this . _ _setCheckListValues ( o ) ) : ( o . checked = ! 1 , this . _ _setCheckListValues ( o ) ) } } } } , SetColWidths : function ( a ) { function b ( a ) { if ( ( d || d . nbCells == d . colWidth . length ) && d . nbCells == a . cells . length ) for ( var b = 0 ; b < d . nbCells ; b ++ ) a . cells [ b ] . style . width = d . colWidth [ b ] } if ( this . fltGrid && this . hasColWidth ) { var c , d = this ; c = void 0 === a ? "none" != this . tbl . rows [ 0 ] . style . display ? 0 : 1 : a , b ( this . tbl . rows [ c ] ) } } , SetVisibleRows : function ( ) { if ( this . hasGrid && this . hasVisibleRows && ! this . paging ) for ( var a = 0 ; a < this . visibleRows . length ; a ++ ) this . visibleRows [ a ] <= this . nbRows && this . SetRowValidation ( this . visibleRows [ a ] , ! 0 ) } , ClearFilters : function ( ) { this . EvtManager ( this . Evt . name . clear ) } , _ClearFilters : function ( ) { if ( this . fltGrid ) { this . onBeforeReset && this . onBeforeReset . call ( null , this , this . GetFiltersValue ( ) ) ; for ( var a = 0 ; a < this . fltIds . length ; a ++ ) this . SetFilterValue ( a , "" ) ; this . refreshFilters && ( this . activeFilterId = "" , this . RefreshFiltersGrid ( ) ) , this . rememberPageLen && tf _RemoveCookie ( this . pgLenCookie ) , this . rememberPageNb && tf _RemoveCookie ( this . pgNbCookie ) , this . onAfterReset && this . onAfterReset . call ( null , this ) } } , ClearActiveColumns : function ( ) { for ( var a = 0 ; a < this . fltIds . length ; a ++ ) tf _RemoveClass ( this . GetHeaderElement ( a ) , this . activeColumnsCssClass ) } , RefreshGrid : function ( a ) { var b = a ? a : this . fObj , c = this . sort ; c && ( this . sort = ! 1 ) , this . nbRows = this . GetRowsNb ( ) , this . RemoveGrid ( ) , window [ "tf_" + this . id ] = new TF ( this . id , this . startRow , b ) , this . isFirstLoad = ! 0 , this . fltIds = [ ] , this . _AddGrid ( ) , c && ( this . st . setTBody ( this . tbl . tBodies [ 0 ] ) , this . sort = ! 0 ) } , RefreshFiltersGrid : function ( ) { var a = this . GetFiltersByType ( this . fltTypeSlc , ! 0 ) , b = this . GetFiltersByType ( this . fltTypeMulti , ! 0 ) , c = this . GetFiltersByType ( this . fltTypeCheckList , ! 0 ) , d = a . concat ( b ) ; if ( d = d . concat ( c ) , this . activeFilterId ) { var e = this . activeFilterId . split ( "_" ) [ 0 ] ; e = e . split ( this . prfxFlt ) [ 1 ] ; for ( var f , g = 0 ; g < d . length ; g ++ ) { var h = tf _Id ( this . fltIds [ d [ g ] ] ) ; if ( f = this . GetFilterValue ( d [ g ] ) , e !== d [ g ] || this . paging && a . tf _Has ( d [ g ] ) && e === d [ g ] || ! this . paging && ( c . tf _Has ( d [ g ] ) || b . tf _Has ( d [ g ] ) ) || f === this . displayAllText ) { if ( c . tf _Has ( d [ g ] ) ? this . checkListDiv [ d [ g ] ] . innerHTML = "" : h . innerHTML = "" , this . fillSlcOnDemand ) { var i = tf _CreateOpt ( this . displayAllText , "" ) ; h && h . appendChild ( i ) } c . tf _Has ( d [ g ] ) ? this . _PopulateCheckList ( d [ g ] ) : this . _PopulateSelect ( d [ g ] , ! 0 ) , this . SetFilterValue ( d [ g ] , f ) } } } } , SetColOperation : function ( ) { if ( this . isFirstLoad || this . hasGrid ) { this . onBeforeOperation && this . onBeforeOperation . call ( null , this ) ; var colOperation = this . colOperation , labelId = colOperation . id , colIndex = colOperation . col , operation = colOperation . operation , outputType = colOperation . write _method , totRowIndex = colOperation . tot _row _index , excludeRow = colOperation . exclude _row , decimalPrecision = void 0 !== colOperation . decimal _precision ? colOperation . decimal _precision : 2 , ucolIndex = [ ] , ucolMax = 0 ; ucolIndex [ ucolMax ] = colIndex [ 0 ] ; for ( var ii = 1 ; ii < colIndex . leng