diff --git a/dist/filtergrid.css b/dist/filtergrid.css index fafd5bcb..fc12e8d5 100644 --- a/dist/filtergrid.css +++ b/dist/filtergrid.css @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------ - TableFilter stylesheet by Max Guglielmi - - (build date: Sun Nov 09 2014 19:28:32) + - (build date: Sat Nov 15 2014 19:34:47) - Edit below for your projects' needs ------------------------------------------------------------------------*/ diff --git a/dist/tablefilter.js b/dist/tablefilter.js index 8d0bcb16..8fa256e2 100644 --- a/dist/tablefilter.js +++ b/dist/tablefilter.js @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------ - TableFilter v3.0.0 by Max Guglielmi - - build date: Sun Nov 09 2014 19:28:31 + - build date: Sat Nov 15 2014 19:34:46 - http://tablefilter.free.fr - Copyright (c) 2014, Licensed under the MIT License ------------------------------------------------------------------------*/ -!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b:a.TableFilter=b()}(this,function(){var requirejs,require,define;return function(a){function b(a,b){return r.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=p.map,q=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,p.nodeIdCompat&&t.test(a[g])&&(a[g]=a[g].replace(t,"")),a=n.concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||q)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function d(b,c){return function(){var d=s.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),k.apply(a,d.concat([b,c]))}}function e(a){return function(b){return c(b,a)}}function f(a){return function(b){n[a]=b}}function g(c){if(b(o,c)){var d=o[c];delete o[c],q[c]=!0,j.apply(a,d)}if(!b(n,c)&&!b(q,c))throw new Error("No "+c);return n[c]}function h(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function i(a){return function(){return p&&p.config&&p.config[a]||{}}}var j,k,l,m,n={},o={},p={},q={},r=Object.prototype.hasOwnProperty,s=[].slice,t=/\.js$/;l=function(a,b){var d,f=h(a),i=f[0];return a=f[1],i&&(i=c(i,b),d=g(i)),i?a=d&&d.normalize?d.normalize(a,e(b)):c(a,b):(a=c(a,b),f=h(a),i=f[0],a=f[1],i&&(d=g(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},m={require:function(a){return d(a)},exports:function(a){var b=n[a];return"undefined"!=typeof b?b:n[a]={}},module:function(a){return{id:a,uri:"",exports:n[a],config:i(a)}}},j=function(c,e,h,i){var j,k,p,r,s,t,u=[],v=typeof h;if(i=i||c,"undefined"===v||"function"===v){for(e=!e.length&&h.length?["require","exports","module"]:e,s=0;s]+>/g,"");return b=b.replace(/^\s+/,"").replace(/\s+$/,"")},b.create=function(a){if(a&&""!==a){var b=document.createElement(a),c=arguments;if(c.length>1)for(var d=0;d0){var d=document.cookie,e=d.indexOf(c);if(-1!==e){e+=c.length;var f=d.indexOf(";",e);-1===f&&(f=d.length),b=unescape(d.substring(e,f))}}return b},a.remove=function(a){this.write(a,"",-1)},a.valueToArray=function(a,b){b||(b=",");var c=this.read(a),d=c.split(b);return d},a.getValueByIndex=function(a,b,c){c||(c=",");var d=this.valueToArray(a,c);return d[b]},a}),define("types",[],function(){var a={},b=void 0;return a.isObj=function(a){var b=!1;return"string"==typeof a?window[a]&&"object"==typeof window[a]&&(b=!0):a&&"object"==typeof a&&(b=!0),b},a.isFn=function(a){return a&&a.constructor==Function},a.isArray=function(a){return a&&a.constructor==Array},a.isUndef=function(a){return a===b},a}),define("array",["require","./string"],function(a){var b=a("./string"),c={has:function(a,c,d){for(var e=void 0===d?!1:d,f=0;f2)return a;var b;return 99>=a&&a>50&&(b="19"+a),(50>a||"00"===a)&&(b="20"+a),b}function d(a){if(void 0===a)return 0;for(var b,c=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],d=0;d11||23>b)&&(b-=12),1>b||b>12?0:b}if(b||(b="DMY"),!a||""===a)return new Date(1001,0,1);var e,f;switch(b.toUpperCase()){case"DDMMMYYYY":f=a.replace(/[- \/.]/g," ").split(" "),e=new Date(c(f[2]),d(f[1])-1,f[0]);break;case"DMY":f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0]);break;case"MDY":f=a.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[0]-1,f[1]);break;case"YMD":f=a.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),e=new Date(c(f[0]),f[1]-1,f[2]);break;default:f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0])}return e}};return a}),define("modules/loader",["../dom","../types"],function(a,b){function c(c){var d=c.fObj;c.loaderTgtId=d.loader_target_id||null,c.loaderDiv=null,c.loaderText=d.loader_text||"Loading...",c.loaderHtml=d.loader_html||null,c.loaderCssClass=d.loader_css_class||"loader",c.loaderCloseDelay=200,c.onShowLoader=b.isFn(d.on_show_loader)?d.on_show_loader:null,c.onHideLoader=b.isFn(d.on_hide_loader)?d.on_hide_loader:null,this.tf=c;var e=a.create("div",["id",c.prfxLoader+c.id]);e.className=c.loaderCssClass;var f=c.loaderTgtId?a.id(c.loaderTgtId):c.gridLayout?c.tblCont:c.tbl.parentNode;c.loaderTgtId?f.appendChild(e):f.insertBefore(e,c.tbl),c.loaderDiv=a.id(c.prfxLoader+c.id),c.loaderHtml?c.loaderDiv.innerHTML=c.loaderHtml:c.loaderDiv.appendChild(a.text(c.loaderText))}var d=window;return c.prototype.show=function(a){function b(){c.loaderDiv&&(c.onShowLoader&&"none"!==a&&c.onShowLoader.call(null,c),c.loaderDiv.style.display=a,c.onHideLoader&&"none"===a&&c.onHideLoader.call(null,c))}if(this.tf.loader&&this.tf.loaderDiv&&this.tf.loaderDiv.style.display!==a){var c=this.tf,e="none"===a?this.tf.loaderCloseDelay:1;d.setTimeout(b,e)}},c.prototype.remove=function(){if(this.tf.loaderDiv){var b=this.tf.loaderTgtId?a.id(this.tf.loaderTgtId):this.tf.gridLayout?this.tf.tblCont:this.tf.tbl.parentNode;b.removeChild(this.tf.loaderDiv),this.tf.loaderDiv=null}},c}),define("modules/alternateRows",["../dom"],function(a){function b(a){var b=a.fObj;this.evenCss=b.even_row_css_class||"even",this.oddCss=b.odd_row_css_class||"odd",this.tf=a}return b.prototype.set=function(){if(this.tf.hasGrid||this.tf.isFirstLoad)for(var a=(this.tf.tbl.rows,null===this.tf.validRowsIndex),b=a?this.tf.refRow:0,c=a?this.tf.nbFilterableRows+b:this.tf.validRowsIndex.length,d=0,e=b;c>e;e++){var f=a?e:this.tf.validRowsIndex[e];this.setRowBg(f,d),d++}},b.prototype.setRowBg=function(b,c){if(this.tf.alternateBgs&&!isNaN(b)){var d=this.tf.tbl.rows,e=c?c:b;this.removeRowBg(b),a.addClass(d[b],e%2?this.evenCss:this.oddCss)}},b.prototype.removeRowBg=function(b){if(!isNaN(b)){var c=this.tf.tbl.rows;a.removeClass(c[b],this.oddCss),a.removeClass(c[b],this.evenCss)}},b.prototype.remove=function(){if(this.tf.hasGrid){for(var a=(this.tf.tbl.rows,this.tf.refRow);a1)for(var b=0;b1?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.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=types.isFn(e.on_before_filter)?e.on_before_filter:null,this.onAfterFilter=types.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=types.isFn(e.on_filters_loaded)?e.on_filters_loaded:null,this.singleSearchFlt=e.single_search_filter===!0?!0:!1,this.onRowValidated=types.isFn(e.on_row_validated)?e.on_row_validated:null,this.customCellDataCols=e.custom_cell_data_cols?e.custom_cell_data_cols:[],this.customCellData=types.isFn(e.custom_cell_data)?e.custom_cell_data:null,this.inpWatermark=e.input_watermark||"",this.inpWatermarkCssClass=e.input_watermark_css_class||"fltWatermark",this.isInpWatermarkArray=types.isArray(e.input_watermark),this.toolBarTgtId=e.toolbar_target_id||null,this.helpInstructions=e.help_instructions||null,this.popUpFilters=e.popup_filters===!0?!0:!1,this.markActiveColumns=e.mark_active_columns===!0?!0:!1,this.activeColumnsCssClass=e.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=types.isFn(e.on_before_active_column)?e.on_before_active_column:null,this.onAfterActiveColumn=types.isFn(e.on_after_active_column)?e.on_after_active_column:null,this.displayAllText=e.display_all_text||"",this.enableSlcResetFilter=e.enable_slc_reset_filter===!1?!1:!0,this.enableEmptyOption=e.enable_empty_option===!0?!0:!1,this.emptyText=e.empty_text||"(Empty)",this.enableNonEmptyOption=e.enable_non_empty_option===!0?!0:!1,this.nonEmptyText=e.non_empty_text||"(Non empty)",this.onSlcChange=e.on_change===!1?!1:!0,this.sortSlc=e.sort_select===!1?!1:!0,this.isSortNumAsc=e.sort_num_asc===!0?!0:!1,this.sortNumAsc=this.isSortNumAsc?e.sort_num_asc:null,this.isSortNumDesc=e.sort_num_desc===!0?!0:!1,this.sortNumDesc=this.isSortNumDesc?e.sort_num_desc:null,this.slcFillingMethod=e.slc_filling_method||"createElement",this.fillSlcOnDemand=e.fill_slc_on_demand===!0?!0:!1,this.activateSlcTooltip=e.activate_slc_tooltip||"Click to activate",this.multipleSlcTooltip=e.multiple_slc_tooltip||"Use Ctrl key for multiple selections",this.hasCustomSlcOptions=types.isObj(e.custom_slc_options)?!0:!1,this.customSlcOptions=types.isArray(e.custom_slc_options)?e.custom_slc_options:null,this.onBeforeOperation=types.isFn(e.on_before_operation)?e.on_before_operation:null,this.onAfterOperation=types.isFn(e.on_after_operation)?e.on_after_operation:null,this.checkListDiv=[],this.checkListDivCssClass=e.div_checklist_css_class||"div_checklist",this.checkListCssClass=e.checklist_css_class||"flt_checklist",this.checkListItemCssClass=e.checklist_item_css_class||"flt_checklist_item",this.checkListSlcItemCssClass=e.checklist_selected_item_css_class||"flt_checklist_slc_item",this.activateCheckListTxt=e.activate_checklist_text||"Click to load filter data",this.checkListItemDisabledCssClass=e.checklist_item_disabled_css_class||"flt_checklist_item_disabled",this.enableCheckListResetFilter=e.enable_checklist_reset_filter===!1?!1:!0,this.rgxOperator=e.regexp_operator||"rgx:",this.emOperator=e.empty_operator||"[empty]",this.nmOperator=e.nonempty_operator||"[nonempty]",this.orOperator=e.or_operator||"||",this.anOperator=e.and_operator||"&&",this.grOperator=e.greater_operator||">",this.lwOperator=e.lower_operator||"<",this.leOperator=e.lower_equal_operator||"<=",this.geOperator=e.greater_equal_operator||">=",this.dfOperator=e.different_operator||"!",this.lkOperator=e.like_operator||"*",this.eqOperator=e.equal_operator||"=",this.stOperator=e.start_with_operator||"{",this.enOperator=e.end_with_operator||"}",this.curExp=e.cur_exp||"^[¥£€$]",this.separator=e.separator||",",this.rowsCounter=e.rows_counter===!0?!0:!1,this.statusBar=e.status_bar===!0?!0:!1,this.loader=e.loader===!0?!0:!1,this.displayBtn=e.btn===!0?!0:!1,this.btnText=e.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=e.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=e.btn_reset===!0?!0:!1,this.btnResetCssClass=e.btn_reset_css_class||"reset",this.onBeforeReset=types.isFn(e.on_before_reset)?e.on_before_reset:null,this.onAfterReset=types.isFn(e.on_after_reset)?e.on_after_reset:null,this.paging=e.paging===!0?!0:!1,this.hasResultsPerPage=e.results_per_page===!0?!0:!1,this.btnPageCssClass=e.paging_btn_css_class||"pgInp",this.pagingSlc=null,this.resultsPerPage=null,this.resultsPerPageSlc=null,this.isPagingRemoved=!1,this.nbVisibleRows=0,this.nbHiddenRows=0,this.startPagingRow=0,this.nbPages=0,this.currentPageNb=1,this.sort=e.sort===!0?!0:!1,this.isSortEnabled=!1,this.sorted=!1,this.sortConfig=e.sort_config||{},this.sortConfig.name=void 0!==this.sortConfig.name?e.sort_config.name:"sortabletable",this.sortConfig.src=void 0!==this.sortConfig.src?e.sort_config.src:this.basePath+"sortabletable.js",this.sortConfig.adapterSrc=void 0!==this.sortConfig.adapter_src?e.sort_config.adapter_src:this.basePath+"tfAdapter.sortabletable.js",this.sortConfig.initialize=void 0!==this.sortConfig.initialize?e.sort_config.initialize:function(a){a.SetSortTable&&a.SetSortTable()},this.sortConfig.sortTypes=types.isArray(this.sortConfig.sort_types)?e.sort_config.sort_types:[],this.sortConfig.sortCol=void 0!==this.sortConfig.sort_col?e.sort_config.sort_col:null,this.sortConfig.asyncSort=this.sortConfig.async_sort===!0?!0:!1,this.sortConfig.triggerIds=types.isArray(this.sortConfig.sort_trigger_ids)?e.sort_config.sort_trigger_ids:[],this.selectable=e.selectable===!0?!0:!1,this.editable=e.editable===!0?!0:!1,this.ezEditTableConfig=e.ezEditTable_config||{},this.ezEditTableConfig.name=void 0!==this.ezEditTableConfig.name?e.ezEditTable_config.name:"ezedittable",this.ezEditTableConfig.src=void 0!==this.ezEditTableConfig.src?e.ezEditTable_config.src:this.basePath+"ezEditTable/ezEditTable.js",this.ezEditTableConfig.loadStylesheet=this.ezEditTableConfig.loadStylesheet===!0?!0:!1,this.ezEditTableConfig.stylesheet=this.ezEditTableConfig.stylesheet||this.basePath+"ezEditTable/ezEditTable.css",this.ezEditTableConfig.stylesheetName=void 0!==this.ezEditTableConfig.stylesheetName?e.ezEditTable_config.stylesheetName:"ezEditTableCss",this.ezEditTableConfig.err='Failed to instantiate EditTable object.\n"ezEditTable" module may not be available.',this.onKeyUp=e.on_keyup===!0?!0:!1,this.onKeyUpDelay=isNaN(e.on_keyup_delay)?900:e.on_keyup_delay,this.isUserTyping=null,this.onKeyUpTimer=void 0,this.highlightKeywords=e.highlight_keywords===!0?!0:!1,this.highlightCssClass=e.highlight_css_class||"keyword",this.highlightedNodes=[],this.defaultDateType=e.default_date_type||"DMY",this.thousandsSeparator=e.thousands_separator||",",this.decimalSeparator=e.decimal_separator||".",this.hasColNbFormat=e.col_number_format===!0?!0:!1,this.colNbFormat=types.isArray(this.hasColNbFormat)?e.col_number_format:null,this.hasColDateType=e.col_date_type===!0?!0:!1,this.colDateType=types.isArray(this.hasColDateType)?e.col_date_type:null,this.msgFilter=e.msg_filter||"Filtering data...",this.msgPopulate=e.msg_populate||"Populating filter...",this.msgPopulateCheckList=e.msg_populate_checklist||"Populating list...",this.msgChangePage=e.msg_change_page||"Collecting paging data...",this.msgClear=e.msg_clear||"Clearing filters...",this.msgChangeResults=e.msg_change_results||"Changing results per page...",this.msgResetValues=e.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=e.msg_reset_page||"Re-setting page...",this.msgResetPageLength=e.msg_reset_page_length||"Re-setting page length...",this.msgSort=e.msg_sort||"Sorting data...",this.msgLoadExtensions=e.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=e.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxContentDiv="cont_",this.prfxCheckListDiv="chkdiv_",this.prfxSlcPages="slcPages_",this.prfxSlcResults="slcResults_",this.prfxSlcResultsTxt="slcResultsTxt_",this.prfxBtnNextSpan="btnNextSpan_",this.prfxBtnPrevSpan="btnPrevSpan_",this.prfxBtnLastSpan="btnLastSpan_",this.prfxBtnFirstSpan="btnFirstSpan_",this.prfxBtnNext="btnNext_",this.prfxBtnPrev="btnPrev_",this.prfxBtnLast="btnLast_",this.prfxBtnFirst="btnFirst_",this.prfxPgSpan="pgspan_",this.prfxPgBeforeSpan="pgbeforespan_",this.prfxPgAfterSpan="pgafterspan_",this.prfxCounter="counter_",this.prfxTotRows="totrows_span_",this.prfxTotRowsTxt="totRowsTextSpan_",this.prfxResetSpan="resetspan_",this.prfxLoader="load_",this.prfxStatus="status_",this.prfxStatusSpan="statusSpan_",this.prfxStatusTxt="statusText_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.prfxMainTblCont="gridCont_",this.prfxTblCont="tblCont_",this.prfxHeadTblCont="tblHeadCont_",this.prfxHeadTbl="tblHead_",this.prfxGridFltTd="_td_",this.prfxGridTh="tblHeadTh_",this.prfxHelpSpan="helpSpan_",this.prfxHelpDiv="helpDiv_",this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_",this.hasStoredValues=!1,this.rememberGridValues=e.remember_grid_values===!0?!0:!1,this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&e.remember_page_number?!0:!1,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&e.remember_page_length?!0:!1,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.cookieDuration=isNaN(e.set_cookie_duration)?1e5:parseInt(e.set_cookie_duration,10),this.hasExtensions=e.extensions===!0?!0:!1,this.extensions=this.hasExtensions?e.extensions:null,this.enableDefaultTheme=e.enable_default_theme===!0?!0:!1,this.hasThemes=e.enable_default_theme||e.themes&&types.isObj(e.themes)?!0:!1,this.themes=this.hasThemes?e.themes:null,this.themesPath=e.themes_path||this.basePath+"TF_Themes/",this.Cpt={loader:null,alternateRows:null};var j=this;this.Evt={name:{filter:"Filter",populateselect:"Populate",populatechecklist:"PopulateCheckList",changepage:"ChangePage",clear:"Clear",changeresultsperpage:"ChangeResults",resetvalues:"ResetValues",resetpage:"ResetPage",resetpagelength:"ResetPageLength",sort:"Sort",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},getKeyCode:function(a){return a.charCode?a.charCode:a.keyCode?a.keyCode:a.which?a.which:0},_DetectKey:function(a){if(j.enterKey){var b=a||global.event;if(b){var c=j.Evt.getKeyCode(b);13===c?(j._Filter(),evt.cancel(b),evt.stop(b)):(j.isUserTyping=!0,global.clearInterval(j.onKeyUpTimer),j.onKeyUpTimer=void 0)}}},_OnKeyUp:function(a){function b(){global.clearInterval(j.onKeyUpTimer),j.onKeyUpTimer=void 0,j.isUserTyping||(j.Filter(),j.isUserTyping=null)}if(j.onKeyUp){var c=a||global.event,d=j.Evt.getKeyCode(c);j.isUserTyping=!1,13!==d&&9!==d&&27!==d&&38!==d&&40!==d?void 0===j.onKeyUpTimer&&(j.onKeyUpTimer=global.setInterval(b,j.onKeyUpDelay)):(global.clearInterval(j.onKeyUpTimer),j.onKeyUpTimer=void 0)}},_OnKeyDown:function(){j.onKeyUp&&(j.isUserTyping=!0)},_OnInpBlur:function(){j.onKeyUp&&(j.isUserTyping=!1,global.clearInterval(j.onKeyUpTimer)),""===this.value&&""!==j.inpWatermark&&(this.value=j.isInpWatermarkArray?j.inpWatermark[this.getAttribute("ct")]:j.inpWatermark,dom.addClass(this,j.inpWatermarkCssClass)),j.ezEditTable&&(j.editable&&j.ezEditTable.Editable.Set(),j.selectable&&j.ezEditTable.Selection.Set())},_OnInpFocus:function(a){var b=a||global.event;if(j.activeFilterId=this.getAttribute("id"),j.activeFlt=dom.id(j.activeFilterId),j.isInpWatermarkArray){var c=j.inpWatermark[this.getAttribute("ct")];this.value===c&&""!==c&&(this.value="",dom.removeClass(this,j.inpWatermarkCssClass))}else this.value===j.inpWatermark&&""!==j.inpWatermark&&(this.value="",dom.removeClass(this,j.inpWatermarkCssClass));j.popUpFilters&&(evt.cancel(b),evt.stop(b)),j.ezEditTable&&(j.editable&&j.ezEditTable.Editable.Remove(),j.selectable&&j.ezEditTable.Selection.Remove())},_OnSlcFocus:function(a){var b=a||global.event;if(j.activeFilterId=this.getAttribute("id"),j.activeFlt=dom.id(j.activeFilterId),j.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var c=this.getAttribute("ct");j.PopulateSelect(c),hlp.isIE()||this.setAttribute("filled","1")}j.popUpFilters&&(evt.cancel(b),evt.stop(b))},_OnSlcChange:function(a){var b=j.activeFlt.getAttribute("colIndex");if(!j.activeFlt||!b||j["col"+b]!==j.fltTypeCheckList||j.Evt._OnSlcChange.caller){var c=a||global.event;j.popUpFilters&&evt.stop(c),j.onSlcChange&&j.Filter()}},_OnSlcBlur:function(){},_OnCheckListChange:function(a){j.Evt._OnCheckListChange.caller&&j.Evt._OnSlcChange(a)},_OnCheckListClick:function(){if(j.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var a=this.getAttribute("ct");j.PopulateCheckList(a),j.checkListDiv[a].onclick=null,j.checkListDiv[a].title=""}},_OnCheckListFocus:function(){j.activeFilterId=this.firstChild.getAttribute("id"),j.activeFlt=dom.id(j.activeFilterId)},_OnCheckListBlur:function(){},_OnBtnClick:function(){j.Filter()},_OnSlcPagesChangeEvt:null,_EnableSlc:function(){this.firstChild.disabled=!1,this.firstChild.focus(),this.onclick=null},_Clear:function(){j.ClearFilters()},_OnHelpBtnClick:function(){j._ToggleHelp()},_Paging:{nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null}}}}function numSortAsc(a,b){return a-b}function numSortDesc(a,b){return b-a}function ignoreCaseSort(a,b){var c=str.lower(a),d=str.lower(b);return d>c?-1:c>d?1:0}function removeNbFormat(a,b){if(a){b||(b="us");var c=a;return c="us"===str.lower(b)?+c.replace(/[^\d\.-]/g,""):+c.replace(/[^\d\,-]/g,"").replace(",",".")}}function isImported(a,b){for(var c=!1,d=b?b:"script",e="script"==d?"src":"href",f=dom.tag(doc,d),g=0;g0?f[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popUpFilters&&this.headersRow++,this.popUpFilters&&this.headersRow++,this.fixedHeaders&&this.SetFixedHeaders(),e.className=this.fltsRowCssClass,this.isExternalFlt&&(!this.gridLayout||this.popUpFilters)&&(e.style.display="none")}this.nbFilterableRows=this.GetRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var g=0;c>g;g++){var h=dom.create(this.fltCellTag),i=this["col"+g],j=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[g]:null;if(this.singleSearchFlt&&(h.colSpan=this.nbCells),this.gridLayout||e.appendChild(h),a=g==c-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.popUpFilters&&this.SetPopupFilter(g),void 0===i&&(i=void 0===b["col_"+g]?this.fltTypeInp:str.lower(b["col_"+g])),this.singleSearchFlt&&(i=this.fltTypeInp,a=this.singleFltCssClass),i===this.fltTypeSlc||i===this.fltTypeMulti){var k=dom.create(this.fltTypeSlc,["id",this.prfxFlt+g+"_"+this.id],["ct",g],["filled","0"]); -if(i===this.fltTypeMulti&&(k.multiple=this.fltTypeMulti,k.title=this.multipleSlcTooltip),k.className=str.lower(i)===this.fltTypeSlc?a:this.fltMultiCssClass,j?(dom.id(j).appendChild(k),this.externalFltEls.push(k)):h.appendChild(k),this.fltIds.push(this.prfxFlt+g+"_"+this.id),this.fillSlcOnDemand||this._PopulateSelect(g),k.onkeypress=this.Evt._DetectKey,k.onchange=this.Evt._OnSlcChange,k.onfocus=this.Evt._OnSlcFocus,k.onblur=this.Evt._OnSlcBlur,this.fillSlcOnDemand){var l=dom.createOpt(this.displayAllText,"");k.appendChild(l)}this.fillSlcOnDemand&&hlp.isIE()&&(k.disabled=!0,k.title=this.activateSlcTooltip,k.parentNode.onclick=this.Evt._EnableSlc,i===this.fltTypeMulti&&this.__deferMultipleSelection(k,0))}else if(i===this.fltTypeCheckList){var m=dom.create("div",["id",this.prfxCheckListDiv+g+"_"+this.id],["ct",g],["filled","0"]);m.className=this.checkListDivCssClass,j?(dom.id(j).appendChild(m),this.externalFltEls.push(m)):h.appendChild(m),this.checkListDiv[g]=m,this.fltIds.push(this.prfxFlt+g+"_"+this.id),this.fillSlcOnDemand||this._PopulateCheckList(g),m.onclick=this.Evt._OnCheckListFocus,this.fillSlcOnDemand&&(m.onclick=this.Evt._OnCheckListClick,m.appendChild(dom.text(this.activateCheckListTxt)))}else{var n=i===this.fltTypeInp?"text":"hidden",o=dom.create(this.fltTypeInp,["id",this.prfxFlt+g+"_"+this.id],["type",n],["ct",g]);if("hidden"!=n&&(o.value=this.isInpWatermarkArray?this.inpWatermark[g]:this.inpWatermark),o.className=a,""!==this.inpWatermark&&dom.addClass(o,this.inpWatermarkCssClass),o.onfocus=this.Evt._OnInpFocus,j?(dom.id(j).appendChild(o),this.externalFltEls.push(o)):h.appendChild(o),this.fltIds.push(this.prfxFlt+g+"_"+this.id),o.onkeypress=this.Evt._DetectKey,o.onkeydown=this.Evt._OnKeyDown,o.onkeyup=this.Evt._OnKeyUp,o.onblur=this.Evt._OnInpBlur,this.rememberGridValues){var p=cookie.read(this.fltsValuesCookie),q=new RegExp(this.separator,"g"),r=p.split(q);" "!=r[g]&&this.SetFilterValue(g,r[g],!1)}}if(g==c-1&&this.displayBtn){var s=dom.create(this.fltTypeInp,["id",this.prfxValButton+g+"_"+this.id],["type","button"],["value",this.btnText]);s.className=this.btnCssClass,j?dom.id(j).appendChild(s):h.appendChild(s),s.onclick=this.Evt._OnBtnClick}}}else this.__resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.GetRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;if(this.rowsCounter&&this.SetRowsCounter(),this.statusBar&&this.SetStatusBar(),this.fixedHeaders&&!this.isFirstLoad&&this.SetFixedHeaders(),this.paging&&this.SetPaging(),this.hasResultsPerPage&&this.paging&&this.SetResultsPerPage(),this.btnReset&&this.SetResetBtn(),this.helpInstructions&&this.SetHelpInstructions(),this.hasColWidth&&!this.gridLayout&&this.SetColWidths(),this.alternateBgs&&this.isStartBgAlternate){var t=require("modules/alternateRows");this.Cpt.alternateRows=new t(this),this.Cpt.alternateRows.set()}this.hasColOperation&&this.fltGrid&&(this.colOperation=b.col_operation,this.SetColOperation()),(this.sort||this.gridLayout)&&this.SetSort(),(this.selectable||this.editable)&&this.SetEditable(),this.isFirstLoad=!1,this.hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.ResetValues(),this.gridLayout||dom.addClass(this.tbl,this.prfxTf),this.loader&&this.Cpt.loader.show("none"),this.hasExtensions&&this.LoadExtensions(),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}},EvtManager:function(a,b){function c(){if(a){switch(a){case d.Evt.name.filter:d.isModFilterFn?d.modFilterFn.call(null,d):d._Filter();break;case d.Evt.name.populateselect:d.refreshFilters?d._PopulateSelect(e,!0):d._PopulateSelect(e,!1,f,g);break;case d.Evt.name.populatechecklist:d._PopulateCheckList(e,f,g);break;case d.Evt.name.changepage:d._ChangePage(h);break;case d.Evt.name.clear:d._ClearFilters(),d._Filter();break;case d.Evt.name.changeresultsperpage:d._ChangeResultsPerPage();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.Cpt.loader.show("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.Cpt.loader.show(""),this.StatusMsg(d["msg"+a])}catch(i){}global.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&&types.isArray(this.extensions.name)&&types.isArray(this.extensions.src))for(var a=this.extensions,b=0;b',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',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.Cpt.loader.remove(),this.popUpFilters&&this.RemovePopupFilters(),this.markActiveColumns&&this.ClearActiveColumns(),(this.editable||this.selectable)&&this.RemoveEditable();for(var b=this.refRow;b0&&!c.startRow?void 0:c.startRow||a.refRow,c.scroll_into_view=c.scroll_into_view===!1?!1:!0,c.base_path=c.base_path||a.basePath+"ezEditTable/",c.editable=a.editable=a.fObj.editable,c.selection=a.selectable=a.fObj.selectable,a.selectable&&(c.default_selection=c.default_selection||"row"),c.active_cell_css=c.active_cell_css||"ezETSelectedCell",a._lastValidRowIndex=0,a._lastRowIndex=0,a.selectable){var e=function(b,c,d){if(a.validRowsIndex){var e,f=a.validRowsIndex,g=f.length,h="row"!==b.defaultSelection?c.parentNode:c,i="TD"===c.nodeName?c:null,j=void 0!==d?b.Event.GetKey(d):0,k=array.has(f,h.rowIndex),l=34===j||33===j?a.pagingLength||b.nbRowsPerPage:1;if(k)34!==j&&33!==j?(a._lastValidRowIndex=array.indexByValue(f,h.rowIndex),a._lastRowIndex=h.rowIndex):(e=34===j?a._lastValidRowIndex+l<=g-1?f[a._lastValidRowIndex+l]:[g-1]:a._lastValidRowIndex-l<=f[0]?f[0]:f[a._lastValidRowIndex-l],a._lastRowIndex=e,a._lastValidRowIndex=array.indexByValue(f,e),o(e));else{if(h.rowIndex>a._lastRowIndex)if(h.rowIndex>=f[g-1])e=f[g-1];else{var m=a._lastValidRowIndex+l;e=m>g-1?f[g-1]:f[m]}else if(h.rowIndex<=f[0])e=f[0];else{var n=f[a._lastValidRowIndex-l];e=n?n:f[0]}a._lastRowIndex=h.rowIndex,o(e)}var o=function(d){if("row"===b.defaultSelection)b.Selection.SelectRowByIndex(d);else{b.ClearSelections();var e=c.cellIndex,f=a.tbl.rows[d];"both"===b.defaultSelection&&b.Selection.SelectRowByIndex(d),f&&b.Selection.SelectCell(f.cells[e])}if(a.validRowsIndex.length!==a.GetRowsNb()){var g=a.tbl.rows[d];g&&g.scrollIntoView(!1),i&&(i.cellIndex===a.GetCellsNb()-1&&a.gridLayout?a.tblCont.scrollLeft=1e8:0===i.cellIndex&&a.gridLayout?a.tblCont.scrollLeft=0:i.scrollIntoView(!1))}}}},f=function(b,c){var d="row"!==b.defaultSelection?c.parentNode:c;if(a.paging&&a.nbPages>1){b.nbRowsPerPage=a.pagingLength;var e=a.validRowsIndex,f=e.length,g=parseInt(a.startPagingRow,10)+parseInt(a.pagingLength,10),h=d.rowIndex;h===e[f-1]&&a.currentPageNb!=a.nbPages?a.SetPage("last"):h==e[0]&&1!==a.currentPageNb?a.SetPage("first"):h>e[g-1]&&he[0]&&a.SetPage("previous")}};if(a.paging&&(a.onAfterChangePage=function(a){var b=a.ezEditTable,c=b.Selection.GetActiveRow();c&&c.scrollIntoView(!1);var d=b.Selection.GetActiveCell();d&&d.scrollIntoView(!1)}),"row"===c.default_selection){var g=c.on_before_selected_row;c.on_before_selected_row=function(){f(arguments[0],arguments[1],arguments[2]),g&&g.call(null,arguments[0],arguments[1],arguments[2])};var h=c.on_after_selected_row;c.on_after_selected_row=function(){e(arguments[0],arguments[1],arguments[2]),h&&h.call(null,arguments[0],arguments[1],arguments[2])}}else{var i=c.on_before_selected_cell;c.on_before_selected_cell=function(){f(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])};var j=c.on_after_selected_cell;c.on_after_selected_cell=function(){e(arguments[0],arguments[1],arguments[2]),j&&j.call(null,arguments[0],arguments[1],arguments[2])}}}if(a.editable){var k=c.on_added_dom_row;if(c.on_added_dom_row=function(){a.nbFilterableRows++,a.paging?(a.nbRows++,a.nbVisibleRows++,a.nbFilterableRows++,a.paging=!1,a.RemovePaging(),a.AddPaging(!1)):a.RefreshNbRows(),a.alternateBgs&&a.Cpt.alternateRows.set(),k&&k.call(null,arguments[0],arguments[1],arguments[2])},c.actions&&c.actions["delete"]){var l=c.actions["delete"].on_after_submit;c.actions["delete"].on_after_submit=function(){a.nbFilterableRows--,a.paging?(a.nbRows--,a.nbVisibleRows--,a.nbFilterableRows--,a.paging=!1,a.RemovePaging(),a.AddPaging(!1)):a.RefreshNbRows(),a.alternateBgs&&a.Cpt.alternateRows.set(),l&&l.call(null,arguments[0],arguments[1])}}}try{a.ezEditTable=new EditTable(a.id,c,b),a.ezEditTable.Init()}catch(m){console.log(c.err)}},SetPaging:function(){if((this.hasGrid||this.isFirstLoad)&&this.paging&&(this.isPagingRemoved||this.isFirstLoad)){var a=this.fObj;this.pagingTgtId=a.paging_target_id||null,this.pagingLength=isNaN(a.paging_length)?10:a.paging_length,this.resultsPerPageTgtId=a.results_per_page_target_id||null,this.pgSlcCssClass=a.paging_slc_css_class||"pgSlc",this.pgInpCssClass=a.paging_inp_css_class||"pgNbInp",this.resultsSlcCssClass=a.results_slc_css_class||"rspg",this.resultsSpanCssClass=a.results_span_css_class||"rspgSpan",this.nbVisibleRows=0,this.nbHiddenRows=0,this.startPagingRow=0,this.nbPages=0,this.btnNextPageText=a.btn_next_page_text||">",this.btnPrevPageText=a.btn_prev_page_text||"<",this.btnLastPageText=a.btn_last_page_text||">|",this.btnFirstPageText=a.btn_first_page_text||"|<",this.btnNextPageHtml=a.btn_next_page_html||(this.enableIcons?'':null),this.btnPrevPageHtml=a.btn_prev_page_html||(this.enableIcons?'':null),this.btnFirstPageHtml=a.btn_first_page_html||(this.enableIcons?'':null),this.btnLastPageHtml=a.btn_last_page_html||(this.enableIcons?'':null),this.pageText=a.page_text||" Page ",this.ofText=a.of_text||" of ",this.nbPgSpanCssClass=a.nb_pages_css_class||"nbpg",this.hasPagingBtns=a.paging_btns===!1?!1:!0,this.pagingBtnEvents=null,this.pageSelectorType=a.page_selector_type||this.fltTypeSlc,this.onBeforeChangePage=types.isFn(a.on_before_change_page)?a.on_before_change_page:null,this.onAfterChangePage=types.isFn(a.on_after_change_page)?a.on_after_change_page:null;var b=this.refRow,c=this.nbRows;if(this.nbPages=Math.ceil((c-b)/this.pagingLength),!this.Evt._Paging.next){var d=this;this.Evt._Paging={slcIndex:function(){return d.pageSelectorType===d.fltTypeSlc?d.pagingSlc.options.selectedIndex:parseInt(d.pagingSlc.value,10)-1},nbOpts:function(){return d.pageSelectorType===d.fltTypeSlc?parseInt(d.pagingSlc.options.length,10)-1:d.nbPages-1},next:function(){d.Evt._Paging.nextEvt&&d.Evt._Paging.nextEvt();var a=d.Evt._Paging.slcIndex()0?d.Evt._Paging.slcIndex()-1:d.Evt._Paging.nbOpts();d.ChangePage(a)},last:function(){d.Evt._Paging.lastEvt&&d.Evt._Paging.lastEvt(),d.ChangePage(d.Evt._Paging.nbOpts())},first:function(){d.Evt._Paging.firstEvt&&d.Evt._Paging.firstEvt(),d.ChangePage(0)},_detectKey:function(a){var b=a||global.event;if(b){var c=d.Evt.getKeyCode(a);13===c&&(d.sorted?(d.Filter(),d.ChangePage(d.Evt._Paging.slcIndex())):d.ChangePage(),this.blur())}},nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null}}this.Evt._OnSlcPagesChange||(this.Evt._OnSlcPagesChange=function(){d.Evt._Paging._OnSlcPagesChangeEvt&&d.Evt._Paging._OnSlcPagesChangeEvt(),d.ChangePage(),this.blur(),this.parentNode&&hlp.isIE()&&this.parentNode.focus()});var e;this.pageSelectorType===this.fltTypeSlc&&(e=dom.create(this.fltTypeSlc,["id",this.prfxSlcPages+this.id]),e.className=this.pgSlcCssClass,e.onchange=this.Evt._OnSlcPagesChange),this.pageSelectorType===this.fltTypeInp&&(e=dom.create(this.fltTypeInp,["id",this.prfxSlcPages+this.id],["value",this.currentPageNb]),e.className=this.pgInpCssClass,e.onkeypress=this.Evt._Paging._detectKey);var f=dom.create("span",["id",this.prfxBtnNextSpan+this.id]),g=dom.create("span",["id",this.prfxBtnPrevSpan+this.id]),h=dom.create("span",["id",this.prfxBtnLastSpan+this.id]),i=dom.create("span",["id",this.prfxBtnFirstSpan+this.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)f.innerHTML=this.btnNextPageHtml,f.onclick=this.Evt._Paging.next;else{var j=dom.create(this.fltTypeInp,["id",this.prfxBtnNext+this.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);j.className=this.btnPageCssClass,j.onclick=this.Evt._Paging.next,f.appendChild(j)}if(this.btnPrevPageHtml)g.innerHTML=this.btnPrevPageHtml,g.onclick=this.Evt._Paging.prev;else{var k=dom.create(this.fltTypeInp,["id",this.prfxBtnPrev+this.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);k.className=this.btnPageCssClass,k.onclick=this.Evt._Paging.prev,g.appendChild(k)}if(this.btnLastPageHtml)h.innerHTML=this.btnLastPageHtml,h.onclick=this.Evt._Paging.last;else{var l=dom.create(this.fltTypeInp,["id",this.prfxBtnLast+this.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);l.className=this.btnPageCssClass,l.onclick=this.Evt._Paging.last,h.appendChild(l)}if(this.btnFirstPageHtml)i.innerHTML=this.btnFirstPageHtml,i.onclick=this.Evt._Paging.first;else{var m=dom.create(this.fltTypeInp,["id",this.prfxBtnFirst+this.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);m.className=this.btnPageCssClass,m.onclick=this.Evt._Paging.first,i.appendChild(m)}}this.pagingTgtId||this.SetTopDiv();var n=this.pagingTgtId?dom.id(this.pagingTgtId):this.mDiv;""!==n.innerHTML&&(n.innerHTML=""),n.appendChild(i),n.appendChild(g);var o=dom.create("span",["id",this.prfxPgBeforeSpan+this.id]);o.appendChild(dom.text(this.pageText)),o.className=this.nbPgSpanCssClass,n.appendChild(o),n.appendChild(e);var p=dom.create("span",["id",this.prfxPgAfterSpan+this.id]);p.appendChild(dom.text(this.ofText)),p.className=this.nbPgSpanCssClass,n.appendChild(p);var q=dom.create("span",["id",this.prfxPgSpan+this.id]);q.className=this.nbPgSpanCssClass,q.appendChild(dom.text(" "+this.nbPages+" ")),n.appendChild(q),n.appendChild(f),n.appendChild(h),this.pagingSlc=dom.id(this.prfxSlcPages+this.id),(!this.rememberGridValues||this.isPagingRemoved)&&this.SetPagingInfo(),this.fltGrid||(this.ValidateAllRows(),this.SetPagingInfo(this.validRowsIndex)),this.pagingBtnEvents=this.Evt._Paging,this.isPagingRemoved=!1}},RemovePaging:function(){if(this.hasGrid&&this.pagingSlc){var a,b,c,d,e,f,g;a=dom.id(this.prfxBtnNextSpan+this.id),b=dom.id(this.prfxBtnPrevSpan+this.id),c=dom.id(this.prfxBtnLastSpan+this.id),d=dom.id(this.prfxBtnFirstSpan+this.id),e=dom.id(this.prfxPgBeforeSpan+this.id),f=dom.id(this.prfxPgAfterSpan+this.id),g=dom.id(this.prfxPgSpan+this.id),this.pagingSlc.parentNode.removeChild(this.pagingSlc),a&&a.parentNode.removeChild(a),b&&b.parentNode.removeChild(b),c&&c.parentNode.removeChild(c),d&&d.parentNode.removeChild(d),e&&e.parentNode.removeChild(e),f&&f.parentNode.removeChild(f),g&&g.parentNode.removeChild(g),this.pagingBtnEvents=null,this.pagingSlc=null,this.isPagingRemoved=!0}},SetPagingInfo:function(a){var b=this.tbl.rows,c=this.pagingTgtId?dom.id(this.pagingTgtId):this.mDiv,d=dom.id(this.prfxPgSpan+this.id);if(a&&a.length>0)this.validRowsIndex=a;else{this.validRowsIndex=[];for(var e=this.refRow;e0)if(c.style.visibility="visible",this.pageSelectorType===this.fltTypeSlc)for(var h=0;h=this.startPagingRow&&c>d?("true"!==e.getAttribute("validRow")&&e.getAttribute("validRow")||(e.style.display=""),this.alternateBgs&&this.Cpt.alternateRows(this.validRowsIndex[d],d)):(e.style.display="none",this.alternateBgs&&this.Cpt.alternateRows.removeRowBg(this.validRowsIndex[d]))}this.nbVisibleRows=this.validRowsIndex.length,this.isStartBgAlternate=!1,this.ApplyGridProps()},SetPage:function(a){if(this.hasGrid&&this.paging){var b=this.pagingBtnEvents,c=typeof a;if("string"===c)switch(str.lower(a)){case"next":b.next();break;case"previous":b.prev();break;case"last":b.last();break;case"first":b.first();break;default:b.next()}"number"===c&&this.ChangePage(a-1)}},SetResultsPerPage:function(){if((this.hasGrid||this.isFirstLoad)&&!this.resultsPerPageSlc&&this.resultsPerPage){if(!this.Evt._OnSlcResultsChange){var a=this;this.Evt._OnSlcResultsChange=function(){a.ChangeResultsPerPage(),this.blur(),this.parentNode&&hlp.isIE()&&this.parentNode.focus()}}var b=dom.create(this.fltTypeSlc,["id",this.prfxSlcResults+this.id]);b.className=this.resultsSlcCssClass;var c=this.resultsPerPage[0],d=this.resultsPerPage[1],e=dom.create("span",["id",this.prfxSlcResultsTxt+this.id]);e.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||this.SetTopDiv();var f=this.resultsPerPageTgtId?dom.id(this.resultsPerPageTgtId):this.rDiv;e.appendChild(dom.text(c)),f.appendChild(e),f.appendChild(b),this.resultsPerPageSlc=dom.id(this.prfxSlcResults+this.id);for(var g=0;g<, <=, >, >=, =, *, !, {, }, ||,&&, [empty], [nonempty], rgx:
These operators are described here:
http://tablefilter.free.fr/#operators
',this.helpInstrHtml=a.help_instructions_html||null,this.helpInstrBtnText=a.help_instructions_btn_text||"?",this.helpInstrBtnHtml=a.help_instructions_btn_html||null,this.helpInstrBtnCssClass=a.help_instructions_btn_css_class||"helpBtn",this.helpInstrContCssClass=a.help_instructions_container_css_class||"helpCont",this.helpInstrBtnEl=null,this.helpInstrContEl=null,this.helpInstrDefaultHtml='

HTML Table Filter Generator v. '+this.version+'

http://tablefilter.free.fr
©2009-'+this.year+' Max Guglielmi.
";var b=dom.create("span",["id",this.prfxHelpSpan+this.id]),c=dom.create("div",["id",this.prfxHelpDiv+this.id]);this.helpInstrTgtId||this.SetTopDiv();var d=this.helpInstrTgtId?dom.id(this.helpInstrTgtId):this.rDiv;d.appendChild(b);var e=this.helpInstrContTgtId?dom.id(this.helpInstrContTgtId):b;if(this.helpInstrBtnHtml){b.innerHTML=this.helpInstrBtnHtml;var f=b.firstChild;f.onclick=this.Evt._OnHelpBtnClick,e.appendChild(c)}else{e.appendChild(c);var g=dom.create("a",["href","javascript:void(0);"]);g.className=this.helpInstrBtnCssClass,g.appendChild(dom.text(this.helpInstrBtnText)),b.appendChild(g),g.onclick=this.Evt._OnHelpBtnClick}this.helpInstrHtml?(this.helpInstrContTgtId&&e.appendChild(c),c.innerHTML=this.helpInstrHtml,this.helpInstrContTgtId||(c.className=this.helpInstrContCssClass,c.ondblclick=this.Evt._OnHelpBtnClick)):(c.innerHTML=this.helpInstrText,c.className=this.helpInstrContCssClass,c.ondblclick=this.Evt._OnHelpBtnClick),c.innerHTML+=this.helpInstrDefaultHtml,this.helpInstrContEl=c,this.helpInstrBtnEl=b}},RemoveHelpInstructions:function(){this.helpInstrBtnEl&&(this.helpInstrBtnEl.parentNode.removeChild(this.helpInstrBtnEl),this.helpInstrBtnEl=null,this.helpInstrContEl&&(this.helpInstrContEl.parentNode.removeChild(this.helpInstrContEl),this.helpInstrContEl=null))},_ToggleHelp:function(){if(this.helpInstrContEl){var a=this.helpInstrContEl.style.display;if(""===a||"none"===a){this.helpInstrContEl.style.display="block";var b=dom.position(this.helpInstrBtnEl).left;this.helpInstrContTgtId||(this.helpInstrContEl.style.left=b-this.helpInstrContEl.clientWidth+25+"px")}else this.helpInstrContEl.style.display="none"}},ChangePage:function(a){this.EvtManager(this.Evt.name.changepage,{pgIndex:a})},_ChangePage:function(a){this.paging&&(a||(a=this.pageSelectorType===this.fltTypeSlc?this.pagingSlc.options.selectedIndex:this.pagingSlc.value-1),a>=0&&a<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,a),this.currentPageNb=parseInt(a,10)+1,this.pageSelectorType===this.fltTypeSlc?this.pagingSlc.options[a].selected=!0:this.pagingSlc.value=this.currentPageNb,this.rememberPageNb&&this.RememberPageNb(this.pgNbCookie),this.startPagingRow=this.pageSelectorType===this.fltTypeSlc?this.pagingSlc.value:a*this.pagingLength,this.GroupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,a)))},ChangeResultsPerPage:function(){this.EvtManager(this.Evt.name.changeresultsperpage)},_ChangeResultsPerPage:function(){if(this.paging){var a=this.resultsPerPageSlc,b=this.pageSelectorType==this.fltTypeSlc?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(a.options[a.selectedIndex].value,10),this.startPagingRow=this.pagingLength*b,!isNaN(this.pagingLength)){if(this.startPagingRow>=this.nbFilterableRows&&(this.startPagingRow=this.nbFilterableRows-this.pagingLength),this.SetPagingInfo(),this.pageSelectorType===this.fltTypeSlc){var c=this.pagingSlc.options.length-1<=b?this.pagingSlc.options.length-1:b;this.pagingSlc.options[c].selected=!0}this.rememberPageLen&&this.RememberPageLength(this.pgLenCookie)}}},ResetPage:function(){this.EvtManager(this.Evt.name.resetpage)},_ResetPage:function(a){var b=cookie.read(a);""!==b&&this.ChangePage(b-1)},ResetPageLength:function(){this.EvtManager(this.Evt.name.resetpagelength)},_ResetPageLength:function(a){if(this.paging){var b=cookie.read(a);""!==b&&(this.resultsPerPageSlc.options[b].selected=!0,this.ChangeResultsPerPage())}},AddPaging:function(a){this.hasGrid&&!this.paging&&(this.paging=!0,this.isPagingRemoved=!0,this.SetPaging(),this.ResetValues(),a&&this.Filter())},PopulateSelect:function(a,b,c){this.EvtManager(this.Evt.name.populateselect,{slcIndex:a,slcExternal:b,slcId:c})},_PopulateSelect:function(a,b,c,d){function e(){if("innerhtml"===m)o+='";else{var a=dom.createOpt(j.enableSlcResetFilter?j.displayAllText:"","");if(j.enableSlcResetFilter||(a.style.display="none"),i.appendChild(a),j.enableEmptyOption){var b=dom.createOpt(j.emptyText,j.emOperator);i.appendChild(b)}if(j.enableNonEmptyOption){var c=dom.createOpt(j.nonEmptyText,j.nmOperator);i.appendChild(c)}}}function f(){var c=i.value;i.innerHTML="",e();for(var d=0;d"+g+""}else{var l;l=j.fillSlcOnDemand&&c==n[d]&&j["col"+a]===j.fltTypeSlc?dom.createOpt(g,f,!0):j["col"+a]!=j.fltTypeMulti?dom.createOpt(g,f," "!==r[a]&&f==r[a]?!0:!1):dom.createOpt(g,f,array.has(s,str.matchCase(n[d],j.matchCase),j.matchCase)||-1!==s.toString().indexOf(f)?!0:!1),h&&(l.disabled=!0),i.appendChild(l)}}"innerhtml"===m&&(i.innerHTML+=o),i.setAttribute("filled","1")}c=void 0===c?!1:c;var g=this.fltIds[a];if((dom.id(g)||c)&&(dom.id(d)||!c)){var h,i=dom.id(c?d:g),j=this,k=this.tbl.rows,l=this.matchCase,m=str.lower(this.slcFillingMethod),n=[],o="",p=this.hasCustomSlcOptions&&array.has(this.customSlcOptions.cols,a),q=[];b&&this.activeFilterId&&(h=this.activeFilterId.split("_")[0],h=h.split(this.prfxFlt)[1]);var r=[],s=[];this.rememberGridValues&&(r=cookie.valueToArray(this.fltsValuesCookie,this.separator),r&&!str.isEmpty(r.toString())&&(p?s.push(r[a]):s=r[a].split(" "+j.orOperator+" ")));var t=null,u=null;b&&this.disableExcludedOptions&&(t=[],u=[]);for(var v=this.refRow;vy;y++)if(a===y&&(!b||b&&this.disableExcludedOptions)||a==y&&b&&(""===k[v].style.display&&!this.paging||this.paging&&(!this.validRowsIndex||this.validRowsIndex&&array.has(this.validRowsIndex,v))&&(void 0===h||h==a||h!=a&&array.has(this.validRowsIndex,v)))){var z=this.GetCellData(y,w[y]),A=str.matchCase(z,l);if(array.has(n,A,l)||n.push(z),b&&this.disableExcludedOptions){var B=u[y];B||(B=this.GetFilteredDataCol(y)),!array.has(B,A,l)&&!array.has(t,A,l)&&!this.isFirstLoad&&t.push(z)}}}if(p){var C=this.__getCustomValues(a);n=C[0],q=C[1]}if(this.sortSlc&&!p&&(l?(n.sort(),t&&t.sort()):(n.sort(ignoreCaseSort),t&&t.sort(ignoreCaseSort))),this.sortNumAsc&&array.has(this.sortNumAsc,a))try{n.sort(numSortAsc),t&&t.sort(numSortAsc),p&&q.sort(numSortAsc)}catch(D){n.sort(),t&&t.sort(),p&&q.sort() -}if(this.sortNumDesc&&array.has(this.sortNumDesc,a))try{n.sort(numSortDesc),t&&t.sort(numSortDesc),p&&q.sort(numSortDesc)}catch(D){n.sort(),t&&t.sort(),p&&q.sort()}f()}},__deferMultipleSelection:function(a,b,c){if("select"===str.lower(a.nodeName)){var d=void 0===c?!1:c,e=this;global.setTimeout(function(){a.options[0].selected=!1,a.options[b].selected=""===a.options[b].value?!1:!0,d&&e.Filter()},.1)}},__getCustomValues:function(a){if(a){var b=this.hasCustomSlcOptions&&array.has(this.customSlcOptions.cols,a);if(b){for(var c=[],d=[],e=array.indexByValue(this.customSlcOptions.cols,a),f=this.customSlcOptions.values[e],g=this.customSlcOptions.texts[e],h=this.customSlcOptions.sorts[e],i=0;i0&&(j.hasCustomSlcOptions&&array.has(j.customSlcOptions.cols,a)?g.push(i):g=i.split(" "+j.orOperator+" "));for(var k=0;kt;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&&array.has(this.validRowsIndex,q)))){var u=this.GetCellData(t,r[t]),v=str.matchCase(u,this.matchCase);array.has(l,v,this.matchCase)||l.push(u);var w=p[t];this.refreshFilters&&this.disableExcludedOptions&&(w||(p[t]=this.GetFilteredDataCol(t)),!array.has(w,v,this.matchCase)&&!array.has(o,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(ignoreCaseSort),o&&o.sort(ignoreCaseSort))),this.sortNumAsc&&array.has(this.sortNumAsc,a))try{l.sort(numSortAsc),o&&o.sort(numSortAsc),m&&n.sort(numSortAsc)}catch(y){l.sort(),o&&o.sort(),m&&n.sort()}if(this.sortNumDesc&&array.has(this.sortNumDesc,a))try{l.sort(numSortDesc),o&&o.sort(numSortDesc),m&&n.sort(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&&hlp.isIE()){var z=h.getAttribute("indexes");if(z)for(var A=z.split(","),B=0;B':null);var b=dom.create("span",["id",this.prfxResetSpan+this.id]);this.btnResetTgtId||this.SetTopDiv();var c=this.btnResetTgtId?dom.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=dom.create("a",["href","javascript:void(0);"]);e.className=this.btnResetCssClass,e.appendChild(dom.text(this.btnResetText)),b.appendChild(e),e.onclick=this.Evt._Clear}this.btnResetEl=dom.id(this.prfxResetSpan+this.id).firstChild}},RemoveResetBtn:function(){if(this.hasGrid&&this.btnResetEl){var a=dom.id(this.prfxResetSpan+this.id);a&&a.parentNode.removeChild(a),this.btnResetEl=null}},SetStatusBar:function(){if(this.hasGrid||this.isFirstLoad){var a=this.fObj;this.statusBarTgtId=a.status_bar_target_id||null,this.statusBarDiv=null,this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarText=a.status_bar_text||"",this.statusBarCssClass=a.status_bar_css_class||"status",this.statusBarCloseDelay=250;var b=dom.create("div",["id",this.prfxStatus+this.id]);b.className=this.statusBarCssClass;var c=dom.create("span",["id",this.prfxStatusSpan+this.id]),d=dom.create("span",["id",this.prfxStatusTxt+this.id]);d.appendChild(dom.text(this.statusBarText)),this.onBeforeShowMsg=types.isFn(a.on_before_show_msg)?a.on_before_show_msg:null,this.onAfterShowMsg=types.isFn(a.on_after_show_msg)?a.on_after_show_msg:null,this.statusBarTgtId||this.SetTopDiv();var e=this.statusBarTgtId?dom.id(this.statusBarTgtId):this.lDiv;this.statusBarDiv&&hlp.isIE()&&(this.statusBarDiv.outerHTML=""),this.statusBarTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.statusBarDiv=dom.id(this.prfxStatus+this.id),this.statusBarSpan=dom.id(this.prfxStatusSpan+this.id),this.statusBarSpanText=dom.id(this.prfxStatusTxt+this.id)}},RemoveStatusBar:function(){(this.hasGrid||this.statusBarDiv)&&(this.statusBarDiv.innerHTML="",this.statusBarDiv.parentNode.removeChild(this.statusBarDiv),this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarDiv=null)},StatusMsg:function(a){a||this.StatusMsg(""),this.status&&this.WinStatusMsg(a),this.statusBar&&this.StatusBarMsg(a)},WinStatusMsg:function(a){this.status&&(this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this,a),global.status=a,this.onAfterShowMsg&&this.onAfterShowMsg.call(null,this,a))},StatusBarMsg:function(a){function b(){c.statusBarSpan.innerHTML=a,c.onAfterShowMsg&&c.onAfterShowMsg.call(null,c,a)}if(this.statusBar&&this.statusBarSpan){this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this,a);var c=this,d=""===a?this.statusBarCloseDelay:1;global.setTimeout(b,d)}},SetRowsCounter:function(){if((this.hasGrid||this.isFirstLoad)&&!this.rowsCounterSpan){var a=this.fObj;this.rowsCounterTgtId=a.rows_counter_target_id||null,this.rowsCounterDiv=null,this.rowsCounterSpan=null,this.rowsCounterText=a.rows_counter_text||"Rows: ",this.fromToTextSeparator=a.from_to_text_separator||"-",this.overText=a.over_text||" / ",this.totRowsCssClass=a.tot_rows_css_class||"tot",this.onBeforeRefreshCounter=types.isFn(a.on_before_refresh_counter)?a.on_before_refresh_counter:null,this.onAfterRefreshCounter=types.isFn(a.on_after_refresh_counter)?a.on_after_refresh_counter:null;var b=dom.create("div",["id",this.prfxCounter+this.id]);b.className=this.totRowsCssClass;var c=dom.create("span",["id",this.prfxTotRows+this.id]),d=dom.create("span",["id",this.prfxTotRowsTxt+this.id]);d.appendChild(dom.text(this.rowsCounterText)),this.rowsCounterTgtId||this.SetTopDiv();var e=this.rowsCounterTgtId?dom.id(this.rowsCounterTgtId):this.lDiv;this.rowsCounterDiv&&hlp.isIE()&&(this.rowsCounterDiv.outerHTML=""),this.rowsCounterTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.rowsCounterDiv=dom.id(this.prfxCounter+this.id),this.rowsCounterSpan=dom.id(this.prfxTotRows+this.id),this.RefreshNbRows()}},RemoveRowsCounter:function(){this.hasGrid&&this.rowsCounterSpan&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?hlp.isIE()?this.rowsCounterDiv.outerHTML="":this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):dom.id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null)},RefreshNbRows:function(a){if(this.rowsCounterSpan){this.onBeforeRefreshCounter&&this.onBeforeRefreshCounter.call(null,this,this.rowsCounterSpan);var b;if(this.paging){var c=parseInt(this.startPagingRow,10)+(this.nbVisibleRows>0?1:0),d=c+this.pagingLength-1<=this.nbVisibleRows?c+this.pagingLength-1:this.nbVisibleRows;b=c+this.fromToTextSeparator+d+this.overText+this.nbVisibleRows}else b=a&&""!==a?a:this.nbFilterableRows-this.nbHiddenRows-(this.hasVisibleRows?this.visibleRows.length:0);this.rowsCounterSpan.innerHTML=b,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,this,this.rowsCounterSpan,b)}},SetWatermark:function(a){if(this.fltGrid||""!==this.inpWatermark){a=void 0===a?!0:a;for(var b=0;b0&&this.tbl.removeChild(t[0]),this.headTbl.style.width=this.tbl.style.width,this.headTbl.style.tableLayout="fixed",this.tbl.style.tableLayout="fixed",this.headTbl.cellPadding=this.tbl.cellPadding,this.headTbl.cellSpacing=this.tbl.cellSpacing,this.headTblCont.style.width=this.tblCont.clientWidth+"px",this.SetColWidths(),this.tbl.style.width="",hlp.isIE()&&(this.headTbl.style.width="");var u=this;if(this.tblCont.onscroll=function(){u.headTblCont.scrollLeft=this.scrollLeft;var a=this;if(!u.isPointerXOverwritten)try{TF.Evt.pointerX=function(b){b=b||global.event;var c=tf_StandardBody().scrollLeft+a.scrollLeft;return b.pageX+a.scrollLeft||b.clientX+c},u.isPointerXOverwritten=!0}catch(b){u.isPointerXOverwritten=!1}},a.sort!==!1&&(this.sort=!0,this.sortConfig.asyncSort=!0,this.sortConfig.triggerIds=j),this.gridEnableColResizer&&(this.hasExtensions?this.__containsStr("colsresizer",str.lower(this.extensions.src.toString()))||(this.extensions.name.push("ColumnsResizer_"+this.id),this.extensions.src.push(this.gridColResizerPath),this.extensions.description.push("Columns Resizing"),this.extensions.initialize.push(function(a){a.SetColsResizer("ColumnsResizer_"+a.id)})):(this.extensions={name:["ColumnsResizer_"+this.id],src:[this.gridColResizerPath],description:["Columns Resizing"],initialize:[function(a){a.SetColsResizer("ColumnsResizer_"+a.id)}]},this.hasExtensions=!0)),a.col_resizer_cols_headers_table=this.headTbl.getAttribute("id"),a.col_resizer_cols_headers_index=this.gridHeadRowIndex,a.col_resizer_width_adjustment=0,a.col_enable_text_ellipsis=!1,u.tblHasColTag=dom.tag(u.tbl,"col").length>0?!0:!1,!hlp.isIE()){var v=function(a){if(a){for(var b=a.nbCells-1;b>=0;b--){var c=dom.create("col",["id",a.id+"_col_"+b]);a.tbl.firstChild.parentNode.insertBefore(c,a.tbl.firstChild),c.style.width=a.colWidth[b],a.gridColElms[b]=c}a.tblHasColTag=!0}};if(u.tblHasColTag)for(var w=dom.tag(u.tbl,"col"),x=0;x0?z[0].insertRow(0):u.tbl.insertRow(0),y.style.height="0px";for(var A=0;A0?z[0].moveRow(a.leadColWidthsRow.rowIndex,0):a.tbl.moveRow(a.leadColWidthsRow.rowIndex,0)}D&&D.call(null,a,b)}}var E=types.isFn(a.on_after_col_resized)?a.on_after_col_resized:null;a.on_after_col_resized=function(a,b){if(b){var c=a.crWColsRow.cells[b].style.width,d=a.gridColElms[b];d.style.width=c;var e=a.crWColsRow.cells[b].clientWidth,f=a.crWRowDataTbl.cells[b].clientWidth;hlp.isIE()&&(a.tbl.style.width=a.headTbl.clientWidth+"px"),e!=f&&!hlp.isIE()&&(a.headTbl.style.width=a.tbl.clientWidth+"px"),E&&E.call(null,a,b)}},this.tbl.clientWidth!==this.headTbl.clientWidth&&(this.tbl.style.width=this.headTbl.clientWidth+"px")}},RemoveGridLayout:function(){if(this.gridLayout){var a=this.tbl.parentNode.removeChild(this.tbl);this.tblMainCont.parentNode.insertBefore(a,this.tblMainCont),this.tblMainCont.parentNode.removeChild(this.tblMainCont),this.tblMainCont=null,this.headTblCont=null,this.headTbl=null,this.tblCont=null,this.tbl.outerHTML=this.sourceTblHtml,this.tbl=dom.id(this.id)}},SetPopupFilterIcons:function(){function a(a){var b=a||global.event,d=parseInt(this.getAttribute("ci"),10);if(c.CloseAllPopupFilters(d),c.TogglePopupFilter(d),c.popUpFltAdjustToContainer){var e=c.popUpFltElms[d],f=c.GetHeaderElement(d),g=.95*f.clientWidth;if(hlp.isIE()){var h=dom.position(f).left;e.style.left=h+"px"}e.style.width=parseInt(g,10)+"px"}b.cancel(b),b.stop(b)}if(this.popUpFilters){this.isExternalFlt=!0;var b=this.fObj;this.popUpImgFlt=b.popup_filters_image||this.themesPath+"icn_filter.gif",this.popUpImgFltActive=b.popup_filters_image_active||this.themesPath+"icn_filterActive.gif",this.popUpImgFltHtml=b.popup_filters_image_html||'Column filter',this.popUpDivCssClass=b.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=types.isFn(b.on_before_popup_filter_open)?b.on_before_popup_filter_open:null,this.onAfterPopUpOpen=types.isFn(b.on_after_popup_filter_open)?b.on_after_popup_filter_open:null,this.onBeforePopUpClose=types.isFn(b.on_before_popup_filter_close)?b.on_before_popup_filter_close:null,this.onAfterPopUpClose=types.isFn(b.on_after_popup_filter_close)?b.on_after_popup_filter_close:null,this.externalFltTgtIds=[],this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0;for(var c=this,d=0;d= offsetParent.offsetHeight ? 0 - parentNode.parentNode.offsetHeight + offsetParent.offsetHeight + offsetParent.scrollTop : 0);"}}}},RemoveFixedHeaders:function(){if(this.hasGrid&&this.fixedHeaders)if(this.contDiv){this.contDiv.parentNode.insertBefore(this.tbl,this.contDiv),this.contDiv.parentNode.removeChild(this.contDiv),this.contDiv=null;var a=dom.tag(this.tbl,"thead");if(0===a.length)return;var b=dom.tag(a[0],"tr");if(0===b.length)return;for(var c=0;cv):L?(w=formatDate(a.replace(i,""),D),e=w>=v):N?(w=formatDate(a.replace(j,""),D),e=v>=w):M?(w=formatDate(a.replace(l,""),D),e=v>w):O?(w=formatDate(a.replace(m,""),D),e=v.toString()!=w.toString()):P?(w=formatDate(a.replace(o,""),D),e=v.toString()==w.toString()):n.test(a)?e=f.__containsStr(a.replace(n,""),b,null,!1):isValidDate(a,D)?(w=formatDate(a,D),e=v.toString()==w.toString()):H?e=str.isEmpty(b):I&&(e=!str.isEmpty(b));else if(f.hasColNbFormat&&f.colNbFormat[c]?(g=removeNbFormat(b,f.colNbFormat[c]),h=f.colNbFormat[c]):","===f.thousandsSeparator&&"."===f.decimalSeparator?(g=removeNbFormat(b,"us"),h="us"):(g=removeNbFormat(b,"eu"),h="eu"),y)e=g<=removeNbFormat(a.replace(i,""),h);else if(A)e=g>=removeNbFormat(a.replace(j,""),h);else if(x)e=gremoveNbFormat(a.replace(l,""),h);else if(B)e=f.__containsStr(a.replace(m,""),b)?!1:!0;else if(E)e=f.__containsStr(a.replace(n,""),b,null,!1);else if(C)e=f.__containsStr(a.replace(o,""),b,null,!0);else if(F)e=0===b.indexOf(a.replace(p,""))?!0:!1;else if(G){var Q=a.replace(q,"");e=b.lastIndexOf(Q,b.length-1)===b.length-1-(Q.length-1)&&b.lastIndexOf(Q,b.length-1)>-1?!0:!1}else if(H)e=str.isEmpty(b);else if(I)e=!str.isEmpty(b);else if(J)try{var R=a.replace(u,""),S=new RegExp(R);e=S.test(b)}catch(T){e=!1}else{var U=d["col_"+c];e=f.__containsStr(a,b,U?U:this.fltTypeInp)}return e}if(this.fltGrid&&(this.hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this),""!==this.inpWatermark&&this.SetWatermark(!1);var c=this.tbl.rows,d=this.fObj||{},e=0;this.validRowsIndex=[];var f=this;this.highlightKeywords&&this.UnhighlightAll(),this.popUpFilters&&this.SetAllPopupFiltersIcon(),this.markActiveColumns&&this.ClearActiveColumns(),this.searchArgs=this.GetFiltersValue();for(var g,h,i=new RegExp(this.leOperator),j=new RegExp(this.geOperator),k=new RegExp(this.lwOperator),l=new RegExp(this.grOperator),m=new RegExp(this.dfOperator),n=new RegExp(str.rgxEsc(this.lkOperator)),o=new RegExp(this.eqOperator),p=new RegExp(this.stOperator),q=new RegExp(this.enOperator),r=new RegExp(this.anOperator),s=(new RegExp(this.curExp),this.emOperator),t=this.nmOperator,u=new RegExp(str.rgxEsc(this.rgxOperator)),v=this.refRow;vB;B++){var C=this.searchArgs[this.singleSearchFlt?0:B],D=this.hasColDateType?this.colDateType[B]:this.defaultDateType;if(""!==C){var E=str.matchCase(this.GetCellData(B,w[B]),this.matchCase),F=C.split(this.orOperator),G=F.length>1?!0:!1,H=C.split(this.anOperator),I=H.length>1?!0:!1;if(G||I){for(var J,K=!1,L=G?F:H,M=0;Mj;j++)if(j===a&&""===d[f].style.display){var k=str.lower(this.GetCellData(j,h[j])),l=this.colNbFormat?this.colNbFormat[a]:null,m=b?removeNbFormat(k,l):k;e.push(m)}}return e}},GetFilterValue:function(a){if(this.fltGrid){var b,c=this.GetFilterElement(a);if(!c)return"";var d=this.fltCol[a];if(d!==this.fltTypeMulti&&d!==this.fltTypeCheckList)b=c.value;else if(d===this.fltTypeMulti){b="";for(var e=0;e=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==str.lower(typeof labelId)&&"object"==str.lower(typeof colIndex)&&"object"==str.lower(typeof operation))for(var row=this.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(this.GetColValues(ucolIndex[ucol],!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=decThisCol[i]&&!isNaN(decThisCol[i])?decThisCol[i]:2;if(oTypeThisCol&&result){if(result=result.toFixed(precision),dom.id(labThisCol[i]))switch(str.lower(oTypeThisCol)){case"innerhtml":dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result;break;case"setvalue":dom.id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=dom.id(labThisCol[i]).firstChild,txtnode=dom.text(result);dom.id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result.toFixed(precision)}catch(e){}}totRowIndex&&row[totRowIndex[ucol]]&&(row[totRowIndex[ucol]].style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,this)}},UnhighlightAll:function(){if(this.highlightKeywords&&this.searchArgs){for(var a=0;a0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||q)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function d(b,c){return function(){var d=s.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),k.apply(a,d.concat([b,c]))}}function e(a){return function(b){return c(b,a)}}function f(a){return function(b){n[a]=b}}function g(c){if(b(o,c)){var d=o[c];delete o[c],q[c]=!0,j.apply(a,d)}if(!b(n,c)&&!b(q,c))throw new Error("No "+c);return n[c]}function h(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function i(a){return function(){return p&&p.config&&p.config[a]||{}}}var j,k,l,m,n={},o={},p={},q={},r=Object.prototype.hasOwnProperty,s=[].slice,t=/\.js$/;l=function(a,b){var d,f=h(a),i=f[0];return a=f[1],i&&(i=c(i,b),d=g(i)),i?a=d&&d.normalize?d.normalize(a,e(b)):c(a,b):(a=c(a,b),f=h(a),i=f[0],a=f[1],i&&(d=g(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},m={require:function(a){return d(a)},exports:function(a){var b=n[a];return"undefined"!=typeof b?b:n[a]={}},module:function(a){return{id:a,uri:"",exports:n[a],config:i(a)}}},j=function(c,e,h,i){var j,k,p,r,s,t,u=[],v=typeof h;if(i=i||c,"undefined"===v||"function"===v){for(e=!e.length&&h.length?["require","exports","module"]:e,s=0;s]+>/g,"");return b=b.replace(/^\s+/,"").replace(/\s+$/,"")},b.create=function(a){if(a&&""!==a){var b=document.createElement(a),c=arguments;if(c.length>1)for(var d=0;d0){var d=document.cookie,e=d.indexOf(c);if(-1!==e){e+=c.length;var f=d.indexOf(";",e);-1===f&&(f=d.length),b=unescape(d.substring(e,f))}}return b},a.remove=function(a){this.write(a,"",-1)},a.valueToArray=function(a,b){b||(b=",");var c=this.read(a),d=c.split(b);return d},a.getValueByIndex=function(a,b,c){c||(c=",");var d=this.valueToArray(a,c);return d[b]},a}),define("types",[],function(){var a={},b=void 0;return a.isObj=function(a){var b=!1;return"string"==typeof a?window[a]&&"object"==typeof window[a]&&(b=!0):a&&"object"==typeof a&&(b=!0),b},a.isFn=function(a){return a&&a.constructor==Function},a.isArray=function(a){return a&&a.constructor==Array},a.isUndef=function(a){return a===b},a}),define("array",["require","./string"],function(a){var b=a("./string"),c={has:function(a,c,d){for(var e=void 0===d?!1:d,f=0;f2)return a;var b;return 99>=a&&a>50&&(b="19"+a),(50>a||"00"===a)&&(b="20"+a),b}function d(a){if(void 0===a)return 0;for(var b,c=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],d=0;d11||23>b)&&(b-=12),1>b||b>12?0:b}if(b||(b="DMY"),!a||""===a)return new Date(1001,0,1);var e,f;switch(b.toUpperCase()){case"DDMMMYYYY":f=a.replace(/[- \/.]/g," ").split(" "),e=new Date(c(f[2]),d(f[1])-1,f[0]);break;case"DMY":f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0]);break;case"MDY":f=a.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[0]-1,f[1]);break;case"YMD":f=a.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),e=new Date(c(f[0]),f[1]-1,f[2]);break;default:f=a.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),e=new Date(c(f[2]),f[1]-1,f[0])}return e}};return a}),define("modules/loader",["../dom","../types"],function(a,b){function c(c){var d=c.fObj;c.loaderTgtId=d.loader_target_id||null,c.loaderDiv=null,c.loaderText=d.loader_text||"Loading...",c.loaderHtml=d.loader_html||null,c.loaderCssClass=d.loader_css_class||"loader",c.loaderCloseDelay=200,c.onShowLoader=b.isFn(d.on_show_loader)?d.on_show_loader:null,c.onHideLoader=b.isFn(d.on_hide_loader)?d.on_hide_loader:null,this.tf=c;var e=a.create("div",["id",c.prfxLoader+c.id]);e.className=c.loaderCssClass;var f=c.loaderTgtId?a.id(c.loaderTgtId):c.gridLayout?c.tblCont:c.tbl.parentNode;c.loaderTgtId?f.appendChild(e):f.insertBefore(e,c.tbl),c.loaderDiv=a.id(c.prfxLoader+c.id),c.loaderHtml?c.loaderDiv.innerHTML=c.loaderHtml:c.loaderDiv.appendChild(a.text(c.loaderText))}var d=window;return c.prototype.show=function(a){function b(){c.loaderDiv&&(c.onShowLoader&&"none"!==a&&c.onShowLoader.call(null,c),c.loaderDiv.style.display=a,c.onHideLoader&&"none"===a&&c.onHideLoader.call(null,c))}if(this.tf.loader&&this.tf.loaderDiv&&this.tf.loaderDiv.style.display!==a){var c=this.tf,e="none"===a?this.tf.loaderCloseDelay:1;d.setTimeout(b,e)}},c.prototype.remove=function(){if(this.tf.loaderDiv){var b=this.tf.loaderTgtId?a.id(this.tf.loaderTgtId):this.tf.gridLayout?this.tf.tblCont:this.tf.tbl.parentNode;b.removeChild(this.tf.loaderDiv),this.tf.loaderDiv=null}},c}),define("modules/alternateRows",["../dom"],function(a){function b(a){var b=a.fObj;this.evenCss=b.even_row_css_class||"even",this.oddCss=b.odd_row_css_class||"odd",this.tf=a}return b.prototype.set=function(){if(this.tf.hasGrid||this.tf.isFirstLoad)for(var a=(this.tf.tbl.rows,null===this.tf.validRowsIndex),b=a?this.tf.refRow:0,c=a?this.tf.nbFilterableRows+b:this.tf.validRowsIndex.length,d=0,e=b;c>e;e++){var f=a?e:this.tf.validRowsIndex[e];this.setRowBg(f,d),d++}},b.prototype.setRowBg=function(b,c){if(this.tf.alternateBgs&&!isNaN(b)){var d=this.tf.tbl.rows,e=c?c:b;this.removeRowBg(b),a.addClass(d[b],e%2?this.evenCss:this.oddCss)}},b.prototype.removeRowBg=function(b){if(!isNaN(b)){var c=this.tf.tbl.rows;a.removeClass(c[b],this.oddCss),a.removeClass(c[b],this.evenCss)}},b.prototype.remove=function(){if(this.tf.hasGrid){for(var a=(this.tf.tbl.rows,this.tf.refRow);a=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==str.lower(typeof labelId)&&"object"==str.lower(typeof colIndex)&&"object"==str.lower(typeof operation))for(var row=this.tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(this.tf.GetColValues(ucolIndex[ucol],!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),dom.id(labThisCol[i]))switch(str.lower(oTypeThisCol)){case"innerhtml":dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result;break;case"setvalue":dom.id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=dom.id(labThisCol[i]).firstChild,txtnode=dom.text(result);dom.id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{dom.id(labThisCol[i]).innerHTML=isNaN(result)||!isFinite(result)||0===nbvalues?".":result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?row[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.tf.onAfterOperation&&this.tf.onAfterOperation.call(null,this.tf)}},ColOps}),define("core",["require","event","dom","string","cookie","types","array","helpers","date","date","modules/loader","modules/alternateRows","modules/colOps"],function(a){function b(a){if(0!==arguments.length){if(this.id=a,this.version="3.0",this.year=(new Date).getFullYear(),this.tbl=n.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"!==o.lower(this.tbl.nodeName)||0===this.GetRowsNb())throw new Error("Could not instantiate TF object: HTML table not found.");if(arguments.length>1)for(var b=0;b1?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.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=q.isFn(e.on_before_filter)?e.on_before_filter:null,this.onAfterFilter=q.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:!1,this.colOperation=null,this.hasVisibleRows=e.rows_always_visible?!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=q.isFn(e.on_filters_loaded)?e.on_filters_loaded:null,this.singleSearchFlt=e.single_search_filter===!0?!0:!1,this.onRowValidated=q.isFn(e.on_row_validated)?e.on_row_validated:null,this.customCellDataCols=e.custom_cell_data_cols?e.custom_cell_data_cols:[],this.customCellData=q.isFn(e.custom_cell_data)?e.custom_cell_data:null,this.inpWatermark=e.input_watermark||"",this.inpWatermarkCssClass=e.input_watermark_css_class||"fltWatermark",this.isInpWatermarkArray=q.isArray(e.input_watermark),this.toolBarTgtId=e.toolbar_target_id||null,this.helpInstructions=e.help_instructions||null,this.popUpFilters=e.popup_filters===!0?!0:!1,this.markActiveColumns=e.mark_active_columns===!0?!0:!1,this.activeColumnsCssClass=e.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=q.isFn(e.on_before_active_column)?e.on_before_active_column:null,this.onAfterActiveColumn=q.isFn(e.on_after_active_column)?e.on_after_active_column:null,this.displayAllText=e.display_all_text||"",this.enableSlcResetFilter=e.enable_slc_reset_filter===!1?!1:!0,this.enableEmptyOption=e.enable_empty_option===!0?!0:!1,this.emptyText=e.empty_text||"(Empty)",this.enableNonEmptyOption=e.enable_non_empty_option===!0?!0:!1,this.nonEmptyText=e.non_empty_text||"(Non empty)",this.onSlcChange=e.on_change===!1?!1:!0,this.sortSlc=e.sort_select===!1?!1:!0,this.isSortNumAsc=e.sort_num_asc===!0?!0:!1,this.sortNumAsc=this.isSortNumAsc?e.sort_num_asc:null,this.isSortNumDesc=e.sort_num_desc===!0?!0:!1,this.sortNumDesc=this.isSortNumDesc?e.sort_num_desc:null,this.slcFillingMethod=e.slc_filling_method||"createElement",this.fillSlcOnDemand=e.fill_slc_on_demand===!0?!0:!1,this.activateSlcTooltip=e.activate_slc_tooltip||"Click to activate",this.multipleSlcTooltip=e.multiple_slc_tooltip||"Use Ctrl key for multiple selections",this.hasCustomSlcOptions=q.isObj(e.custom_slc_options)?!0:!1,this.customSlcOptions=q.isArray(e.custom_slc_options)?e.custom_slc_options:null,this.onBeforeOperation=q.isFn(e.on_before_operation)?e.on_before_operation:null,this.onAfterOperation=q.isFn(e.on_after_operation)?e.on_after_operation:null,this.checkListDiv=[],this.checkListDivCssClass=e.div_checklist_css_class||"div_checklist",this.checkListCssClass=e.checklist_css_class||"flt_checklist",this.checkListItemCssClass=e.checklist_item_css_class||"flt_checklist_item",this.checkListSlcItemCssClass=e.checklist_selected_item_css_class||"flt_checklist_slc_item",this.activateCheckListTxt=e.activate_checklist_text||"Click to load filter data",this.checkListItemDisabledCssClass=e.checklist_item_disabled_css_class||"flt_checklist_item_disabled",this.enableCheckListResetFilter=e.enable_checklist_reset_filter===!1?!1:!0,this.rgxOperator=e.regexp_operator||"rgx:",this.emOperator=e.empty_operator||"[empty]",this.nmOperator=e.nonempty_operator||"[nonempty]",this.orOperator=e.or_operator||"||",this.anOperator=e.and_operator||"&&",this.grOperator=e.greater_operator||">",this.lwOperator=e.lower_operator||"<",this.leOperator=e.lower_equal_operator||"<=",this.geOperator=e.greater_equal_operator||">=",this.dfOperator=e.different_operator||"!",this.lkOperator=e.like_operator||"*",this.eqOperator=e.equal_operator||"=",this.stOperator=e.start_with_operator||"{",this.enOperator=e.end_with_operator||"}",this.curExp=e.cur_exp||"^[¥£€$]",this.separator=e.separator||",",this.rowsCounter=e.rows_counter===!0?!0:!1,this.statusBar=e.status_bar===!0?!0:!1,this.loader=e.loader===!0?!0:!1,this.displayBtn=e.btn===!0?!0:!1,this.btnText=e.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=e.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=e.btn_reset===!0?!0:!1,this.btnResetCssClass=e.btn_reset_css_class||"reset",this.onBeforeReset=q.isFn(e.on_before_reset)?e.on_before_reset:null,this.onAfterReset=q.isFn(e.on_after_reset)?e.on_after_reset:null,this.paging=e.paging===!0?!0:!1,this.hasResultsPerPage=e.results_per_page===!0?!0:!1,this.btnPageCssClass=e.paging_btn_css_class||"pgInp",this.pagingSlc=null,this.resultsPerPage=null,this.resultsPerPageSlc=null,this.isPagingRemoved=!1,this.nbVisibleRows=0,this.nbHiddenRows=0,this.startPagingRow=0,this.nbPages=0,this.currentPageNb=1,this.sort=e.sort===!0?!0:!1,this.isSortEnabled=!1,this.sorted=!1,this.sortConfig=e.sort_config||{},this.sortConfig.name=void 0!==this.sortConfig.name?e.sort_config.name:"sortabletable",this.sortConfig.src=void 0!==this.sortConfig.src?e.sort_config.src:this.basePath+"sortabletable.js",this.sortConfig.adapterSrc=void 0!==this.sortConfig.adapter_src?e.sort_config.adapter_src:this.basePath+"tfAdapter.sortabletable.js",this.sortConfig.initialize=void 0!==this.sortConfig.initialize?e.sort_config.initialize:function(a){a.SetSortTable&&a.SetSortTable()},this.sortConfig.sortTypes=q.isArray(this.sortConfig.sort_types)?e.sort_config.sort_types:[],this.sortConfig.sortCol=void 0!==this.sortConfig.sort_col?e.sort_config.sort_col:null,this.sortConfig.asyncSort=this.sortConfig.async_sort===!0?!0:!1,this.sortConfig.triggerIds=q.isArray(this.sortConfig.sort_trigger_ids)?e.sort_config.sort_trigger_ids:[],this.selectable=e.selectable===!0?!0:!1,this.editable=e.editable===!0?!0:!1,this.ezEditTableConfig=e.ezEditTable_config||{},this.ezEditTableConfig.name=void 0!==this.ezEditTableConfig.name?e.ezEditTable_config.name:"ezedittable",this.ezEditTableConfig.src=void 0!==this.ezEditTableConfig.src?e.ezEditTable_config.src:this.basePath+"ezEditTable/ezEditTable.js",this.ezEditTableConfig.loadStylesheet=this.ezEditTableConfig.loadStylesheet===!0?!0:!1,this.ezEditTableConfig.stylesheet=this.ezEditTableConfig.stylesheet||this.basePath+"ezEditTable/ezEditTable.css",this.ezEditTableConfig.stylesheetName=void 0!==this.ezEditTableConfig.stylesheetName?e.ezEditTable_config.stylesheetName:"ezEditTableCss",this.ezEditTableConfig.err='Failed to instantiate EditTable object.\n"ezEditTable" module may not be available.',this.onKeyUp=e.on_keyup===!0?!0:!1,this.onKeyUpDelay=isNaN(e.on_keyup_delay)?900:e.on_keyup_delay,this.isUserTyping=null,this.onKeyUpTimer=void 0,this.highlightKeywords=e.highlight_keywords===!0?!0:!1,this.highlightCssClass=e.highlight_css_class||"keyword",this.highlightedNodes=[],this.defaultDateType=e.default_date_type||"DMY",this.thousandsSeparator=e.thousands_separator||",",this.decimalSeparator=e.decimal_separator||".",this.hasColNbFormat=e.col_number_format===!0?!0:!1,this.colNbFormat=q.isArray(this.hasColNbFormat)?e.col_number_format:null,this.hasColDateType=e.col_date_type===!0?!0:!1,this.colDateType=q.isArray(this.hasColDateType)?e.col_date_type:null,this.msgFilter=e.msg_filter||"Filtering data...",this.msgPopulate=e.msg_populate||"Populating filter...",this.msgPopulateCheckList=e.msg_populate_checklist||"Populating list...",this.msgChangePage=e.msg_change_page||"Collecting paging data...",this.msgClear=e.msg_clear||"Clearing filters...",this.msgChangeResults=e.msg_change_results||"Changing results per page...",this.msgResetValues=e.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=e.msg_reset_page||"Re-setting page...",this.msgResetPageLength=e.msg_reset_page_length||"Re-setting page length...",this.msgSort=e.msg_sort||"Sorting data...",this.msgLoadExtensions=e.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=e.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxContentDiv="cont_",this.prfxCheckListDiv="chkdiv_",this.prfxSlcPages="slcPages_",this.prfxSlcResults="slcResults_",this.prfxSlcResultsTxt="slcResultsTxt_",this.prfxBtnNextSpan="btnNextSpan_",this.prfxBtnPrevSpan="btnPrevSpan_",this.prfxBtnLastSpan="btnLastSpan_",this.prfxBtnFirstSpan="btnFirstSpan_",this.prfxBtnNext="btnNext_",this.prfxBtnPrev="btnPrev_",this.prfxBtnLast="btnLast_",this.prfxBtnFirst="btnFirst_",this.prfxPgSpan="pgspan_",this.prfxPgBeforeSpan="pgbeforespan_",this.prfxPgAfterSpan="pgafterspan_",this.prfxCounter="counter_",this.prfxTotRows="totrows_span_",this.prfxTotRowsTxt="totRowsTextSpan_",this.prfxResetSpan="resetspan_",this.prfxLoader="load_",this.prfxStatus="status_",this.prfxStatusSpan="statusSpan_",this.prfxStatusTxt="statusText_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.prfxMainTblCont="gridCont_",this.prfxTblCont="tblCont_",this.prfxHeadTblCont="tblHeadCont_",this.prfxHeadTbl="tblHead_",this.prfxGridFltTd="_td_",this.prfxGridTh="tblHeadTh_",this.prfxHelpSpan="helpSpan_",this.prfxHelpDiv="helpDiv_",this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_",this.hasStoredValues=!1,this.rememberGridValues=e.remember_grid_values===!0?!0:!1,this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&e.remember_page_number?!0:!1,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&e.remember_page_length?!0:!1,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.cookieDuration=isNaN(e.set_cookie_duration)?1e5:parseInt(e.set_cookie_duration,10),this.hasExtensions=e.extensions===!0?!0:!1,this.extensions=this.hasExtensions?e.extensions:null,this.enableDefaultTheme=e.enable_default_theme===!0?!0:!1,this.hasThemes=e.enable_default_theme||e.themes&&q.isObj(e.themes)?!0:!1,this.themes=this.hasThemes?e.themes:null,this.themesPath=e.themes_path||this.basePath+"TF_Themes/",this.Cpt={loader:null,alternateRows:null,colOps:null};var l=this;this.Evt={name:{filter:"Filter",populateselect:"Populate",populatechecklist:"PopulateCheckList",changepage:"ChangePage",clear:"Clear",changeresultsperpage:"ChangeResults",resetvalues:"ResetValues",resetpage:"ResetPage",resetpagelength:"ResetPageLength",sort:"Sort",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},getKeyCode:function(a){return a.charCode?a.charCode:a.keyCode?a.keyCode:a.which?a.which:0},_DetectKey:function(a){if(l.enterKey){var b=a||k.event;if(b){var c=l.Evt.getKeyCode(b);13===c?(l._Filter(),m.cancel(b),m.stop(b)):(l.isUserTyping=!0,k.clearInterval(l.onKeyUpTimer),l.onKeyUpTimer=void 0)}}},_OnKeyUp:function(a){function b(){k.clearInterval(l.onKeyUpTimer),l.onKeyUpTimer=void 0,l.isUserTyping||(l.Filter(),l.isUserTyping=null)}if(l.onKeyUp){var c=a||k.event,d=l.Evt.getKeyCode(c);l.isUserTyping=!1,13!==d&&9!==d&&27!==d&&38!==d&&40!==d?void 0===l.onKeyUpTimer&&(l.onKeyUpTimer=k.setInterval(b,l.onKeyUpDelay)):(k.clearInterval(l.onKeyUpTimer),l.onKeyUpTimer=void 0)}},_OnKeyDown:function(){l.onKeyUp&&(l.isUserTyping=!0)},_OnInpBlur:function(){l.onKeyUp&&(l.isUserTyping=!1,k.clearInterval(l.onKeyUpTimer)),""===this.value&&""!==l.inpWatermark&&(this.value=l.isInpWatermarkArray?l.inpWatermark[this.getAttribute("ct")]:l.inpWatermark,n.addClass(this,l.inpWatermarkCssClass)),l.ezEditTable&&(l.editable&&l.ezEditTable.Editable.Set(),l.selectable&&l.ezEditTable.Selection.Set())},_OnInpFocus:function(a){var b=a||k.event;if(l.activeFilterId=this.getAttribute("id"),l.activeFlt=n.id(l.activeFilterId),l.isInpWatermarkArray){var c=l.inpWatermark[this.getAttribute("ct")];this.value===c&&""!==c&&(this.value="",n.removeClass(this,l.inpWatermarkCssClass))}else this.value===l.inpWatermark&&""!==l.inpWatermark&&(this.value="",n.removeClass(this,l.inpWatermarkCssClass));l.popUpFilters&&(m.cancel(b),m.stop(b)),l.ezEditTable&&(l.editable&&l.ezEditTable.Editable.Remove(),l.selectable&&l.ezEditTable.Selection.Remove())},_OnSlcFocus:function(a){var b=a||k.event;if(l.activeFilterId=this.getAttribute("id"),l.activeFlt=n.id(l.activeFilterId),l.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var c=this.getAttribute("ct");l.PopulateSelect(c),s.isIE()||this.setAttribute("filled","1")}l.popUpFilters&&(m.cancel(b),m.stop(b))},_OnSlcChange:function(a){var b=l.activeFlt.getAttribute("colIndex");if(!l.activeFlt||!b||l["col"+b]!==l.fltTypeCheckList||l.Evt._OnSlcChange.caller){var c=a||k.event;l.popUpFilters&&m.stop(c),l.onSlcChange&&l.Filter()}},_OnSlcBlur:function(){},_OnCheckListChange:function(a){l.Evt._OnCheckListChange.caller&&l.Evt._OnSlcChange(a)},_OnCheckListClick:function(){if(l.fillSlcOnDemand&&"0"===this.getAttribute("filled")){var a=this.getAttribute("ct"); +l.PopulateCheckList(a),l.checkListDiv[a].onclick=null,l.checkListDiv[a].title=""}},_OnCheckListFocus:function(){l.activeFilterId=this.firstChild.getAttribute("id"),l.activeFlt=n.id(l.activeFilterId)},_OnCheckListBlur:function(){},_OnBtnClick:function(){l.Filter()},_OnSlcPagesChangeEvt:null,_EnableSlc:function(){this.firstChild.disabled=!1,this.firstChild.focus(),this.onclick=null},_Clear:function(){l.ClearFilters()},_OnHelpBtnClick:function(){l._ToggleHelp()},_Paging:{nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null}}}}function c(a,b){return a-b}function d(a,b){return b-a}function e(a,b){var c=o.lower(a),d=o.lower(b);return d>c?-1:c>d?1:0}function f(a,b){if(a){b||(b="us");var c=a;return c="us"===o.lower(b)?+c.replace(/[^\d\.-]/g,""):+c.replace(/[^\d\,-]/g,"").replace(",",".")}}function g(a,b){for(var c=!1,d=b?b:"script",e="script"==d?"src":"href",f=n.tag(v,d),g=0;g0?g[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popUpFilters&&this.headersRow++,this.popUpFilters&&this.headersRow++,this.fixedHeaders&&this.SetFixedHeaders(),f.className=this.fltsRowCssClass,this.isExternalFlt&&(!this.gridLayout||this.popUpFilters)&&(f.style.display="none")}this.nbFilterableRows=this.GetRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var h=0;d>h;h++){var i=n.create(this.fltCellTag),j=this["col"+h],k=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[h]:null;if(this.singleSearchFlt&&(i.colSpan=this.nbCells),this.gridLayout||f.appendChild(i),b=h==d-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.popUpFilters&&this.SetPopupFilter(h),void 0===j&&(j=void 0===c["col_"+h]?this.fltTypeInp:o.lower(c["col_"+h])),this.singleSearchFlt&&(j=this.fltTypeInp,b=this.singleFltCssClass),j===this.fltTypeSlc||j===this.fltTypeMulti){var l=n.create(this.fltTypeSlc,["id",this.prfxFlt+h+"_"+this.id],["ct",h],["filled","0"]);if(j===this.fltTypeMulti&&(l.multiple=this.fltTypeMulti,l.title=this.multipleSlcTooltip),l.className=o.lower(j)===this.fltTypeSlc?b:this.fltMultiCssClass,k?(n.id(k).appendChild(l),this.externalFltEls.push(l)):i.appendChild(l),this.fltIds.push(this.prfxFlt+h+"_"+this.id),this.fillSlcOnDemand||this._PopulateSelect(h),l.onkeypress=this.Evt._DetectKey,l.onchange=this.Evt._OnSlcChange,l.onfocus=this.Evt._OnSlcFocus,l.onblur=this.Evt._OnSlcBlur,this.fillSlcOnDemand){var m=n.createOpt(this.displayAllText,"");l.appendChild(m)}this.fillSlcOnDemand&&s.isIE()&&(l.disabled=!0,l.title=this.activateSlcTooltip,l.parentNode.onclick=this.Evt._EnableSlc,j===this.fltTypeMulti&&this.__deferMultipleSelection(l,0))}else if(j===this.fltTypeCheckList){var q=n.create("div",["id",this.prfxCheckListDiv+h+"_"+this.id],["ct",h],["filled","0"]);q.className=this.checkListDivCssClass,k?(n.id(k).appendChild(q),this.externalFltEls.push(q)):i.appendChild(q),this.checkListDiv[h]=q,this.fltIds.push(this.prfxFlt+h+"_"+this.id),this.fillSlcOnDemand||this._PopulateCheckList(h),q.onclick=this.Evt._OnCheckListFocus,this.fillSlcOnDemand&&(q.onclick=this.Evt._OnCheckListClick,q.appendChild(n.text(this.activateCheckListTxt)))}else{var r=j===this.fltTypeInp?"text":"hidden",t=n.create(this.fltTypeInp,["id",this.prfxFlt+h+"_"+this.id],["type",r],["ct",h]);if("hidden"!=r&&(t.value=this.isInpWatermarkArray?this.inpWatermark[h]:this.inpWatermark),t.className=b,""!==this.inpWatermark&&n.addClass(t,this.inpWatermarkCssClass),t.onfocus=this.Evt._OnInpFocus,k?(n.id(k).appendChild(t),this.externalFltEls.push(t)):i.appendChild(t),this.fltIds.push(this.prfxFlt+h+"_"+this.id),t.onkeypress=this.Evt._DetectKey,t.onkeydown=this.Evt._OnKeyDown,t.onkeyup=this.Evt._OnKeyUp,t.onblur=this.Evt._OnInpBlur,this.rememberGridValues){var u=p.read(this.fltsValuesCookie),v=new RegExp(this.separator,"g"),w=u.split(v);" "!=w[h]&&this.SetFilterValue(h,w[h],!1)}}if(h==d-1&&this.displayBtn){var x=n.create(this.fltTypeInp,["id",this.prfxValButton+h+"_"+this.id],["type","button"],["value",this.btnText]);x.className=this.btnCssClass,k?n.id(k).appendChild(x):i.appendChild(x),x.onclick=this.Evt._OnBtnClick}}}else this.__resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.GetRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;if(this.rowsCounter&&this.SetRowsCounter(),this.statusBar&&this.SetStatusBar(),this.fixedHeaders&&!this.isFirstLoad&&this.SetFixedHeaders(),this.paging&&this.SetPaging(),this.hasResultsPerPage&&this.paging&&this.SetResultsPerPage(),this.btnReset&&this.SetResetBtn(),this.helpInstructions&&this.SetHelpInstructions(),this.hasColWidth&&!this.gridLayout&&this.SetColWidths(),this.alternateBgs&&this.isStartBgAlternate){var y=a("modules/alternateRows");this.Cpt.alternateRows=new y(this),this.Cpt.alternateRows.set()}if(this.hasColOperation){var z=a("modules/colOps");this.Cpt.colOps=new z(this),this.Cpt.colOps.set()}(this.sort||this.gridLayout)&&this.SetSort(),(this.selectable||this.editable)&&this.SetEditable(),this.isFirstLoad=!1,this.hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.ResetValues(),this.gridLayout||n.addClass(this.tbl,this.prfxTf),this.loader&&this.Cpt.loader.show("none"),this.hasExtensions&&this.LoadExtensions(),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}},EvtManager:function(a,b){function c(){if(a){switch(a){case d.Evt.name.filter:d.isModFilterFn?d.modFilterFn.call(null,d):d._Filter();break;case d.Evt.name.populateselect:d.refreshFilters?d._PopulateSelect(e,!0):d._PopulateSelect(e,!1,f,g);break;case d.Evt.name.populatechecklist:d._PopulateCheckList(e,f,g);break;case d.Evt.name.changepage:d._ChangePage(h);break;case d.Evt.name.clear:d._ClearFilters(),d._Filter();break;case d.Evt.name.changeresultsperpage:d._ChangeResultsPerPage();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.Cpt.loader.show("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.Cpt.loader.show(""),this.StatusMsg(d["msg"+a])}catch(i){}k.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&&q.isArray(this.extensions.name)&&q.isArray(this.extensions.src))for(var a=this.extensions,b=0;b',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',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.Cpt.loader.remove(),this.popUpFilters&&this.RemovePopupFilters(),this.markActiveColumns&&this.ClearActiveColumns(),(this.editable||this.selectable)&&this.RemoveEditable();for(var b=this.refRow;b0&&!c.startRow?void 0:c.startRow||a.refRow,c.scroll_into_view=c.scroll_into_view===!1?!1:!0,c.base_path=c.base_path||a.basePath+"ezEditTable/",c.editable=a.editable=a.fObj.editable,c.selection=a.selectable=a.fObj.selectable,a.selectable&&(c.default_selection=c.default_selection||"row"),c.active_cell_css=c.active_cell_css||"ezETSelectedCell",a._lastValidRowIndex=0,a._lastRowIndex=0,a.selectable){var e=function(b,c,d){if(a.validRowsIndex){var e,f=a.validRowsIndex,g=f.length,h="row"!==b.defaultSelection?c.parentNode:c,i="TD"===c.nodeName?c:null,j=void 0!==d?b.Event.GetKey(d):0,k=r.has(f,h.rowIndex),l=34===j||33===j?a.pagingLength||b.nbRowsPerPage:1;if(k)34!==j&&33!==j?(a._lastValidRowIndex=r.indexByValue(f,h.rowIndex),a._lastRowIndex=h.rowIndex):(e=34===j?a._lastValidRowIndex+l<=g-1?f[a._lastValidRowIndex+l]:[g-1]:a._lastValidRowIndex-l<=f[0]?f[0]:f[a._lastValidRowIndex-l],a._lastRowIndex=e,a._lastValidRowIndex=r.indexByValue(f,e),o(e));else{if(h.rowIndex>a._lastRowIndex)if(h.rowIndex>=f[g-1])e=f[g-1];else{var m=a._lastValidRowIndex+l;e=m>g-1?f[g-1]:f[m]}else if(h.rowIndex<=f[0])e=f[0];else{var n=f[a._lastValidRowIndex-l];e=n?n:f[0]}a._lastRowIndex=h.rowIndex,o(e)}var o=function(d){if("row"===b.defaultSelection)b.Selection.SelectRowByIndex(d);else{b.ClearSelections();var e=c.cellIndex,f=a.tbl.rows[d];"both"===b.defaultSelection&&b.Selection.SelectRowByIndex(d),f&&b.Selection.SelectCell(f.cells[e])}if(a.validRowsIndex.length!==a.GetRowsNb()){var g=a.tbl.rows[d];g&&g.scrollIntoView(!1),i&&(i.cellIndex===a.GetCellsNb()-1&&a.gridLayout?a.tblCont.scrollLeft=1e8:0===i.cellIndex&&a.gridLayout?a.tblCont.scrollLeft=0:i.scrollIntoView(!1))}}}},f=function(b,c){var d="row"!==b.defaultSelection?c.parentNode:c;if(a.paging&&a.nbPages>1){b.nbRowsPerPage=a.pagingLength;var e=a.validRowsIndex,f=e.length,g=parseInt(a.startPagingRow,10)+parseInt(a.pagingLength,10),h=d.rowIndex;h===e[f-1]&&a.currentPageNb!=a.nbPages?a.SetPage("last"):h==e[0]&&1!==a.currentPageNb?a.SetPage("first"):h>e[g-1]&&he[0]&&a.SetPage("previous")}};if(a.paging&&(a.onAfterChangePage=function(a){var b=a.ezEditTable,c=b.Selection.GetActiveRow();c&&c.scrollIntoView(!1);var d=b.Selection.GetActiveCell();d&&d.scrollIntoView(!1)}),"row"===c.default_selection){var g=c.on_before_selected_row;c.on_before_selected_row=function(){f(arguments[0],arguments[1],arguments[2]),g&&g.call(null,arguments[0],arguments[1],arguments[2])};var h=c.on_after_selected_row;c.on_after_selected_row=function(){e(arguments[0],arguments[1],arguments[2]),h&&h.call(null,arguments[0],arguments[1],arguments[2])}}else{var i=c.on_before_selected_cell;c.on_before_selected_cell=function(){f(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])};var j=c.on_after_selected_cell;c.on_after_selected_cell=function(){e(arguments[0],arguments[1],arguments[2]),j&&j.call(null,arguments[0],arguments[1],arguments[2])}}}if(a.editable){var k=c.on_added_dom_row;if(c.on_added_dom_row=function(){a.nbFilterableRows++,a.paging?(a.nbRows++,a.nbVisibleRows++,a.nbFilterableRows++,a.paging=!1,a.RemovePaging(),a.AddPaging(!1)):a.RefreshNbRows(),a.alternateBgs&&a.Cpt.alternateRows.set(),k&&k.call(null,arguments[0],arguments[1],arguments[2])},c.actions&&c.actions["delete"]){var l=c.actions["delete"].on_after_submit;c.actions["delete"].on_after_submit=function(){a.nbFilterableRows--,a.paging?(a.nbRows--,a.nbVisibleRows--,a.nbFilterableRows--,a.paging=!1,a.RemovePaging(),a.AddPaging(!1)):a.RefreshNbRows(),a.alternateBgs&&a.Cpt.alternateRows.set(),l&&l.call(null,arguments[0],arguments[1])}}}try{a.ezEditTable=new EditTable(a.id,c,b),a.ezEditTable.Init()}catch(m){console.log(c.err)}},SetPaging:function(){if((this.hasGrid||this.isFirstLoad)&&this.paging&&(this.isPagingRemoved||this.isFirstLoad)){var a=this.fObj;this.pagingTgtId=a.paging_target_id||null,this.pagingLength=isNaN(a.paging_length)?10:a.paging_length,this.resultsPerPageTgtId=a.results_per_page_target_id||null,this.pgSlcCssClass=a.paging_slc_css_class||"pgSlc",this.pgInpCssClass=a.paging_inp_css_class||"pgNbInp",this.resultsSlcCssClass=a.results_slc_css_class||"rspg",this.resultsSpanCssClass=a.results_span_css_class||"rspgSpan",this.nbVisibleRows=0,this.nbHiddenRows=0,this.startPagingRow=0,this.nbPages=0,this.btnNextPageText=a.btn_next_page_text||">",this.btnPrevPageText=a.btn_prev_page_text||"<",this.btnLastPageText=a.btn_last_page_text||">|",this.btnFirstPageText=a.btn_first_page_text||"|<",this.btnNextPageHtml=a.btn_next_page_html||(this.enableIcons?'':null),this.btnPrevPageHtml=a.btn_prev_page_html||(this.enableIcons?'':null),this.btnFirstPageHtml=a.btn_first_page_html||(this.enableIcons?'':null),this.btnLastPageHtml=a.btn_last_page_html||(this.enableIcons?'':null),this.pageText=a.page_text||" Page ",this.ofText=a.of_text||" of ",this.nbPgSpanCssClass=a.nb_pages_css_class||"nbpg",this.hasPagingBtns=a.paging_btns===!1?!1:!0,this.pagingBtnEvents=null,this.pageSelectorType=a.page_selector_type||this.fltTypeSlc,this.onBeforeChangePage=q.isFn(a.on_before_change_page)?a.on_before_change_page:null,this.onAfterChangePage=q.isFn(a.on_after_change_page)?a.on_after_change_page:null;var b=this.refRow,c=this.nbRows;if(this.nbPages=Math.ceil((c-b)/this.pagingLength),!this.Evt._Paging.next){var d=this;this.Evt._Paging={slcIndex:function(){return d.pageSelectorType===d.fltTypeSlc?d.pagingSlc.options.selectedIndex:parseInt(d.pagingSlc.value,10)-1},nbOpts:function(){return d.pageSelectorType===d.fltTypeSlc?parseInt(d.pagingSlc.options.length,10)-1:d.nbPages-1},next:function(){d.Evt._Paging.nextEvt&&d.Evt._Paging.nextEvt();var a=d.Evt._Paging.slcIndex()0?d.Evt._Paging.slcIndex()-1:d.Evt._Paging.nbOpts();d.ChangePage(a)},last:function(){d.Evt._Paging.lastEvt&&d.Evt._Paging.lastEvt(),d.ChangePage(d.Evt._Paging.nbOpts())},first:function(){d.Evt._Paging.firstEvt&&d.Evt._Paging.firstEvt(),d.ChangePage(0)},_detectKey:function(a){var b=a||k.event;if(b){var c=d.Evt.getKeyCode(a);13===c&&(d.sorted?(d.Filter(),d.ChangePage(d.Evt._Paging.slcIndex())):d.ChangePage(),this.blur())}},nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null}}this.Evt._OnSlcPagesChange||(this.Evt._OnSlcPagesChange=function(){d.Evt._Paging._OnSlcPagesChangeEvt&&d.Evt._Paging._OnSlcPagesChangeEvt(),d.ChangePage(),this.blur(),this.parentNode&&s.isIE()&&this.parentNode.focus()});var e;this.pageSelectorType===this.fltTypeSlc&&(e=n.create(this.fltTypeSlc,["id",this.prfxSlcPages+this.id]),e.className=this.pgSlcCssClass,e.onchange=this.Evt._OnSlcPagesChange),this.pageSelectorType===this.fltTypeInp&&(e=n.create(this.fltTypeInp,["id",this.prfxSlcPages+this.id],["value",this.currentPageNb]),e.className=this.pgInpCssClass,e.onkeypress=this.Evt._Paging._detectKey);var f=n.create("span",["id",this.prfxBtnNextSpan+this.id]),g=n.create("span",["id",this.prfxBtnPrevSpan+this.id]),h=n.create("span",["id",this.prfxBtnLastSpan+this.id]),i=n.create("span",["id",this.prfxBtnFirstSpan+this.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)f.innerHTML=this.btnNextPageHtml,f.onclick=this.Evt._Paging.next;else{var j=n.create(this.fltTypeInp,["id",this.prfxBtnNext+this.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);j.className=this.btnPageCssClass,j.onclick=this.Evt._Paging.next,f.appendChild(j)}if(this.btnPrevPageHtml)g.innerHTML=this.btnPrevPageHtml,g.onclick=this.Evt._Paging.prev;else{var l=n.create(this.fltTypeInp,["id",this.prfxBtnPrev+this.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);l.className=this.btnPageCssClass,l.onclick=this.Evt._Paging.prev,g.appendChild(l)}if(this.btnLastPageHtml)h.innerHTML=this.btnLastPageHtml,h.onclick=this.Evt._Paging.last;else{var m=n.create(this.fltTypeInp,["id",this.prfxBtnLast+this.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);m.className=this.btnPageCssClass,m.onclick=this.Evt._Paging.last,h.appendChild(m)}if(this.btnFirstPageHtml)i.innerHTML=this.btnFirstPageHtml,i.onclick=this.Evt._Paging.first;else{var o=n.create(this.fltTypeInp,["id",this.prfxBtnFirst+this.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);o.className=this.btnPageCssClass,o.onclick=this.Evt._Paging.first,i.appendChild(o)}}this.pagingTgtId||this.SetTopDiv();var p=this.pagingTgtId?n.id(this.pagingTgtId):this.mDiv;""!==p.innerHTML&&(p.innerHTML=""),p.appendChild(i),p.appendChild(g);var r=n.create("span",["id",this.prfxPgBeforeSpan+this.id]);r.appendChild(n.text(this.pageText)),r.className=this.nbPgSpanCssClass,p.appendChild(r),p.appendChild(e);var t=n.create("span",["id",this.prfxPgAfterSpan+this.id]);t.appendChild(n.text(this.ofText)),t.className=this.nbPgSpanCssClass,p.appendChild(t);var u=n.create("span",["id",this.prfxPgSpan+this.id]);u.className=this.nbPgSpanCssClass,u.appendChild(n.text(" "+this.nbPages+" ")),p.appendChild(u),p.appendChild(f),p.appendChild(h),this.pagingSlc=n.id(this.prfxSlcPages+this.id),(!this.rememberGridValues||this.isPagingRemoved)&&this.SetPagingInfo(),this.fltGrid||(this.ValidateAllRows(),this.SetPagingInfo(this.validRowsIndex)),this.pagingBtnEvents=this.Evt._Paging,this.isPagingRemoved=!1}},RemovePaging:function(){if(this.hasGrid&&this.pagingSlc){var a,b,c,d,e,f,g;a=n.id(this.prfxBtnNextSpan+this.id),b=n.id(this.prfxBtnPrevSpan+this.id),c=n.id(this.prfxBtnLastSpan+this.id),d=n.id(this.prfxBtnFirstSpan+this.id),e=n.id(this.prfxPgBeforeSpan+this.id),f=n.id(this.prfxPgAfterSpan+this.id),g=n.id(this.prfxPgSpan+this.id),this.pagingSlc.parentNode.removeChild(this.pagingSlc),a&&a.parentNode.removeChild(a),b&&b.parentNode.removeChild(b),c&&c.parentNode.removeChild(c),d&&d.parentNode.removeChild(d),e&&e.parentNode.removeChild(e),f&&f.parentNode.removeChild(f),g&&g.parentNode.removeChild(g),this.pagingBtnEvents=null,this.pagingSlc=null,this.isPagingRemoved=!0}},SetPagingInfo:function(a){var b=this.tbl.rows,c=this.pagingTgtId?n.id(this.pagingTgtId):this.mDiv,d=n.id(this.prfxPgSpan+this.id);if(a&&a.length>0)this.validRowsIndex=a;else{this.validRowsIndex=[];for(var e=this.refRow;e0)if(c.style.visibility="visible",this.pageSelectorType===this.fltTypeSlc)for(var h=0;h=this.startPagingRow&&c>d?("true"!==e.getAttribute("validRow")&&e.getAttribute("validRow")||(e.style.display=""),this.alternateBgs&&this.Cpt.alternateRows(this.validRowsIndex[d],d)):(e.style.display="none",this.alternateBgs&&this.Cpt.alternateRows.removeRowBg(this.validRowsIndex[d]))}this.nbVisibleRows=this.validRowsIndex.length,this.isStartBgAlternate=!1,this.ApplyGridProps()},SetPage:function(a){if(this.hasGrid&&this.paging){var b=this.pagingBtnEvents,c=typeof a;if("string"===c)switch(o.lower(a)){case"next":b.next();break;case"previous":b.prev();break;case"last":b.last();break;case"first":b.first();break;default:b.next()}"number"===c&&this.ChangePage(a-1)}},SetResultsPerPage:function(){if((this.hasGrid||this.isFirstLoad)&&!this.resultsPerPageSlc&&this.resultsPerPage){if(!this.Evt._OnSlcResultsChange){var a=this;this.Evt._OnSlcResultsChange=function(){a.ChangeResultsPerPage(),this.blur(),this.parentNode&&s.isIE()&&this.parentNode.focus()}}var b=n.create(this.fltTypeSlc,["id",this.prfxSlcResults+this.id]);b.className=this.resultsSlcCssClass;var c=this.resultsPerPage[0],d=this.resultsPerPage[1],e=n.create("span",["id",this.prfxSlcResultsTxt+this.id]);e.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||this.SetTopDiv();var f=this.resultsPerPageTgtId?n.id(this.resultsPerPageTgtId):this.rDiv;e.appendChild(n.text(c)),f.appendChild(e),f.appendChild(b),this.resultsPerPageSlc=n.id(this.prfxSlcResults+this.id);for(var g=0;g<, <=, >, >=, =, *, !, {, }, ||,&&, [empty], [nonempty], rgx:
These operators are described here:
http://tablefilter.free.fr/#operators
',this.helpInstrHtml=a.help_instructions_html||null,this.helpInstrBtnText=a.help_instructions_btn_text||"?",this.helpInstrBtnHtml=a.help_instructions_btn_html||null,this.helpInstrBtnCssClass=a.help_instructions_btn_css_class||"helpBtn",this.helpInstrContCssClass=a.help_instructions_container_css_class||"helpCont",this.helpInstrBtnEl=null,this.helpInstrContEl=null,this.helpInstrDefaultHtml='

HTML Table Filter Generator v. '+this.version+'

http://tablefilter.free.fr
©2009-'+this.year+' Max Guglielmi.
";var b=n.create("span",["id",this.prfxHelpSpan+this.id]),c=n.create("div",["id",this.prfxHelpDiv+this.id]);this.helpInstrTgtId||this.SetTopDiv();var d=this.helpInstrTgtId?n.id(this.helpInstrTgtId):this.rDiv;d.appendChild(b);var e=this.helpInstrContTgtId?n.id(this.helpInstrContTgtId):b;if(this.helpInstrBtnHtml){b.innerHTML=this.helpInstrBtnHtml;var f=b.firstChild;f.onclick=this.Evt._OnHelpBtnClick,e.appendChild(c)}else{e.appendChild(c);var g=n.create("a",["href","javascript:void(0);"]);g.className=this.helpInstrBtnCssClass,g.appendChild(n.text(this.helpInstrBtnText)),b.appendChild(g),g.onclick=this.Evt._OnHelpBtnClick}this.helpInstrHtml?(this.helpInstrContTgtId&&e.appendChild(c),c.innerHTML=this.helpInstrHtml,this.helpInstrContTgtId||(c.className=this.helpInstrContCssClass,c.ondblclick=this.Evt._OnHelpBtnClick)):(c.innerHTML=this.helpInstrText,c.className=this.helpInstrContCssClass,c.ondblclick=this.Evt._OnHelpBtnClick),c.innerHTML+=this.helpInstrDefaultHtml,this.helpInstrContEl=c,this.helpInstrBtnEl=b}},RemoveHelpInstructions:function(){this.helpInstrBtnEl&&(this.helpInstrBtnEl.parentNode.removeChild(this.helpInstrBtnEl),this.helpInstrBtnEl=null,this.helpInstrContEl&&(this.helpInstrContEl.parentNode.removeChild(this.helpInstrContEl),this.helpInstrContEl=null))},_ToggleHelp:function(){if(this.helpInstrContEl){var a=this.helpInstrContEl.style.display;if(""===a||"none"===a){this.helpInstrContEl.style.display="block";var b=n.position(this.helpInstrBtnEl).left;this.helpInstrContTgtId||(this.helpInstrContEl.style.left=b-this.helpInstrContEl.clientWidth+25+"px")}else this.helpInstrContEl.style.display="none"}},ChangePage:function(a){this.EvtManager(this.Evt.name.changepage,{pgIndex:a})},_ChangePage:function(a){this.paging&&(a||(a=this.pageSelectorType===this.fltTypeSlc?this.pagingSlc.options.selectedIndex:this.pagingSlc.value-1),a>=0&&a<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,a),this.currentPageNb=parseInt(a,10)+1,this.pageSelectorType===this.fltTypeSlc?this.pagingSlc.options[a].selected=!0:this.pagingSlc.value=this.currentPageNb,this.rememberPageNb&&this.RememberPageNb(this.pgNbCookie),this.startPagingRow=this.pageSelectorType===this.fltTypeSlc?this.pagingSlc.value:a*this.pagingLength,this.GroupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,a)))},ChangeResultsPerPage:function(){this.EvtManager(this.Evt.name.changeresultsperpage)},_ChangeResultsPerPage:function(){if(this.paging){var a=this.resultsPerPageSlc,b=this.pageSelectorType==this.fltTypeSlc?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(a.options[a.selectedIndex].value,10),this.startPagingRow=this.pagingLength*b,!isNaN(this.pagingLength)){if(this.startPagingRow>=this.nbFilterableRows&&(this.startPagingRow=this.nbFilterableRows-this.pagingLength),this.SetPagingInfo(),this.pageSelectorType===this.fltTypeSlc){var c=this.pagingSlc.options.length-1<=b?this.pagingSlc.options.length-1:b; +this.pagingSlc.options[c].selected=!0}this.rememberPageLen&&this.RememberPageLength(this.pgLenCookie)}}},ResetPage:function(){this.EvtManager(this.Evt.name.resetpage)},_ResetPage:function(a){var b=p.read(a);""!==b&&this.ChangePage(b-1)},ResetPageLength:function(){this.EvtManager(this.Evt.name.resetpagelength)},_ResetPageLength:function(a){if(this.paging){var b=p.read(a);""!==b&&(this.resultsPerPageSlc.options[b].selected=!0,this.ChangeResultsPerPage())}},AddPaging:function(a){this.hasGrid&&!this.paging&&(this.paging=!0,this.isPagingRemoved=!0,this.SetPaging(),this.ResetValues(),a&&this.Filter())},PopulateSelect:function(a,b,c){this.EvtManager(this.Evt.name.populateselect,{slcIndex:a,slcExternal:b,slcId:c})},_PopulateSelect:function(a,b,f,g){function h(){if("innerhtml"===t)v+='";else{var a=n.createOpt(m.enableSlcResetFilter?m.displayAllText:"","");if(m.enableSlcResetFilter||(a.style.display="none"),l.appendChild(a),m.enableEmptyOption){var b=n.createOpt(m.emptyText,m.emOperator);l.appendChild(b)}if(m.enableNonEmptyOption){var c=n.createOpt(m.nonEmptyText,m.nmOperator);l.appendChild(c)}}}function i(){var c=l.value;l.innerHTML="",h();for(var d=0;d"+f+""}else{var j;j=m.fillSlcOnDemand&&c==u[d]&&m["col"+a]===m.fltTypeSlc?n.createOpt(f,e,!0):m["col"+a]!=m.fltTypeMulti?n.createOpt(f,e," "!==y[a]&&e==y[a]?!0:!1):n.createOpt(f,e,r.has(z,o.matchCase(u[d],m.matchCase),m.matchCase)||-1!==z.toString().indexOf(e)?!0:!1),g&&(j.disabled=!0),l.appendChild(j)}}"innerhtml"===t&&(l.innerHTML+=v),l.setAttribute("filled","1")}f=void 0===f?!1:f;var j=this.fltIds[a];if((n.id(j)||f)&&(n.id(g)||!f)){var k,l=n.id(f?g:j),m=this,q=this.tbl.rows,s=this.matchCase,t=o.lower(this.slcFillingMethod),u=[],v="",w=this.hasCustomSlcOptions&&r.has(this.customSlcOptions.cols,a),x=[];b&&this.activeFilterId&&(k=this.activeFilterId.split("_")[0],k=k.split(this.prfxFlt)[1]);var y=[],z=[];this.rememberGridValues&&(y=p.valueToArray(this.fltsValuesCookie,this.separator),y&&!o.isEmpty(y.toString())&&(w?z.push(y[a]):z=y[a].split(" "+m.orOperator+" ")));var A=null,B=null;b&&this.disableExcludedOptions&&(A=[],B=[]);for(var C=this.refRow;CF;F++)if(a===F&&(!b||b&&this.disableExcludedOptions)||a==F&&b&&(""===q[C].style.display&&!this.paging||this.paging&&(!this.validRowsIndex||this.validRowsIndex&&r.has(this.validRowsIndex,C))&&(void 0===k||k==a||k!=a&&r.has(this.validRowsIndex,C)))){var G=this.GetCellData(F,D[F]),H=o.matchCase(G,s);if(r.has(u,H,s)||u.push(G),b&&this.disableExcludedOptions){var I=B[F];I||(I=this.GetFilteredDataCol(F)),!r.has(I,H,s)&&!r.has(A,H,s)&&!this.isFirstLoad&&A.push(G)}}}if(w){var J=this.__getCustomValues(a);u=J[0],x=J[1]}if(this.sortSlc&&!w&&(s?(u.sort(),A&&A.sort()):(u.sort(e),A&&A.sort(e))),this.sortNumAsc&&r.has(this.sortNumAsc,a))try{u.sort(c),A&&A.sort(c),w&&x.sort(c)}catch(K){u.sort(),A&&A.sort(),w&&x.sort()}if(this.sortNumDesc&&r.has(this.sortNumDesc,a))try{u.sort(d),A&&A.sort(d),w&&x.sort(d)}catch(K){u.sort(),A&&A.sort(),w&&x.sort()}i()}},__deferMultipleSelection:function(a,b,c){if("select"===o.lower(a.nodeName)){var d=void 0===c?!1:c,e=this;k.setTimeout(function(){a.options[0].selected=!1,a.options[b].selected=""===a.options[b].value?!1:!0,d&&e.Filter()},.1)}},__getCustomValues:function(a){if(a){var b=this.hasCustomSlcOptions&&r.has(this.customSlcOptions.cols,a);if(b){for(var c=[],d=[],e=r.indexByValue(this.customSlcOptions.cols,a),f=this.customSlcOptions.values[e],g=this.customSlcOptions.texts[e],h=this.customSlcOptions.sorts[e],i=0;i0&&(m.hasCustomSlcOptions&&r.has(m.customSlcOptions.cols,a)?f.push(h):f=h.split(" "+m.orOperator+" "));for(var i=0;iB;B++)if(a===B&&(!this.refreshFilters||this.refreshFilters&&this.disableExcludedOptions)||a===B&&this.refreshFilters&&(""===q[y].style.display&&!this.paging||this.paging&&(!l||l===a||l!=a&&r.has(this.validRowsIndex,y)))){var C=this.GetCellData(B,z[B]),D=o.matchCase(C,this.matchCase);r.has(t,D,this.matchCase)||t.push(C);var E=x[B];this.refreshFilters&&this.disableExcludedOptions&&(E||(x[B]=this.GetFilteredDataCol(B)),!r.has(E,D,this.matchCase)&&!r.has(w,D,this.matchCase)&&!this.isFirstLoad&&w.push(C))}}if(u){var F=this.__getCustomValues(a);t=F[0],v=F[1]}if(this.sortSlc&&!u&&(this.matchCase?(t.sort(),w&&w.sort()):(t.sort(e),w&&w.sort(e))),this.sortNumAsc&&r.has(this.sortNumAsc,a))try{t.sort(c),w&&w.sort(c),u&&v.sort(c)}catch(G){t.sort(),w&&w.sort(),u&&v.sort()}if(this.sortNumDesc&&r.has(this.sortNumDesc,a))try{t.sort(d),w&&w.sort(d),u&&v.sort(d)}catch(G){t.sort(),w&&w.sort(),u&&v.sort()}if(h(this.separator),this.fillSlcOnDemand&&(j.innerHTML=""),j.appendChild(k),j.setAttribute("filled","1"),m.rememberGridValues&&s.isIE()){var H=k.getAttribute("indexes");if(H)for(var I=H.split(","),J=0;J':null);var b=n.create("span",["id",this.prfxResetSpan+this.id]);this.btnResetTgtId||this.SetTopDiv();var c=this.btnResetTgtId?n.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=n.create("a",["href","javascript:void(0);"]);e.className=this.btnResetCssClass,e.appendChild(n.text(this.btnResetText)),b.appendChild(e),e.onclick=this.Evt._Clear}this.btnResetEl=n.id(this.prfxResetSpan+this.id).firstChild}},RemoveResetBtn:function(){if(this.hasGrid&&this.btnResetEl){var a=n.id(this.prfxResetSpan+this.id);a&&a.parentNode.removeChild(a),this.btnResetEl=null}},SetStatusBar:function(){if(this.hasGrid||this.isFirstLoad){var a=this.fObj;this.statusBarTgtId=a.status_bar_target_id||null,this.statusBarDiv=null,this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarText=a.status_bar_text||"",this.statusBarCssClass=a.status_bar_css_class||"status",this.statusBarCloseDelay=250;var b=n.create("div",["id",this.prfxStatus+this.id]);b.className=this.statusBarCssClass;var c=n.create("span",["id",this.prfxStatusSpan+this.id]),d=n.create("span",["id",this.prfxStatusTxt+this.id]);d.appendChild(n.text(this.statusBarText)),this.onBeforeShowMsg=q.isFn(a.on_before_show_msg)?a.on_before_show_msg:null,this.onAfterShowMsg=q.isFn(a.on_after_show_msg)?a.on_after_show_msg:null,this.statusBarTgtId||this.SetTopDiv();var e=this.statusBarTgtId?n.id(this.statusBarTgtId):this.lDiv;this.statusBarDiv&&s.isIE()&&(this.statusBarDiv.outerHTML=""),this.statusBarTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.statusBarDiv=n.id(this.prfxStatus+this.id),this.statusBarSpan=n.id(this.prfxStatusSpan+this.id),this.statusBarSpanText=n.id(this.prfxStatusTxt+this.id)}},RemoveStatusBar:function(){(this.hasGrid||this.statusBarDiv)&&(this.statusBarDiv.innerHTML="",this.statusBarDiv.parentNode.removeChild(this.statusBarDiv),this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarDiv=null)},StatusMsg:function(a){a||this.StatusMsg(""),this.status&&this.WinStatusMsg(a),this.statusBar&&this.StatusBarMsg(a)},WinStatusMsg:function(a){this.status&&(this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this,a),k.status=a,this.onAfterShowMsg&&this.onAfterShowMsg.call(null,this,a))},StatusBarMsg:function(a){function b(){c.statusBarSpan.innerHTML=a,c.onAfterShowMsg&&c.onAfterShowMsg.call(null,c,a)}if(this.statusBar&&this.statusBarSpan){this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this,a);var c=this,d=""===a?this.statusBarCloseDelay:1;k.setTimeout(b,d)}},SetRowsCounter:function(){if((this.hasGrid||this.isFirstLoad)&&!this.rowsCounterSpan){var a=this.fObj;this.rowsCounterTgtId=a.rows_counter_target_id||null,this.rowsCounterDiv=null,this.rowsCounterSpan=null,this.rowsCounterText=a.rows_counter_text||"Rows: ",this.fromToTextSeparator=a.from_to_text_separator||"-",this.overText=a.over_text||" / ",this.totRowsCssClass=a.tot_rows_css_class||"tot",this.onBeforeRefreshCounter=q.isFn(a.on_before_refresh_counter)?a.on_before_refresh_counter:null,this.onAfterRefreshCounter=q.isFn(a.on_after_refresh_counter)?a.on_after_refresh_counter:null;var b=n.create("div",["id",this.prfxCounter+this.id]);b.className=this.totRowsCssClass;var c=n.create("span",["id",this.prfxTotRows+this.id]),d=n.create("span",["id",this.prfxTotRowsTxt+this.id]);d.appendChild(n.text(this.rowsCounterText)),this.rowsCounterTgtId||this.SetTopDiv();var e=this.rowsCounterTgtId?n.id(this.rowsCounterTgtId):this.lDiv;this.rowsCounterDiv&&s.isIE()&&(this.rowsCounterDiv.outerHTML=""),this.rowsCounterTgtId?(e.appendChild(d),e.appendChild(c)):(b.appendChild(d),b.appendChild(c),e.appendChild(b)),this.rowsCounterDiv=n.id(this.prfxCounter+this.id),this.rowsCounterSpan=n.id(this.prfxTotRows+this.id),this.RefreshNbRows()}},RemoveRowsCounter:function(){this.hasGrid&&this.rowsCounterSpan&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?s.isIE()?this.rowsCounterDiv.outerHTML="":this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):n.id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null)},RefreshNbRows:function(a){if(this.rowsCounterSpan){this.onBeforeRefreshCounter&&this.onBeforeRefreshCounter.call(null,this,this.rowsCounterSpan);var b;if(this.paging){var c=parseInt(this.startPagingRow,10)+(this.nbVisibleRows>0?1:0),d=c+this.pagingLength-1<=this.nbVisibleRows?c+this.pagingLength-1:this.nbVisibleRows;b=c+this.fromToTextSeparator+d+this.overText+this.nbVisibleRows}else b=a&&""!==a?a:this.nbFilterableRows-this.nbHiddenRows-(this.hasVisibleRows?this.visibleRows.length:0);this.rowsCounterSpan.innerHTML=b,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,this,this.rowsCounterSpan,b)}},SetWatermark:function(a){if(this.fltGrid||""!==this.inpWatermark){a=void 0===a?!0:a;for(var b=0;b0&&this.tbl.removeChild(z[0]),this.headTbl.style.width=this.tbl.style.width,this.headTbl.style.tableLayout="fixed",this.tbl.style.tableLayout="fixed",this.headTbl.cellPadding=this.tbl.cellPadding,this.headTbl.cellSpacing=this.tbl.cellSpacing,this.headTblCont.style.width=this.tblCont.clientWidth+"px",this.SetColWidths(),this.tbl.style.width="",s.isIE()&&(this.headTbl.style.width="");var A=this;if(this.tblCont.onscroll=function(){A.headTblCont.scrollLeft=this.scrollLeft;var a=this;if(!A.isPointerXOverwritten)try{l.Evt.pointerX=function(b){b=b||k.event;var c=tf_StandardBody().scrollLeft+a.scrollLeft;return b.pageX+a.scrollLeft||b.clientX+c},A.isPointerXOverwritten=!0}catch(b){A.isPointerXOverwritten=!1}},a.sort!==!1&&(this.sort=!0,this.sortConfig.asyncSort=!0,this.sortConfig.triggerIds=j),this.gridEnableColResizer&&(this.hasExtensions?this.__containsStr("colsresizer",o.lower(this.extensions.src.toString()))||(this.extensions.name.push("ColumnsResizer_"+this.id),this.extensions.src.push(this.gridColResizerPath),this.extensions.description.push("Columns Resizing"),this.extensions.initialize.push(function(a){a.SetColsResizer("ColumnsResizer_"+a.id)})):(this.extensions={name:["ColumnsResizer_"+this.id],src:[this.gridColResizerPath],description:["Columns Resizing"],initialize:[function(a){a.SetColsResizer("ColumnsResizer_"+a.id)}]},this.hasExtensions=!0)),a.col_resizer_cols_headers_table=this.headTbl.getAttribute("id"),a.col_resizer_cols_headers_index=this.gridHeadRowIndex,a.col_resizer_width_adjustment=0,a.col_enable_text_ellipsis=!1,A.tblHasColTag=n.tag(A.tbl,"col").length>0?!0:!1,!s.isIE()){var B=function(a){if(a){for(var b=a.nbCells-1;b>=0;b--){var c=n.create("col",["id",a.id+"_col_"+b]);a.tbl.firstChild.parentNode.insertBefore(c,a.tbl.firstChild),c.style.width=a.colWidth[b],a.gridColElms[b]=c}a.tblHasColTag=!0}};if(A.tblHasColTag)for(var C=n.tag(A.tbl,"col"),D=0;D0?F[0].insertRow(0):A.tbl.insertRow(0),E.style.height="0px";for(var G=0;G0?F[0].moveRow(a.leadColWidthsRow.rowIndex,0):a.tbl.moveRow(a.leadColWidthsRow.rowIndex,0)}J&&J.call(null,a,b)}}var K=q.isFn(a.on_after_col_resized)?a.on_after_col_resized:null;a.on_after_col_resized=function(a,b){if(b){var c=a.crWColsRow.cells[b].style.width,d=a.gridColElms[b];d.style.width=c;var e=a.crWColsRow.cells[b].clientWidth,f=a.crWRowDataTbl.cells[b].clientWidth;s.isIE()&&(a.tbl.style.width=a.headTbl.clientWidth+"px"),e!=f&&!s.isIE()&&(a.headTbl.style.width=a.tbl.clientWidth+"px"),K&&K.call(null,a,b)}},this.tbl.clientWidth!==this.headTbl.clientWidth&&(this.tbl.style.width=this.headTbl.clientWidth+"px")}},RemoveGridLayout:function(){if(this.gridLayout){var a=this.tbl.parentNode.removeChild(this.tbl);this.tblMainCont.parentNode.insertBefore(a,this.tblMainCont),this.tblMainCont.parentNode.removeChild(this.tblMainCont),this.tblMainCont=null,this.headTblCont=null,this.headTbl=null,this.tblCont=null,this.tbl.outerHTML=this.sourceTblHtml,this.tbl=n.id(this.id)}},SetPopupFilterIcons:function(){function a(a){var b=a||k.event,d=parseInt(this.getAttribute("ci"),10);if(c.CloseAllPopupFilters(d),c.TogglePopupFilter(d),c.popUpFltAdjustToContainer){var e=c.popUpFltElms[d],f=c.GetHeaderElement(d),g=.95*f.clientWidth;if(s.isIE()){var h=n.position(f).left;e.style.left=h+"px"}e.style.width=parseInt(g,10)+"px"}b.cancel(b),b.stop(b)}if(this.popUpFilters){this.isExternalFlt=!0;var b=this.fObj;this.popUpImgFlt=b.popup_filters_image||this.themesPath+"icn_filter.gif",this.popUpImgFltActive=b.popup_filters_image_active||this.themesPath+"icn_filterActive.gif",this.popUpImgFltHtml=b.popup_filters_image_html||'Column filter',this.popUpDivCssClass=b.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=q.isFn(b.on_before_popup_filter_open)?b.on_before_popup_filter_open:null,this.onAfterPopUpOpen=q.isFn(b.on_after_popup_filter_open)?b.on_after_popup_filter_open:null,this.onBeforePopUpClose=q.isFn(b.on_before_popup_filter_close)?b.on_before_popup_filter_close:null,this.onAfterPopUpClose=q.isFn(b.on_after_popup_filter_close)?b.on_after_popup_filter_close:null,this.externalFltTgtIds=[],this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0;for(var c=this,d=0;d= offsetParent.offsetHeight ? 0 - parentNode.parentNode.offsetHeight + offsetParent.offsetHeight + offsetParent.scrollTop : 0);"}}}},RemoveFixedHeaders:function(){if(this.hasGrid&&this.fixedHeaders)if(this.contDiv){this.contDiv.parentNode.insertBefore(this.tbl,this.contDiv),this.contDiv.parentNode.removeChild(this.contDiv),this.contDiv=null;var a=n.tag(this.tbl,"thead");if(0===a.length)return;var b=n.tag(a[0],"tr");if(0===b.length)return;for(var c=0;cn):P?(r=u(a.replace(j,""),J),e=r>=n):R?(r=u(a.replace(k,""),J),e=n>=r):Q?(r=u(a.replace(m,""),J),e=n>r):S?(r=u(a.replace(p,""),J),e=n.toString()!=r.toString()):T?(r=u(a.replace(s,""),J),e=n.toString()==r.toString()):q.test(a)?e=g.__containsStr(a.replace(q,""),b,null,!1):t(a,J)?(r=u(a,J),e=n.toString()==r.toString()):L?e=o.isEmpty(b):M&&(e=!o.isEmpty(b));else if(g.hasColNbFormat&&g.colNbFormat[c]?(h=f(b,g.colNbFormat[c]),i=g.colNbFormat[c]):","===g.thousandsSeparator&&"."===g.decimalSeparator?(h=f(b,"us"),i="us"):(h=f(b,"eu"),i="eu"),C)e=h<=f(a.replace(j,""),i);else if(E)e=h>=f(a.replace(k,""),i);else if(B)e=hf(a.replace(m,""),i);else if(F)e=g.__containsStr(a.replace(p,""),b)?!1:!0;else if(H)e=g.__containsStr(a.replace(q,""),b,null,!1);else if(G)e=g.__containsStr(a.replace(s,""),b,null,!0);else if(I)e=0===b.indexOf(a.replace(v,""))?!0:!1;else if(K){var U=a.replace(w,"");e=b.lastIndexOf(U,b.length-1)===b.length-1-(U.length-1)&&b.lastIndexOf(U,b.length-1)>-1?!0:!1}else if(L)e=o.isEmpty(b);else if(M)e=!o.isEmpty(b);else if(N)try{var V=a.replace(A,""),W=new RegExp(V);e=W.test(b)}catch(X){e=!1}else{var Y=d["col_"+c];e=g.__containsStr(a,b,Y?Y:this.fltTypeInp)}return e}if(this.fltGrid&&(this.hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this),""!==this.inpWatermark&&this.SetWatermark(!1);var c=this.tbl.rows,d=this.fObj||{},e=0;this.validRowsIndex=[];var g=this;this.highlightKeywords&&this.UnhighlightAll(),this.popUpFilters&&this.SetAllPopupFiltersIcon(),this.markActiveColumns&&this.ClearActiveColumns(),this.searchArgs=this.GetFiltersValue();for(var h,i,j=new RegExp(this.leOperator),k=new RegExp(this.geOperator),l=new RegExp(this.lwOperator),m=new RegExp(this.grOperator),p=new RegExp(this.dfOperator),q=new RegExp(o.rgxEsc(this.lkOperator)),s=new RegExp(this.eqOperator),v=new RegExp(this.stOperator),w=new RegExp(this.enOperator),x=new RegExp(this.anOperator),y=(new RegExp(this.curExp),this.emOperator),z=this.nmOperator,A=new RegExp(o.rgxEsc(this.rgxOperator)),B=this.refRow;BH;H++){var I=this.searchArgs[this.singleSearchFlt?0:H],J=this.hasColDateType?this.colDateType[H]:this.defaultDateType;if(""!==I){var K=o.matchCase(this.GetCellData(H,C[H]),this.matchCase),L=I.split(this.orOperator),M=L.length>1?!0:!1,N=I.split(this.anOperator),O=N.length>1?!0:!1;if(M||O){for(var P,Q=!1,R=M?L:N,S=0;Sk;k++)if(k===a&&""===d[g].style.display){var l=o.lower(this.GetCellData(k,i[k])),m=this.colNbFormat?this.colNbFormat[a]:null,n=b?f(l,m):l;e.push(n)}}return e}},GetFilterValue:function(a){if(this.fltGrid){var b,c=this.GetFilterElement(a);if(!c)return"";var d=this.fltCol[a];if(d!==this.fltTypeMulti&&d!==this.fltTypeCheckList)b=c.value;else if(d===this.fltTypeMulti){b="";for(var e=0;e + + + + + + + + + @@ -68,6 +77,9 @@ diff --git a/test/test-alternate-rows.js b/test/test-alternate-rows.js index 116e230e..58b8e90f 100644 --- a/test/test-alternate-rows.js +++ b/test/test-alternate-rows.js @@ -10,8 +10,8 @@ requirejs(['test-config', '../src/core'], function(config, TableFilter){ }); tf.init(); - module("Sanity checks"); - test("AlternateRows component", function() { + module('Sanity checks'); + test('AlternateRows component', function() { deepEqual(tf.Cpt.alternateRows instanceof AlternateRows, true, 'AlternateRows constructor'); notEqual(tf.Cpt.alternateRows, null, 'AlternateRows instanciated'); }); diff --git a/test/test-col-ops.html b/test/test-col-ops.html new file mode 100644 index 00000000..55516928 --- /dev/null +++ b/test/test-col-ops.html @@ -0,0 +1,91 @@ + + + + + TableFilter column operations tests + + + + + + +
Tot:
From
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tot:
FromDestinationRoad Distance (km)By Air (hrs)By Rail (hrs)
SydneyAdelaide14121.425.3
SydneyBrisbane9821.516
SydneyCanberra286.64.3
SydneyMelbourne8721.110.5
AdelaidePerth27813.138
AdelaideAlice Springs1533220.25
AdelaideBrisbane20452.1540
+ + + +
+
+ + diff --git a/test/test-col-ops.js b/test/test-col-ops.js new file mode 100644 index 00000000..a0c2d26f --- /dev/null +++ b/test/test-col-ops.js @@ -0,0 +1,33 @@ +requirejs(['test-config', '../src/core'], function(config, TableFilter){ + + QUnit.start(); + + var dom = require('dom'), + ColOps = require('modules/colOps'); + + var table = document.getElementById('demo'); + var totRowIndex = table.getElementsByTagName('tr').length; + + var tf = new TableFilter('demo', { + rows_always_visible: [totRowIndex], + col_operation: { + id: ['sum1', 'sum2'], + col: [2, 3], + operation: ['sum', 'mean'], + write_method: ['innerhtml', 'innerhtml'], + exclude_row: [totRowIndex], + decimal_precision: [0, 2], + tot_row_index: [totRowIndex, totRowIndex] + } + }); + tf.init(); + + module('Sanity checks'); + test('Column Operations component', function() { + deepEqual(tf.Cpt.colOps instanceof ColOps, true, 'ColOps constructor'); + notEqual(tf.Cpt.colOps, null, 'ColOps instanciated'); + equal(dom.id('sum1').innerHTML, 9911, 'Sum result'); + equal(dom.id('sum2').innerHTML, 1.69, 'Mean result'); + }); + +}); \ No newline at end of file diff --git a/test/test-loader.js b/test/test-loader.js index aa9134fd..bafdab2d 100644 --- a/test/test-loader.js +++ b/test/test-loader.js @@ -10,8 +10,8 @@ requirejs(['test-config', '../src/core'], function(config, TableFilter){ }); tf.init(); - module("Sanity checks"); - test("Loader component", function() { + module('Sanity checks'); + test('Loader component', function() { deepEqual(tf.Cpt.loader instanceof Loader, true, 'Loader constructor'); notEqual(tf.Cpt.loader, null, 'Loader instanciated'); notEqual(dom.id(tf.prfxLoader+tf.id), null, 'Loader DOM container');