/*!@license
* Infragistics.Web.ClientUI Tree Grid localization resources 15.2.20152.1027
*
* Copyright (c) 2011-2015 Infragistics Inc.
*
* http://www.infragistics.com/
*
*/
(function($){$.ig=$.ig||{};if(!$.ig.TreeGrid){$.ig.TreeGrid={};$.extend($.ig.TreeGrid,{locale:{fixedVirtualizationNotSupported:"Row Virtualization requires a different virtualizationMode setting. The virtualizationMode should be set to 'continuous'."}});$.ig.TreeGridPaging=$.ig.TreeGridPaging||{};$.extend($.ig.TreeGridPaging,{locale:{contextRowLoadingText:"Loading...",contextRowRootText:"Root",columnFixingWithContextRowNotSupported:"Column Fixing requires a different contextRowMode setting. contextRowMode should be set to 'none' in order to enable column fixing."}});$.ig.TreeGridFiltering=$.ig.TreeGridFiltering||{};$.extend($.ig.TreeGridFiltering,{locale:{filterSummaryInPagerTemplate:"${currentPageMatches} of ${totalMatches} matching records"}});$.ig.TreeGridRowSelectors=$.ig.TreeGridRowSelectors||{};$.extend($.ig.TreeGridRowSelectors,{locale:{multipleSelectionWithTriStateCheckboxesNotSupported:"Multiple selection requires a different checkBoxMode setting. checkBoxMode should be set to biState in order to enable multiple selection."}})}})(jQuery);/*!@license
 * Infragistics.Web.ClientUI Tree Grid 15.2.20152.1027
 *
 * Copyright (c) 2011-2015 Infragistics Inc.
 *
 * http://www.infragistics.com/
 *
 * Depends on:
 *	jquery-1.7.js
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	infragistics.dataSource.js
 *	infragistics.ui.shared.js
 *	infragistics.util.js
 *	infragistics.ui.grid.framework.js
 */
(function($){var _aNull=function(val){return val===null||val===undefined};$.widget("ui.igTreeGrid",$.ui.igGrid,{css:{containerClasses:"ui-igtreegrid",expandCellExpanded:"ui-icon ui-igtreegrid-expansion-indicator ui-icon-minus",expandCellCollapsed:"ui-icon ui-igtreegrid-expansion-indicator ui-icon-plus",dataSkipCell:"ui-igtreegrid-non-data-column",expandColumn:"ui-igtreegrid-expansion-indicator-cell",dataColumnExpandContainer:"ui-igtreegrid-expansion-indicator-container",expandColumnContainer:"ui-igtreegrid-expansion-column-container",expandContainer:"ui-igtreegrid-expandcell",expandHeaderCell:"ui-igtreegrid-expansion-indicator-header-cell ui-iggrid-header ui-widget-header",rowLevel:"ui-igtreegrid-rowlevel"},options:{indentation:30,initialIndentationLevel:-1,showExpansionIndicator:true,expandTooltipText:$.ig.Grid.locale.expandTooltip,collapseTooltipText:$.ig.Grid.locale.collapseTooltip,foreignKey:null,initialExpandDepth:-1,foreignKeyRootValue:-1,renderExpansionIndicatorColumn:false,renderFirstDataCellFunction:null,childDataKey:"childData",renderExpansionCellFunction:null,enableRemoteLoadOnDemand:false,dataSourceSettings:{propertyExpanded:"__ig_options.expanded",propertyDataLevel:"__ig_options.dataLevel",initialFlatDataView:false}},events:{rowExpanding:"rowExpanding",rowExpanded:"rowExpanded",rowCollapsing:"rowCollapsing",rowCollapsed:"rowCollapsed"},_isHierarchicalDataSource:true,_create:function(){this._checkForUnsoppertedScenarios();var func=this.options.renderFirstDataCellFunction;if(func&&$.type(func)!=="function"){if(window[func]&&typeof window[func]==="function"){func=window[func]}}if(func&&$.type(func)==="function"){this._renderFirstDataCellHandler=func}else{this._renderFirstDataCellHandler=$.proxy(this._renderFirstDataCell,this)}func=this.options.renderExpansionCellFunction;if(func&&$.type(func)!=="function"){if(window[func]&&typeof window[func]==="function"){func=window[func]}}if(func&&$.type(func)==="function"){this._renderExpandCellHandler=func}else{this._renderExpandCellHandler=$.proxy(this._renderExpandCell,this)}this._overrideFunction("bind");this._overrideFunction("unbind");this._overrideFunction("on");this._overrideFunction("off");this._attachEvents();this.element.data($.ui.igGrid.prototype.widgetName,this.element.data($.ui.igTreeGrid.prototype.widgetName));$.ui.igGrid.prototype._create.apply(this,arguments);this.element.attr("role","treegrid")},_checkForUnsoppertedScenarios:function(){if(this._rowVirtualizationEnabled()&&this.options.virtualizationMode==="fixed"){throw new Error($.ig.TreeGrid.locale.fixedVirtualizationNotSupported)}},_wrapElementDiv:function(){$.ui.igGrid.prototype._wrapElementDiv.apply(this,arguments);this.element.data($.ui.igTreeGrid.prototype.widgetName,this);this._overrideFunction("bind");this._overrideFunction("unbind")},_removeOverridenFunction:function(){if(!this._functionsOverriden){return}var f,funcs=this._functionsOverriden;for(f in funcs){if(funcs.hasOwnProperty(f)){this.element[f]=funcs[f]}}delete this._functionsOverriden},_overrideFunction:function(functionName){var e=this.element,func;if($.type(e[functionName])!=="function"){return}if(!this._functionsOverriden){this._functionsOverriden={}}func=e[functionName];if(!this._functionsOverriden[functionName]){this._functionsOverriden[functionName]=func}e[functionName]=function(name,arg1,arg2){var strIgGrid="iggrid",argsLen=arguments.length,evtName,oEvtName;if($.type(name)==="string"&&name.indexOf(strIgGrid)===0&&name.length>strIgGrid.length&&(argsLen===2||argsLen===3)){name="igtreegrid"+name.substr(strIgGrid.length);if(argsLen===2){return func.call(e,name,arg1)}return func.call(e,name,arg1,arg2)}else if($.type(name)==="object"){for(evtName in name){if(name.hasOwnProperty(evtName)){if($.type(evtName)==="string"&&evtName.indexOf(strIgGrid)===0){oEvtName=evtName;evtName="igtreegrid"+evtName.substr(strIgGrid.length);name[evtName]=name[oEvtName]}}}}return func.apply(e,arguments)}},dataBind:function(){if(!this._initialized){this._renderExtraHeaderCellHandler=$.proxy(this._renderExtraHeaderCells,this);this._renderExtraFooterCellHandler=$.proxy(this._renderExtraFooterCells,this);this._headerInitCallbacks.push({type:"TreeGrid",func:this._renderExtraHeaderCellHandler});this._footerInitCallbacks.push({type:"TreeGrid",func:this._renderExtraFooterCellHandler})}$.ui.igGrid.prototype.dataBind.apply(this,arguments)},_generateDataSourceOptions:function(){var o=this.options,ds=o.dataSource,instanceOfDs,tds,opts=$.ui.igGrid.prototype._generateDataSourceOptions.apply(this,arguments);opts.treeDS={childDataKey:o.childDataKey,initialExpandDepth:o.initialExpandDepth,foreignKey:o.foreignKey,key:o.primaryKey,foreignKeyRootValue:o.foreignKeyRootValue};opts.treeDS=$.extend(opts.treeDS,o.dataSourceSettings);opts.treeDS.enableRemoteLoadOnDemand=o.enableRemoteLoadOnDemand;opts.treeDS.dataSourceUrl=o.dataSourceUrl;if(o.dataSourceUrl===null&&typeof ds==="string"){opts.treeDS.dataSourceUrl=ds}instanceOfDs=ds&&typeof ds._xmlToArray==="function"&&typeof ds._encodePkParams==="function";if(instanceOfDs){if(ds._isHierarchicalDataSource!==undefined){ds.settings.treeDS=ds.settings.treeDS||{};ds.settings.treeDS=$.extend(ds.settings.treeDS,opts.treeDS)}else{if($.type(ds.settings.dataSource)==="array"||$.type(ds.settings.dataSource)==="object"){tds=ds.settings.dataSource}else if($.type(ds.settings.dataSource)!=="string"){tds=ds.data()}else{tds=[]}ds.settings.dataSource=null;ds.settings.data=null;if(opts&&opts.dataSource){opts.dataSource=null}opts=$.extend(true,{},ds.settings,opts);opts.dataSource=tds;tds=null;o.dataSource=new $.ig.TreeHierarchicalDataSource(opts)}}else{opts.dataSource=ds}if(o.dataSourceType!==null){opts.type=o.dataSourceType}return opts},_getDataColumns:function(cols){var i,j,res=[],colsLength=cols.length,dCols;for(i=0;i<colsLength;i++){if(cols[i].group!==undefined&&cols[i].group!==null){dCols=this._getDataColumns(this._getDataColumns(cols[i].group));for(j=0;j<dCols.length;j++){res.push(dCols[j])}}else{res.push(cols[i])}}return res},_generateDataSourceSchema:function(){var schema,i,j,rec,prop,cols=this._getDataColumns(this.options.columns),k,c,ds=this.options.dataSource;if(cols.length>0&&!this.options.autoGenerateColumns){schema={};schema.fields=[];j=0;for(i=0;i<cols.length;i++){if(cols[i].unbound===true){continue}schema.fields[j]={};schema.fields[j].name=cols[i].key;schema.fields[j].type=cols[i].dataType;j++}schema.searchField=this.options.responseDataKey}else if(this.options.autoGenerateColumns){schema={};schema.fields=[];if(this.options.dataSource&&this.options.dataSource.length&&this.options.dataSource.length>0&&$.type(this.options.dataSource)==="array"){rec=this.options.dataSource[0];for(prop in rec){if(rec.hasOwnProperty(prop)){for(k=0;k<cols;k++){if(cols[k].key===prop){c=cols[k];break}}if(_aNull(c)){schema.fields.push({name:prop,type:$.ig.getColType(rec[prop])})}else{if(c.unbound===true){continue}schema.fields.push({name:prop,type:c.dataType})}}}}}this._trigger(this.events.schemaGenerated,null,{owner:this,schema:schema,dataSource:ds});return schema},_createDataSource:function(dataOptions){var ds=this.options.dataSource,currentDataSource;if(!ds||typeof ds._xmlToArray!=="function"||typeof ds._encodePkParams!=="function"){currentDataSource=new $.ig.TreeHierarchicalDataSource(dataOptions)}else{currentDataSource=$.ui.igGrid.prototype._createDataSource.apply(this,arguments)}return currentDataSource},_renderRecords:function(start,end){var tbody=this.element.children("tbody"),html,ds,ph,noCancelInternal=true,noCancel=true,tbodytmp,fh=false;noCancelInternal=this._trigger("_rowsRendering",null,{owner:this,tbody:tbody,vrtWnd:{start:start,end:end}});if(noCancelInternal){noCancel=this._trigger(this.events.rowsRendering,null,{owner:this,tbody:tbody,vrtWnd:{start:start,end:end}});if(noCancel){this._indent=parseInt(this.options.indentation,10);if(this._isMultiColumnGrid){this._colspan=this.container().find("#"+this.id()+" colgroup:first>col").length-1}else{if(this.options.showHeader){this._colspan=this.container().find("#"+this.id()+(fh===true?"_headers":"")+" thead>tr:first").children("th:not(.ui-iggrid-expandheadercellgb)").length}else{this._colspan=this.container().find("#"+this.id()+" colgroup:first>col").length-1}}if(_aNull(this._dataBoundDepth)){this._dataBoundDepth=this.dataSource.getDataBoundDepth()}ds=this.dataSource.flatDataView();html=this._renderRecordsByFlatDataView(ds,false,start,end);if(this.options.renderExpansionIndicatorColumn){this._addDataSkipColumn()}if(!this._canreplaceinner||$.ig.util.isWebKit){ph=document.createElement("div");ph.innerHTML="<table><tbody role='rowgroup'>"+html+"</tbody></table>";tbodytmp=ph.firstChild.firstChild;this.element[0].replaceChild(tbodytmp,tbody[0])}else if(this._canreplaceinner){MSApp.execUnsafeLocalFunction(function(){tbody[0].innerHTML=html})}html="";this._buildVirtualDomForContinuousVirtualization();if(!this._initialized){this._bindEvtsToExpIndicators()}this._trigger(this.events.rowsRendered,null,{owner:this,tbody:tbody})}}},_bindEvtsToExpIndicators:function(){var $cont=this.container(),selector;if(!this.options.renderExpansionIndicatorColumn){selector="tbody>tr>td>span[data-expandcell-indicator]"}else{selector="td[data-expand-cell=1]"}$cont.off(".toggleTreegrid");$cont.on({"mouseup.toggleTreegrid":$.proxy(this._onMouseUpExpander,this),"keydown.toggleTreegrid":$.proxy(this._onKeyDownExpander,this),"click.toggleTreegrid":function(e){e.stopPropagation()}},selector)},_stopPropagationgForExpandCellIndicators:function(){var $exp=this.container().find("span[data-expandcell-indicator]");$exp.unbind("click.expanders").bind("click.expanders",function(e){e.stopPropagation()})},_getTotalRowCount:function(){return this._getDataView().length},_getDataView:function(){return this.dataSource.flatDataView()},_renderVirtualRecordsContinuous:function(from){var to,$scrollContainer,scrllToBttm=false,$ae,$cell,$row,rowId,cellInd,$tr;if(_aNull(from)){$.ui.igGrid.prototype._renderVirtualRecordsContinuous.apply(this,arguments)}else{this._totalRowCount=this._getTotalRowCount();if(from>this._totalRowCount){return $.ui.igGrid.prototype._renderVirtualRecordsContinuous.apply(this,arguments)}this._virtualRowCount=this._determineVirtualRowCount();if(this._virtualRowCount>this._totalRowCount){this._virtualRowCount=this._totalRowCount}to=from+parseInt(this._virtualRowCount,0);if(to>this._totalRowCount){to=this._totalRowCount-1;from=to-this._virtualRowCount;scrllToBttm=true;if(from<0){from=0}}$ae=$(document.activeElement);$cell=$ae.closest("td");$row=$ae.closest("tr");cellInd=$cell.index();rowId=$row.attr("id");this._renderRecords(from,to);this._avgRowHeight=this._calculateAvgRowHeight();this._setScrollContainerHeight(this._totalRowCount*this._avgRowHeight);if(scrllToBttm){$scrollContainer=this._scrollContainer();$scrollContainer[0].scrollTop=this._totalRowCount*this._avgRowHeight+1}if(rowId){$tr=$("#"+rowId);if($tr.length){if($ae.is("tr")){$ae=$tr;$tr.focus()}else if($ae.is("td")){$ae=$tr.children("td:nth-child("+(cellInd+1)+")");$ae.focus()}else if($ae.attr("data-expand-button")!==undefined){$ae=$tr.find("[data-expand-button]");$ae.focus()}this._fireInternalEvent("_virtualRecordsRendered",{row:$tr,activeElement:$ae,cellInd:cellInd})}}}},_addDataSkipColumn:function(){if(!this.options.renderExpansionIndicatorColumn){return}var indent=0,indentation=parseInt(this.options.indentation,10),$thDataSkip,$gridColgroup,$headersTbl,$footersTbl,cf;if(this.options.initialIndentationLevel>0){this._dataBoundDepth=this.options.initialIndentationLevel}else{this._dataBoundDepth=this.dataSource.getDataBoundDepth()}if(this._dataBoundDepth>=0){indent+=indentation*this._dataBoundDepth;if(this.options.indentation&&this.options.indentation.indexOf&&this.options.indentation.indexOf("%")>=0){indent=indent+"%"}cf=this.hasFixedColumns()&&this.fixingDirection()==="left";if(cf){$gridColgroup=this.fixedBodyContainer().find("colgroup:first")}else{$gridColgroup=this.element.find("colgroup:first")}this._addColHelper($gridColgroup,indent);if(cf){$headersTbl=this.fixedHeadersTable()}else{$headersTbl=this.headersTable()}if($headersTbl.attr("id")!==this.element.attr("id")){this._addColHelper($headersTbl.find("colgroup:first"),indent)}if(cf){$footersTbl=this.fixedFootersTable()}else{$footersTbl=this.footersTable()}if($footersTbl.attr("id")!==this.element.attr("id")){this._addColHelper($footersTbl.find("colgroup"),indent)}if(!$headersTbl.find("> thead th[data-treegrid-th]").length){if(!$headersTbl.find("> thead th.ui-iggrid-rowselector-header").length){$thDataSkip=$("<th></th>").prependTo($headersTbl.find("> thead tr:nth-child(1)"))}else{$thDataSkip=$("<th></th>").insertAfter($headersTbl.find("> thead th.ui-iggrid-rowselector-header"))}$thDataSkip.addClass(this.css.expandHeaderCell).attr("data-skip",true).attr("data-treegrid-th",true);if(this._isMultiColumnGrid){$thDataSkip.attr("rowspan",this._maxLevel+1)}}}},_addColHelper:function($colgroup,width){var $col=$colgroup.find("col[data-treegrid-col]");if($col.length===0){$col=$("<col />").prependTo($colgroup).attr("data-skip","true").attr("data-treegrid-col","true")}if(width){$col.width(width)}},_renderHeader:function(){$.ui.igGrid.prototype._renderHeader.apply(this,arguments);this.container().addClass(this.css.containerClasses)},_renderRecordsByFlatDataView:function(ds,isFixed,start,end){var i,data,rowData,hasChildren,children,o=this.options,propertyDataLevel=o.dataSourceSettings.propertyDataLevel,propertyExpanded=o.dataSourceSettings.propertyExpanded,childDataKey=o.childDataKey,html="";if(start===undefined){start=0;end=ds.length-1}if(start!==undefined&&end===undefined){end=start;if(end>ds.length-1){end=ds.length-1}start=0}if(start<0){start=0}if(end>ds.length-1){end=ds.length-1}for(i=start;i<=end;i++){data=ds[i];hasChildren=false;children=data[childDataKey];if(children&&($.type(children)==="array"&&(o.enableRemoteLoadOnDemand||children.length>0)||children===true)){hasChildren=true}rowData={dataBoundDepth:data[propertyDataLevel],parentCollapsed:false,hasExpandCell:hasChildren,children:children,expand:data[propertyExpanded]};html+=this._renderRecordInternal(i,data,rowData,isFixed)}return html},_determineVirtualRowCount:function(){var div,rowNumber=10,ds,rows="",html,height,avgRowHeight,displayContainerHeight,rowsPerPage,result;ds=this.dataSource.flatDataView();if(rowNumber>ds.length){rowNumber=ds.length}div=$("<div></div>)").appendTo("body").css({position:"absolute",top:-1800,left:-1800,visibility:"hidden"});rows=this._renderRecordsByFlatDataView(ds,false,0,rowNumber);html='<table class="'+this.css.gridTableClass+'"><tbody role="rowgroup">'+rows+"</tbody></table>";div.html(html);height=div.height();avgRowHeight=height/rowNumber;displayContainerHeight=this._getDisplayContainerHeight();rowsPerPage=displayContainerHeight/avgRowHeight;result=Math.ceil(rowsPerPage*3);div.remove();this._fireInternalEvent("_virtRowCountDetermined",result);return result},_renderRecord:function(data,rowIndex,isFixed){return this._renderRecordInternal(rowIndex,data,{dataBoundDepth:0,parentCollapsed:false},isFixed)},_renderRecordInternal:function(rowIndex,data,rowData,isFixed){var html="",markup,isContainerOnTheLeft,idxStart,key=this.options.primaryKey,dataBoundDepth=rowData.dataBoundDepth,cssClass=this.css.rowLevel+dataBoundDepth,id=$(this.element).attr("id"),owns="";html+="<tr";if(rowIndex%2!==0&&this.options.alternateRowStyles){cssClass+=" "+this.css.recordAltClass}if(this._transformCssCallback){cssClass=this._transformCssCallback(cssClass,data)}html+=' class="'+cssClass+'" data-row-idx="'+rowIndex+'" aria-level="'+dataBoundDepth+'"';if(!_aNull(key)){html+=' data-id="'+this._kval_from_key(key,data)+'" id="'+id+"_"+this._kval_from_key(key,data)+'"'}else if(!_aNull(data.ig_pk)){html+=' data-id="'+data.ig_pk+'" id="'+id+"_"+data.ig_pk+'"'}if(rowData.parentCollapsed&&dataBoundDepth>0){html+=' style="display: none;"'}if(rowData.hasExpandCell){$(rowData.children).each(function(){owns+=id+"_"+this[key]+" "});owns=owns.trimEnd();if(owns!==""){html+=' aria-owns="'+owns}html+='" aria-expanded="'+rowData.expand+'"'}html+=' role="row" tabIndex="'+this.options.tabIndex+'">';isContainerOnTheLeft=this._isDataContainerOnTheLeft(isFixed);if(this._shouldRenderDataSkipColumn(isFixed)){if(this._selection&&this._selection instanceof $.ig.SelectedRowsCollection){html+=this._editCellStyle(this._renderExpandCellHandler(rowData),data,key)}else{html+=this._renderExpandCellHandler(rowData)}}markup=$.ui.igGrid.prototype._renderRecord.call(this,data,rowIndex,isFixed);if(isFixed){markup=markup.replace('<td role="gridcell"></td>',"")}if(isContainerOnTheLeft){html+=this._renderFirstDataCellHandler(markup,rowData)}else{idxStart=markup.indexOf("<td");html+=markup.substring(idxStart)}return html},_shouldRenderDataSkipColumn:function(isFixed){var fdLeft;if(!this.options.renderExpansionIndicatorColumn){return false}if(!this.hasFixedColumns()){return true}fdLeft=this.fixingDirection()==="left";if(!isFixed&&fdLeft&&this._isFixedNonDataColumnsOnly()){return false}return this._isDataContainerOnTheLeft(isFixed)},_renderFirstDataCell:function(markup,rowData){var newTDSmarkup="",idxStart,TDSmarkup,tdContentFirstInd,otherTDSmarkup;idxStart=markup.indexOf("<td");if(idxStart===-1){return""}TDSmarkup=markup.substring(idxStart);tdContentFirstInd=TDSmarkup.indexOf(">",2);otherTDSmarkup=TDSmarkup.substring(tdContentFirstInd+1);newTDSmarkup=TDSmarkup.substring(0,tdContentFirstInd);if(this.options.renderExpansionIndicatorColumn){newTDSmarkup+=' data-cell-shift-container="1">'}else{newTDSmarkup+=' class="'+this.css.expandColumn+'" data-expand-cell="1">'}newTDSmarkup+=this._renderExpandCellContainer(rowData);newTDSmarkup+=otherTDSmarkup;return newTDSmarkup},_renderExpandCellContainer:function(rowData){var span="",margin,dataBoundDepth=rowData.dataBoundDepth;margin=dataBoundDepth>0?parseInt(this.options.indentation,10)*dataBoundDepth:0;if(this.options.renderExpansionIndicatorColumn){span='<span class="'+this.css.dataColumnExpandContainer+'" data-shift-container="1" style="display: inline-block; margin-left:'+margin+'px;"></span>'}else{span=this._renderExpandCellContainerHelper(rowData)}return span},_renderExpandCellContainerHelper:function(rowData){var span="",css,title,margin,dataBoundDepth=rowData.dataBoundDepth,cssEC=this.css.expandContainer,renderExpandButton=rowData.hasExpandCell;if(this.options.renderExpansionIndicatorColumn){cssEC=this.css.expandColumnContainer}margin=dataBoundDepth>0?parseInt(this.options.indentation,10)*dataBoundDepth:0;if($.type(this.options.indentation)==="string"&&this.options.indentation.indexOf("%")>0){margin+="%"}else{margin+="px"}span='<span data-expandcell-indicator="1" class="'+cssEC+'" style="padding-left:'+margin+';">';if(renderExpandButton&&this.options.showExpansionIndicator){if(rowData.expand){css=this.css.expandCellExpanded;title=this.options.collapseTooltipText}else{css=this.css.expandCellCollapsed;title=this.options.expandTooltipText}span+='<span data-expand-button class="'+css+'" title="'+title+'" tabIndex="'+this.options.tabIndex+'"></span>'}span+="</span>";return span},_renderExpandCell:function(rowData){if(!rowData.hasExpandCell){return this._renderDataSkipCell()}var html,css;css=(this.css.expandColumn+" "+this.css.dataSkipCell).trim();html='<td class="'+css+'" data-expand-cell="1" data-skip="true" tabIndex="'+this.options.tabIndex+'">';if(this.options.showExpansionIndicator){html+=this._renderExpandCellContainerHelper(rowData)}return html+"</td>"},_renderDataSkipCell:function(){return'<td class="'+this.css.dataSkipCell+'" data-skip="true" tabIndex="'+this.options.tabIndex+'"></td>'},_rerenderColgroups:function(){$.ui.igGrid.prototype._rerenderColgroups.apply(this,arguments);this._addDataSkipColumn()},_columnsGenerated:function(){var cols=this.options.columns,key,i,sDS=this.options.dataSourceSettings,arrSkipColumns=[this.options.childDataKey,sDS.propertyExpanded,sDS.propertyDataLevel];for(i=0;i<cols.length;i++){key=cols[i].key;if($.inArray(key,arrSkipColumns)!==-1){$.ig.removeFromArray(cols,i);i--}}},_rowVirtualizationEnabled:function(){return this.options.rowVirtualization||this.options.virtualization},_rerenderGridRowsOnToggle:function(){var virtualizationEnabled=this._rowVirtualizationEnabled(),dsSettings=this.dataSource.settings;return dsSettings.paging.enabled&&dsSettings.treeDS.paging.mode!=="rootLevelOnly"||virtualizationEnabled},_onDataRecordToggled:function(rec,expand,res,args){if(!res||!args){return}var flatData,html,level,dataIdx,diff,triggerEvents,$row,callAsync=false,rows,$fRow,$ufRow,$curRow,offsetTop,customCallback,$this=this,fRows,ufRows,eArgs,$scrollContainer,owner=this,id=$(this.element).attr("id"),ariaOwns="";$row=args.row;triggerEvents=args.triggerEvents;customCallback=args.customCallback;rows=this._getRows($row);$fRow=rows.fixedRow;$ufRow=rows.unfixedRow;level=parseInt($row.attr("aria-level"),10);eArgs={owner:this,row:$ufRow,fixedRow:$fRow,dataLevel:level,dataRecord:rec};this._loadingIndicator.hide();if(!this._rerenderGridRowsOnToggle()){if(expand&&!$row.attr("data-populated")){if(rec){this._toggleRowSuccessors($ufRow);$ufRow.add($fRow).attr("data-populated","1");flatData=this.dataSource.getFlatDataForRecord(rec,level+1);$(rec[this.options.childDataKey]).each(function(){ariaOwns+=id+"_"+this[owner.options.primaryKey]+" "});ariaOwns=ariaOwns.trimEnd();if(flatData&&flatData.flatVisibleData){html=this._renderRecordsByFlatDataView(flatData.flatVisibleData,false);ufRows=$(html).insertAfter($ufRow);$ufRow.attr("aria-owns",ariaOwns);if($fRow){html=this._renderRecordsByFlatDataView(flatData.flatVisibleData,true);fRows=$(html).insertAfter($fRow);$fRow.attr("aria-owns",ariaOwns)}this._trigger("_buildDOMOnToggle",this,{fRows:fRows,ufRows:ufRows})}}}else{this._toggleRowSuccessors($row)}}else{if(this._rowVirtualizationEnabled()&&this.options.virtualizationMode==="continuous"){if($row.length){dataIdx=$row.closest("tbody").children("tr[data-row-idx]:first").attr("data-row-idx");offsetTop=$row.offset().top;this._renderVirtualRecordsContinuous(parseInt(dataIdx,10));this._trigger("virtualrecordsrender",null,{owner:this,dom:this._virtualDom});if(!expand){$curRow=$("#"+this.id()+" > tbody > tr[data-row-idx="+$row.attr("data-row-idx")+"]");diff=$curRow.offset().top-offsetTop;if(Math.abs(diff)>1){$scrollContainer=this._scrollContainer();callAsync=true;setTimeout(function(){$scrollContainer[0].scrollTop=$scrollContainer.scrollTop()+diff},50)}}}else{callAsync=true;this._updateVirtualScrollContainer()}}}if(callAsync){setTimeout(function(){$this._callDataToggledEventsAndCallbacks(customCallback,expand,eArgs,triggerEvents)},55)}else{this._callDataToggledEventsAndCallbacks(customCallback,expand,eArgs,triggerEvents)}},_callDataToggledEventsAndCallbacks:function(customCallback,expand,eArgs,triggerEvents){var hasHeight=this.options.height&&parseInt(this.options.height,10)>0,isVirt=this.options.virtualization===true||this.options.columnVirtualization===true||this.options.rowVirtualization===true;if(customCallback){$.ig.util.invokeCallback(customCallback,[this,{unfixedRow:eArgs.row,fixedRow:eArgs.fixedRow},eArgs.dataRecord,expand])}if(hasHeight&&!isVirt&&this._hasVerticalScrollbar!==this.hasVerticalScrollbar()){this._adjustLastColumnWidth()}if(expand){this._fireInternalEvent("_rowExpanded",eArgs)}else{this._fireInternalEvent("_rowCollapsed",eArgs)}if(triggerEvents){if(expand){this._trigger(this.events.rowExpanded,null,eArgs)}else{this._trigger(this.events.rowCollapsed,null,eArgs)}}},toggleRow:function(row,callback){var $row,state,expand,ds=this.dataSource;if(row instanceof jQuery){$row=row}else{$row=this.element.find("tr[data-id="+row+"]")}state=$row.attr("aria-expanded");if(!$row.length){expand=!ds.getExpandStateById(row)}else{expand=state==="false"}this._expandCollapseRow(row,expand,false,callback)},expandRow:function(row,callback){this._expandCollapseRow(row,true,false,callback)},collapseRow:function(row,callback){this._expandCollapseRow(row,false,false,callback)},_onMouseUpExpander:function(event){this._toggleRow($(event.target).closest("tr"))},_onKeyDownExpander:function(event){if(event.keyCode===$.ui.keyCode.ENTER||event.keyCode===$.ui.keyCode.SPACE){this._toggleRow($(event.target).closest("tr"));event.preventDefault();event.stopPropagation()}},_toggleRow:function($row){if(!$row.length){return}var state=$row.attr("aria-expanded"),expand;if(state===undefined){return}expand=state==="false"||state==="0";this._expandCollapseRow($row,expand,true)},_expandCollapseRow:function(row,expand,triggerEvents,callback){var primaryKeyCol,noCancel=true,func,args,callbackArgs,rowId,$row,me=this,rows,$fRow,$ufRow,isExpanded=expand,$ae,$cell,$tr,cellInd;if(row instanceof jQuery){$row=row;if(!_aNull(this.options.primaryKey)){primaryKeyCol=this.columnByKey(this.options.primaryKey);rowId=$row.attr("data-id");if(primaryKeyCol&&(primaryKeyCol.dataType==="number"||primaryKeyCol.dataType==="numeric")){rowId=parseInt(rowId,10)}}else{rowId=$row.index()}}else{rowId=row;$row=this.element.find("tr[data-id="+row+"]")}if($row.length===1&&$row.attr("aria-expanded")===isExpanded.toString()){return}func=$.proxy(this._onDataRecordToggled,this);callbackArgs={callback:func,args:{row:$row,triggerEvents:triggerEvents}};if(callback){callbackArgs.args.customCallback=callback}rows=this._getRows($row);$fRow=rows.fixedRow;$ufRow=rows.unfixedRow;args={owner:this,row:$ufRow,fixedRow:$fRow,dataLevel:parseInt($row.attr("aria-level"),10)};if(triggerEvents){if(expand){noCancel=this._trigger(this.events.rowExpanding,null,args)}else{noCancel=this._trigger(this.events.rowCollapsing,null,args)}}if(noCancel){this._loadingIndicator.show();setTimeout(function(){$ae=$(document.activeElement);$cell=$ae.closest("td");cellInd=$cell.index();me.dataSource.setExpandedStateByPrimaryKey(rowId,expand,callbackArgs);if(me._rerenderGridRowsOnToggle()){$tr=$('[data-id="'+rowId+'"]');if($tr.length){if($ae.is("tr")){$ae=$tr;$tr.focus()}if($ae.is("td")){$ae=$tr.children("td:nth-child("+(cellInd+1)+")");$ae.focus()}else if($ae.attr("data-expand-button")!==undefined){$ae=$tr.find("[data-expand-button]");$ae.focus()}}}},0)}},_toggleRowSuccessors:function($row){var $nextRow=$row,foundUpperLevel=false,dL,$fRow,$ufRow=$row,levelCollapsed=null,$container,dataBoundDepth=parseInt($row.attr("aria-level"),10),isExpanded=$row.attr("aria-expanded"),styleDisplay="",expanded=isExpanded==="true";if(expanded){styleDisplay="none"}if(this.hasFixedColumns()){if(this._isFixedElement($row)){$fRow=$row;if(this._rowVirtualizationEnabled()){$container=this._vdisplaycontainer()}else{$container=this.scrollContainer()}$ufRow=$container.find("tbody > tr").eq($row.index())}else{$fRow=this.fixedBodyContainer().find("tbody > tr").eq($row.index())}}while($nextRow.length===1&&!foundUpperLevel){$nextRow=$nextRow.next("tr[aria-level]");dL=parseInt($nextRow.attr("aria-level"),10);if(isNaN(dL)||dL<=dataBoundDepth){foundUpperLevel=true;break}if(!expanded){if(levelCollapsed!==null){if(dL<=levelCollapsed){levelCollapsed=null}else{continue}}if($nextRow.attr("aria-expanded")==="false"){levelCollapsed=dL}}this._showHideRow($nextRow,styleDisplay)}if(expanded){$ufRow.add($fRow).attr("data-populated","1").attr("aria-expanded",false).find("[data-expand-button]").attr("title",this.options.expandTooltipText).removeClass(this.css.expandCellExpanded).addClass(this.css.expandCellCollapsed)}else{$ufRow.add($fRow).attr("aria-expanded",true).find("[data-expand-button]").attr("title",this.options.collapseTooltipText).removeClass(this.css.expandCellCollapsed).addClass(this.css.expandCellExpanded)}},_showHideRow:function($row,styleDisplay){var rows,$ufRow=$row,$fRow,fixedColumns=this.hasFixedColumns();if(fixedColumns){rows=this._getRows($row);$fRow=rows.fixedRow;$ufRow=rows.unfixedRow}$ufRow.css("display",styleDisplay);if($fRow){$fRow.css("display",styleDisplay)}if(styleDisplay===""){this._trigger("_rowShown",this,{fRow:$fRow,ufRow:$ufRow})}else{this._trigger("_rowHidden",this,{fRow:$fRow,ufRow:$ufRow})}},_renderExtraHeaderCells:function(row,colgroup,prepend){if(!this.options.renderExpansionIndicatorColumn){return}if(prepend===true){$("<td></td>").prependTo(row).css("border-width",0).attr("data-skip",true);if(colgroup){$("<col />").prependTo(colgroup).attr("data-skip",true).css("width",this.options.indentation)}}else{$("<td></td>").appendTo(row).css("border-width",0).attr("data-skip",true);if(colgroup){$("<col />").appendTo(colgroup).attr("data-skip",true).css("width",this.options.indentation)}}},_isFixedNonDataColumnsOnly:function(){if(this.hasFixedColumns()&&(!this._fixedColumns||!this._fixedColumns.length)){return true}return false},_isDataContainerOnTheLeft:function(isFixed){var fdLeft=this.fixingDirection()==="left";if(!this.hasFixedColumns()){return true}if($.type(this._fixedColumns)==="array"&&!this._fixedColumns.length){return true}if(isFixed){return fdLeft}return!fdLeft},_getRows:function($row){var index,$fRow,$ufRow=$row;if(this.hasFixedColumns()){index=$row.index();if(this._isFixedElement($row)){$fRow=$row;$ufRow=$(this.rowAt(index))}else{$fRow=$(this.fixedRowAt(index))}}return{fixedRow:$fRow,unfixedRow:$ufRow}},_renderRow:function(rec,tr){var funcCallbak;funcCallbak=function(rec,tr){return $.ui.igGrid.prototype._renderRow.call(this,rec,tr)};return this._persistExpansionIndicator(rec,tr,funcCallbak,this)},_persistExpansionIndicator:function(rec,tr,funcCallback,funcCallee){var $td,trRes=tr,$tr=$(tr),$span,renderEC=this.options.renderExpansionIndicatorColumn;if(renderEC){$span=$tr.find("span[data-shift-container]");$td=$span.closest("td")}else{$span=$tr.find("[data-expandcell-indicator]");$td=$span.closest("td");$span.detach()}if(funcCallback&&funcCallee){trRes=funcCallback.call(funcCallee,rec,tr);$tr=$(trRes)}if($span.length>0){$span.prependTo($td)}return trRes},_detachEvents:function(){if(this._columnsGeneratedHandler){this.element.unbind("igtreegrid_columnsgenerated",this._columnsGeneratedHandler)}},_attachEvents:function(){this._columnsGeneratedHandler=$.proxy(this._columnsGenerated,this);this.element.bind("igtreegrid_columnsgenerated",this._columnsGeneratedHandler)},_initFeature:function(featureObject){if(!featureObject){return}if(featureObject.name===undefined){return}var widgetTreeGrid="igTreeGrid"+featureObject.name;if($.type(this.element[widgetTreeGrid])==="function"){if(this.element.data(widgetTreeGrid)){this.element[widgetTreeGrid]("destroy")}this.element[widgetTreeGrid](featureObject);this.element.data(widgetTreeGrid)._injectGrid(this)}else{return $.ui.igGrid.prototype._initFeature.apply(this,arguments)}},_destroyFeatures:function(){var i,features=this.options.features,e=this.element;for(i=0;i<features.length;i++){if(e.data("igTreeGrid"+features[i].name)){e["igTreeGrid"+features[i].name]("destroy")}else if(e.data("igGrid"+features[i].name)){e["igGrid"+features[i].name]("destroy")}}},destroy:function(){this._detachEvents();$.ui.igGrid.prototype.destroy.apply(this,arguments);this.element.removeData($.ui.igGrid.prototype.widgetName);this._removeOverridenFunction();return this}});$.extend($.ui.igTreeGrid,{version:"15.2.20152.1027"})})(jQuery);