src/pyams_skin/resources/js/ext/jquery-dataTables-fixedColumns.min.js
changeset 475 79ae32c82e3e
parent 0 bb4aabe07487
equal deleted inserted replaced
473:ca7ba7882abe 475:79ae32c82e3e
     1 /* FixedColumns 3.0.0
     1 !function(t,e,i){!function(e,i){"use strict";var o=function(t,i){var s=this;if(!this instanceof o)alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword.");else{void 0===i&&(i={}),e.fn.dataTable.camelToHungarian&&e.fn.dataTable.camelToHungarian(o.defaults,i);var l=e.fn.dataTable.Api?new e.fn.dataTable.Api(t).settings()[0]:t.fnSettings();this.s={dt:l,iTableColumns:l.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[]},this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}},l._oFixedColumns=this,l._bInitComplete?this._fnConstruct(i):l.oApi._fnCallbackReg(l,"aoInitComplete",function(){s._fnConstruct(i)},"FixedColumns")}};o.prototype={fnUpdate:function(){this._fnDraw(!0)},fnRedrawLayout:function(){this._fnColCalc(),this._fnGridLayout(),this.fnUpdate()},fnRecalculateHeight:function(t){delete t._DTTC_iHeight,t.style.height="auto"},fnSetRowHeight:function(t,e){t.style.height=e+"px"},fnGetPosition:function(t){var i,o=this.s.dt.oInstance;if(e(t).parents(".DTFC_Cloned").length){if("tr"===t.nodeName.toLowerCase())return i=e(t).index(),o.fnGetPosition(e("tr",this.s.dt.nTBody)[i]);var s=e(t).index();return i=e(t.parentNode).index(),[o.fnGetPosition(e("tr",this.s.dt.nTBody)[i]),s,o.oApi._fnVisibleToColumnIndex(this.s.dt,s)]}return o.fnGetPosition(t)},_fnConstruct:function(i){var s=this;if("function"==typeof this.s.dt.oInstance.fnVersionCheck&&!0===this.s.dt.oInstance.fnVersionCheck("1.8.0"))if(""!==this.s.dt.oScroll.sX){this.s=e.extend(!0,this.s,o.defaults,i);var l=this.s.dt.oClasses;this.dom.grid.dt=e(this.s.dt.nTable).parents("div."+l.sScrollWrapper)[0],this.dom.scroller=e("div."+l.sScrollBody,this.dom.grid.dt)[0],this._fnColCalc(),this._fnGridSetup();var n;e(this.dom.scroller).on("mouseover.DTFC",function(){n="main"}).on("scroll.DTFC",function(){"main"===n&&(s.s.iLeftColumns>0&&(s.dom.grid.left.liner.scrollTop=s.dom.scroller.scrollTop),s.s.iRightColumns>0&&(s.dom.grid.right.liner.scrollTop=s.dom.scroller.scrollTop))}),s.s.iLeftColumns>0&&e(s.dom.grid.left.liner).on("mouseover.DTFC",function(){n="left"}).on("scroll.DTFC",function(){"left"===n&&(s.dom.scroller.scrollTop=s.dom.grid.left.liner.scrollTop,s.s.iRightColumns>0&&(s.dom.grid.right.liner.scrollTop=s.dom.grid.left.liner.scrollTop))}).on("wheel.DTFC",function(t){var e=-t.originalEvent.deltaX;s.dom.scroller.scrollLeft-=e}),s.s.iRightColumns>0&&e(s.dom.grid.right.liner).on("mouseover.DTFC",function(){n="right"}).on("scroll.DTFC",function(){"right"===n&&(s.dom.scroller.scrollTop=s.dom.grid.right.liner.scrollTop,s.s.iLeftColumns>0&&(s.dom.grid.left.liner.scrollTop=s.dom.grid.right.liner.scrollTop))}).on("wheel.DTFC",function(t){var e=-t.originalEvent.deltaX;s.dom.scroller.scrollLeft-=e}),e(t).on("resize.DTFC",function(){s._fnGridLayout.call(s)});var d=!0,r=e(this.s.dt.nTable);r.on("draw.dt.DTFC",function(){s._fnDraw.call(s,d),d=!1}).on("column-sizing.dt.DTFC",function(){s._fnColCalc(),s._fnGridLayout(s)}).on("column-visibility.dt.DTFC",function(){s._fnColCalc(),s._fnGridLayout(s),s._fnDraw(!0)}).on("destroy.dt.DTFC",function(){r.off("column-sizing.dt.DTFC destroy.dt.DTFC draw.dt.DTFC"),e(s.dom.scroller).fn("scroll.DTFC mouseover.DTFC"),e(t).off("resize.DTFC"),e(s.dom.grid.left.liner).on("scroll.DTFC wheel.DTFC mouseover.DTFC"),e(s.dom.grid.left.wrapper).remove(),e(s.dom.grid.right.liner).on("scroll.DTFC wheel.DTFC mouseover.DTFC"),e(s.dom.grid.right.wrapper).remove()}),this._fnGridLayout(),this.s.dt.oInstance.fnDraw(!1)}else this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");else alert("FixedColumns "+o.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation")},_fnColCalc:function(){var t=this,i=0,o=0;this.s.aiInnerWidths=[],this.s.aiOuterWidths=[],e.each(this.s.dt.aoColumns,function(s,l){var n=e(l.nTh);if(n.filter(":visible").length){var d=n.outerWidth();0===t.s.aiOuterWidths.length&&(d+=parseInt(e(t.s.dt.nTable).css("border-left-width"),10)),t.s.aiOuterWidths.push(d),t.s.aiInnerWidths.push(n.width()),s<t.s.iLeftColumns&&(i+=d),t.s.iTableColumns-t.s.iRightColumns<=s&&(o+=d)}else t.s.aiInnerWidths.push(0),t.s.aiOuterWidths.push(0)}),this.s.iLeftWidth=i,this.s.iRightWidth=o},_fnGridSetup:function(){var t,i=this._fnDTOverflow();this.dom.body=this.s.dt.nTable,this.dom.header=this.s.dt.nTHead.parentNode,this.dom.header.parentNode.parentNode.style.position="relative";var o=e('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;"><div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div><div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div></div><div class="DTFC_RightWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div><div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div></div></div>')[0],s=o.childNodes[0],l=o.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(o,this.dom.grid.dt),o.appendChild(this.dom.grid.dt),this.dom.grid.wrapper=o,this.s.iLeftColumns>0&&(this.dom.grid.left.wrapper=s,this.dom.grid.left.head=s.childNodes[0],this.dom.grid.left.body=s.childNodes[1],this.dom.grid.left.liner=e("div.DTFC_LeftBodyLiner",o)[0],o.appendChild(s)),this.s.iRightColumns>0&&(this.dom.grid.right.wrapper=l,this.dom.grid.right.head=l.childNodes[0],this.dom.grid.right.body=l.childNodes[1],this.dom.grid.right.liner=e("div.DTFC_RightBodyLiner",o)[0],(t=e("div.DTFC_RightHeadBlocker",o)[0]).style.width=i.bar+"px",t.style.right=-i.bar+"px",this.dom.grid.right.headBlock=t,(t=e("div.DTFC_RightFootBlocker",o)[0]).style.width=i.bar+"px",t.style.right=-i.bar+"px",this.dom.grid.right.footBlock=t,o.appendChild(l)),this.s.dt.nTFoot&&(this.dom.footer=this.s.dt.nTFoot.parentNode,this.s.iLeftColumns>0&&(this.dom.grid.left.foot=s.childNodes[2]),this.s.iRightColumns>0&&(this.dom.grid.right.foot=l.childNodes[2]))},_fnGridLayout:function(){var t,i=this.dom.grid,o=e(i.wrapper).width(),s=e(this.s.dt.nTable.parentNode).height(),l=e(this.s.dt.nTable.parentNode.parentNode).height(),n=this._fnDTOverflow(),d=this.s.iLeftWidth,r=this.s.iRightWidth;n.x&&(s-=n.bar),i.wrapper.style.height=l+"px",this.s.iLeftColumns>0&&(i.left.wrapper.style.width=d+"px",i.left.wrapper.style.height="1px",i.left.body.style.height=s+"px",i.left.foot&&(i.left.foot.style.top=(n.x?n.bar:0)+"px"),i.left.liner.style.width=d+n.bar+"px",i.left.liner.style.height=s+"px"),this.s.iRightColumns>0&&(t=o-r,n.y&&(t-=n.bar),i.right.wrapper.style.width=r+"px",i.right.wrapper.style.left=t+"px",i.right.wrapper.style.height="1px",i.right.body.style.height=s+"px",i.right.foot&&(i.right.foot.style.top=(n.x?n.bar:0)+"px"),i.right.liner.style.width=r+n.bar+"px",i.right.liner.style.height=s+"px",i.right.headBlock.style.display=n.y?"block":"none",i.right.footBlock.style.display=n.y?"block":"none")},_fnDTOverflow:function(){var t=this.s.dt.nTable,e=t.parentNode,i={x:!1,y:!1,bar:this.s.dt.oScroll.iBarWidth};return t.offsetWidth>e.clientWidth&&(i.x=!0),t.offsetHeight>e.clientHeight&&(i.y=!0),i},_fnDraw:function(t){this._fnGridLayout(),this._fnCloneLeft(t),this._fnCloneRight(t),null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right),e(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(t){if(!(this.s.iRightColumns<=0)){var e,i=[];for(e=this.s.iTableColumns-this.s.iRightColumns;e<this.s.iTableColumns;e++)this.s.dt.aoColumns[e].bVisible&&i.push(e);this._fnClone(this.dom.clone.right,this.dom.grid.right,i,t)}},_fnCloneLeft:function(t){if(!(this.s.iLeftColumns<=0)){var e,i=[];for(e=0;e<this.s.iLeftColumns;e++)this.s.dt.aoColumns[e].bVisible&&i.push(e);this._fnClone(this.dom.clone.left,this.dom.grid.left,i,t)}},_fnCopyLayout:function(t,i){for(var o=[],s=[],l=[],n=0,d=t.length;n<d;n++){var r=[];r.nTr=e(t[n].nTr).clone(!0,!0)[0];for(var h=0,a=this.s.iTableColumns;h<a;h++)if(-1!==e.inArray(h,i)){var f=e.inArray(t[n][h].cell,l);if(-1===f){var p=e(t[n][h].cell).clone(!0,!0)[0];s.push(p),l.push(t[n][h].cell),r.push({cell:p,unique:t[n][h].unique})}else r.push({cell:s[f],unique:t[n][h].unique})}o.push(r)}return o},_fnClone:function(t,i,o,s){var l,n,d,r,h,a,f,p,c,u,g=this;if(s){for(null!==t.header&&t.header.parentNode.removeChild(t.header),t.header=e(this.dom.header).clone(!0,!0)[0],t.header.className+=" DTFC_Cloned",t.header.style.width="100%",i.head.appendChild(t.header),p=this._fnCopyLayout(this.s.dt.aoHeader,o),(c=e(">thead",t.header)).empty(),l=0,n=p.length;l<n;l++)c[0].appendChild(p[l].nTr);this.s.dt.oApi._fnDrawHead(this.s.dt,p,!0)}else for(p=this._fnCopyLayout(this.s.dt.aoHeader,o),u=[],this.s.dt.oApi._fnDetectHeader(u,e(">thead",t.header)[0]),l=0,n=p.length;l<n;l++)for(d=0,r=p[l].length;d<r;d++)u[l][d].cell.className=p[l][d].cell.className,e("span.DataTables_sort_icon",u[l][d].cell).each(function(){this.className=e("span.DataTables_sort_icon",p[l][d].cell)[0].className});this._fnEqualiseHeights("thead",this.dom.header,t.header),"auto"==this.s.sHeightMatch&&e(">tbody>tr",g.dom.body).css("height","auto"),null!==t.body&&(t.body.parentNode.removeChild(t.body),t.body=null),t.body=e(this.dom.body).clone(!0)[0],t.body.className+=" DTFC_Cloned",t.body.style.paddingBottom=this.s.dt.oScroll.iBarWidth+"px",t.body.style.marginBottom=2*this.s.dt.oScroll.iBarWidth+"px",null!==t.body.getAttribute("id")&&t.body.removeAttribute("id"),e(">thead>tr",t.body).empty(),e(">tfoot",t.body).remove();var m=e("tbody",t.body)[0];if(e(m).empty(),this.s.dt.aiDisplay.length>0){var C=e(">thead>tr",t.body)[0];for(f=0;f<o.length;f++){h=o[f],(a=e(this.s.dt.aoColumns[h].nTh).clone(!0)[0]).innerHTML="";var y=a.style;y.paddingTop="0",y.paddingBottom="0",y.borderTopWidth="0",y.borderBottomWidth="0",y.height=0,y.width=g.s.aiInnerWidths[h]+"px",C.appendChild(a)}e(">tbody>tr",g.dom.body).each(function(t){var i=this.cloneNode(!1);i.removeAttribute("id");var s=!1===g.s.dt.oFeatures.bServerSide?g.s.dt.aiDisplay[g.s.dt._iDisplayStart+t]:t;for(f=0;f<o.length;f++){var l=g.s.dt.aoData[s].anCells||g.s.dt.oApi._fnGetTdNodes(g.s.dt,s);h=o[f],l.length>0&&(a=e(l[h]).clone(!0,!0)[0],i.appendChild(a))}m.appendChild(i)})}else e(">tbody>tr",g.dom.body).each(function(t){(a=this.cloneNode(!0)).className+=" DTFC_NoData",e("td",a).html(""),m.appendChild(a)});if(t.body.style.width="100%",t.body.style.margin="0",t.body.style.padding="0",s&&void 0!==this.s.dt.oScroller&&i.liner.appendChild(this.s.dt.oScroller.dom.force.cloneNode(!0)),i.liner.appendChild(t.body),this._fnEqualiseHeights("tbody",g.dom.body,t.body),null!==this.s.dt.nTFoot){if(s){null!==t.footer&&t.footer.parentNode.removeChild(t.footer),t.footer=e(this.dom.footer).clone(!0,!0)[0],t.footer.className+=" DTFC_Cloned",t.footer.style.width="100%",i.foot.appendChild(t.footer),p=this._fnCopyLayout(this.s.dt.aoFooter,o);var T=e(">tfoot",t.footer);for(T.empty(),l=0,n=p.length;l<n;l++)T[0].appendChild(p[l].nTr);this.s.dt.oApi._fnDrawHead(this.s.dt,p,!0)}else{p=this._fnCopyLayout(this.s.dt.aoFooter,o);var v=[];for(this.s.dt.oApi._fnDetectHeader(v,e(">tfoot",t.footer)[0]),l=0,n=p.length;l<n;l++)for(d=0,r=p[l].length;d<r;d++)v[l][d].cell.className=p[l][d].cell.className}this._fnEqualiseHeights("tfoot",this.dom.footer,t.footer)}var b=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,e(">thead",t.header)[0]);e(b).each(function(t){h=o[t],this.style.width=g.s.aiInnerWidths[h]+"px"}),null!==g.s.dt.nTFoot&&(b=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,e(">tfoot",t.footer)[0]),e(b).each(function(t){h=o[t],this.style.width=g.s.aiInnerWidths[h]+"px"}))},_fnGetTrNodes:function(t){for(var e=[],i=0,o=t.childNodes.length;i<o;i++)"TR"==t.childNodes[i].nodeName.toUpperCase()&&e.push(t.childNodes[i]);return e},_fnEqualiseHeights:function(t,i,o){if("none"!=this.s.sHeightMatch||"thead"===t||"tfoot"===t){var s,l,n,d,r,h=i.getElementsByTagName(t)[0],a=o.getElementsByTagName(t)[0],f=e(">"+t+">tr:eq(0)",i).children(":first"),p=(f.outerHeight(),f.height(),this._fnGetTrNodes(h)),c=this._fnGetTrNodes(a),u=[];for(s=0,l=c.length;s<l;s++)d=p[s].offsetHeight,n=(r=c[s].offsetHeight)>d?r:d,"semiauto"==this.s.sHeightMatch&&(p[s]._DTTC_iHeight=n),u.push(n);for(s=0,l=c.length;s<l;s++)c[s].style.height=u[s]+"px",p[s].style.height=u[s]+"px"}}},o.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"},o.version="3.0.0",e.fn.dataTable.FixedColumns=o,e.fn.DataTable.FixedColumns=o}(jQuery,jQuery.fn.dataTable)}(window,document);
     2  * ©2010-2014 SpryMedia Ltd - datatables.net/license
       
     3  */
       
     4 (function(c,a,d){var b=function(g,f){var e=function(i,k){var h=this;if(!this instanceof e){alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword.");return}if(typeof k=="undefined"){k={}}if(g.fn.dataTable.camelToHungarian){g.fn.dataTable.camelToHungarian(e.defaults,k)}var j=g.fn.dataTable.Api?new g.fn.dataTable.Api(i).settings()[0]:i.fnSettings();this.s={dt:j,iTableColumns:j.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[]};this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}};j._oFixedColumns=this;if(!j._bInitComplete){j.oApi._fnCallbackReg(j,"aoInitComplete",function(){h._fnConstruct(k)},"FixedColumns")}else{this._fnConstruct(k)}};e.prototype={fnUpdate:function(){this._fnDraw(true)},fnRedrawLayout:function(){this._fnColCalc();this._fnGridLayout();this.fnUpdate()},fnRecalculateHeight:function(h){delete h._DTTC_iHeight;h.style.height="auto"},fnSetRowHeight:function(i,h){i.style.height=h+"px"},fnGetPosition:function(i){var h;var j=this.s.dt.oInstance;if(!g(i).parents(".DTFC_Cloned").length){return j.fnGetPosition(i)}else{if(i.nodeName.toLowerCase()==="tr"){h=g(i).index();return j.fnGetPosition(g("tr",this.s.dt.nTBody)[h])}else{var l=g(i).index();h=g(i.parentNode).index();var k=j.fnGetPosition(g("tr",this.s.dt.nTBody)[h]);return[k,l,j.oApi._fnVisibleToColumnIndex(this.s.dt,l)]}}},_fnConstruct:function(o){var l,j,h,n=this;if(typeof this.s.dt.oInstance.fnVersionCheck!="function"||this.s.dt.oInstance.fnVersionCheck("1.8.0")!==true){alert("FixedColumns "+e.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");return}if(this.s.dt.oScroll.sX===""){this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");return}this.s=g.extend(true,this.s,e.defaults,o);var k=this.s.dt.oClasses;this.dom.grid.dt=g(this.s.dt.nTable).parents("div."+k.sScrollWrapper)[0];this.dom.scroller=g("div."+k.sScrollBody,this.dom.grid.dt)[0];this._fnColCalc();this._fnGridSetup();var m;g(this.dom.scroller).on("mouseover.DTFC",function(){m="main"}).on("scroll.DTFC",function(){if(m==="main"){if(n.s.iLeftColumns>0){n.dom.grid.left.liner.scrollTop=n.dom.scroller.scrollTop}if(n.s.iRightColumns>0){n.dom.grid.right.liner.scrollTop=n.dom.scroller.scrollTop}}});if(n.s.iLeftColumns>0){g(n.dom.grid.left.liner).on("mouseover.DTFC",function(){m="left"}).on("scroll.DTFC",function(){if(m==="left"){n.dom.scroller.scrollTop=n.dom.grid.left.liner.scrollTop;if(n.s.iRightColumns>0){n.dom.grid.right.liner.scrollTop=n.dom.grid.left.liner.scrollTop}}}).on("wheel.DTFC",function(r){var i=-r.originalEvent.deltaX;n.dom.scroller.scrollLeft-=i})}if(n.s.iRightColumns>0){g(n.dom.grid.right.liner).on("mouseover.DTFC",function(){m="right"}).on("scroll.DTFC",function(){if(m==="right"){n.dom.scroller.scrollTop=n.dom.grid.right.liner.scrollTop;if(n.s.iLeftColumns>0){n.dom.grid.left.liner.scrollTop=n.dom.grid.right.liner.scrollTop}}}).on("wheel.DTFC",function(r){var i=-r.originalEvent.deltaX;n.dom.scroller.scrollLeft-=i})}g(c).on("resize.DTFC",function(){n._fnGridLayout.call(n)});var q=true;var p=g(this.s.dt.nTable);p.on("draw.dt.DTFC",function(){n._fnDraw.call(n,q);q=false}).on("column-sizing.dt.DTFC",function(){n._fnColCalc();n._fnGridLayout(n)}).on("column-visibility.dt.DTFC",function(){n._fnColCalc();n._fnGridLayout(n);n._fnDraw(true)}).on("destroy.dt.DTFC",function(){p.off("column-sizing.dt.DTFC destroy.dt.DTFC draw.dt.DTFC");g(n.dom.scroller).fn("scroll.DTFC mouseover.DTFC");g(c).off("resize.DTFC");g(n.dom.grid.left.liner).on("scroll.DTFC wheel.DTFC mouseover.DTFC");g(n.dom.grid.left.wrapper).remove();g(n.dom.grid.right.liner).on("scroll.DTFC wheel.DTFC mouseover.DTFC");g(n.dom.grid.right.wrapper).remove()});this._fnGridLayout();this.s.dt.oInstance.fnDraw(false)},_fnColCalc:function(){var j=this;var i=0;var h=0;this.s.aiInnerWidths=[];this.s.aiOuterWidths=[];g.each(this.s.dt.aoColumns,function(l,k){var m=g(k.nTh);if(!m.filter(":visible").length){j.s.aiInnerWidths.push(0);j.s.aiOuterWidths.push(0)}else{var n=m.outerWidth();if(j.s.aiOuterWidths.length===0){n+=parseInt(g(j.s.dt.nTable).css("border-left-width"),10)}j.s.aiOuterWidths.push(n);j.s.aiInnerWidths.push(m.width());if(l<j.s.iLeftColumns){i+=n}if(j.s.iTableColumns-j.s.iRightColumns<=l){h+=n}}});this.s.iLeftWidth=i;this.s.iRightWidth=h},_fnGridSetup:function(){var l=this;var h=this._fnDTOverflow();var m;this.dom.body=this.s.dt.nTable;this.dom.header=this.s.dt.nTHead.parentNode;this.dom.header.parentNode.parentNode.style.position="relative";var j=g('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;"><div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div><div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div></div><div class="DTFC_RightWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div><div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div></div></div>')[0];var k=j.childNodes[0];var i=j.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(j,this.dom.grid.dt);j.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=j;if(this.s.iLeftColumns>0){this.dom.grid.left.wrapper=k;this.dom.grid.left.head=k.childNodes[0];this.dom.grid.left.body=k.childNodes[1];this.dom.grid.left.liner=g("div.DTFC_LeftBodyLiner",j)[0];j.appendChild(k)}if(this.s.iRightColumns>0){this.dom.grid.right.wrapper=i;this.dom.grid.right.head=i.childNodes[0];this.dom.grid.right.body=i.childNodes[1];this.dom.grid.right.liner=g("div.DTFC_RightBodyLiner",j)[0];m=g("div.DTFC_RightHeadBlocker",j)[0];m.style.width=h.bar+"px";m.style.right=-h.bar+"px";this.dom.grid.right.headBlock=m;m=g("div.DTFC_RightFootBlocker",j)[0];m.style.width=h.bar+"px";m.style.right=-h.bar+"px";this.dom.grid.right.footBlock=m;j.appendChild(i)}if(this.s.dt.nTFoot){this.dom.footer=this.s.dt.nTFoot.parentNode;if(this.s.iLeftColumns>0){this.dom.grid.left.foot=k.childNodes[2]}if(this.s.iRightColumns>0){this.dom.grid.right.foot=i.childNodes[2]}}},_fnGridLayout:function(){var o=this.dom.grid;var n=g(o.wrapper).width();var j=g(this.s.dt.nTable.parentNode).height();var m=g(this.s.dt.nTable.parentNode.parentNode).height();var h=this._fnDTOverflow();var l=this.s.iLeftWidth,i=this.s.iRightWidth,k;if(h.x){j-=h.bar}o.wrapper.style.height=m+"px";if(this.s.iLeftColumns>0){o.left.wrapper.style.width=l+"px";o.left.wrapper.style.height="1px";o.left.body.style.height=j+"px";if(o.left.foot){o.left.foot.style.top=(h.x?h.bar:0)+"px"}o.left.liner.style.width=(l+h.bar)+"px";o.left.liner.style.height=j+"px"}if(this.s.iRightColumns>0){k=n-i;if(h.y){k-=h.bar}o.right.wrapper.style.width=i+"px";o.right.wrapper.style.left=k+"px";o.right.wrapper.style.height="1px";o.right.body.style.height=j+"px";if(o.right.foot){o.right.foot.style.top=(h.x?h.bar:0)+"px"}o.right.liner.style.width=(i+h.bar)+"px";o.right.liner.style.height=j+"px";o.right.headBlock.style.display=h.y?"block":"none";o.right.footBlock.style.display=h.y?"block":"none"}},_fnDTOverflow:function(){var j=this.s.dt.nTable;var h=j.parentNode;var i={x:false,y:false,bar:this.s.dt.oScroll.iBarWidth};if(j.offsetWidth>h.clientWidth){i.x=true}if(j.offsetHeight>h.clientHeight){i.y=true}return i},_fnDraw:function(h){this._fnGridLayout();this._fnCloneLeft(h);this._fnCloneRight(h);if(this.s.fnDrawCallback!==null){this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right)}g(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(j){if(this.s.iRightColumns<=0){return}var l=this,h,m,k=[];for(h=this.s.iTableColumns-this.s.iRightColumns;h<this.s.iTableColumns;h++){if(this.s.dt.aoColumns[h].bVisible){k.push(h)}}this._fnClone(this.dom.clone.right,this.dom.grid.right,k,j)},_fnCloneLeft:function(j){if(this.s.iLeftColumns<=0){return}var l=this,h,m,k=[];for(h=0;h<this.s.iLeftColumns;h++){if(this.s.dt.aoColumns[h].bVisible){k.push(h)}}this._fnClone(this.dom.clone.left,this.dom.grid.left,k,j)},_fnCopyLayout:function(s,u){var r=[];var p=[];var l=[];for(var n=0,k=s.length;n<k;n++){var q=[];q.nTr=g(s[n].nTr).clone(true,true)[0];for(var m=0,t=this.s.iTableColumns;m<t;m++){if(g.inArray(m,u)===-1){continue}var o=g.inArray(s[n][m].cell,l);if(o===-1){var h=g(s[n][m].cell).clone(true,true)[0];p.push(h);l.push(s[n][m].cell);q.push({cell:h,unique:s[n][m].unique})}else{q.push({cell:p[o],unique:s[n][m].unique})}}r.push(q)}return r},_fnClone:function(y,x,l,h){var p=this,A,w,z,E,v,n,B,t,q,m,r,F;if(h){if(y.header!==null){y.header.parentNode.removeChild(y.header)}y.header=g(this.dom.header).clone(true,true)[0];y.header.className+=" DTFC_Cloned";y.header.style.width="100%";x.head.appendChild(y.header);m=this._fnCopyLayout(this.s.dt.aoHeader,l);r=g(">thead",y.header);r.empty();for(A=0,w=m.length;A<w;A++){r[0].appendChild(m[A].nTr)}this.s.dt.oApi._fnDrawHead(this.s.dt,m,true)}else{m=this._fnCopyLayout(this.s.dt.aoHeader,l);F=[];this.s.dt.oApi._fnDetectHeader(F,g(">thead",y.header)[0]);for(A=0,w=m.length;A<w;A++){for(z=0,E=m[A].length;z<E;z++){F[A][z].cell.className=m[A][z].cell.className;g("span.DataTables_sort_icon",F[A][z].cell).each(function(){this.className=g("span.DataTables_sort_icon",m[A][z].cell)[0].className})}}}this._fnEqualiseHeights("thead",this.dom.header,y.header);if(this.s.sHeightMatch=="auto"){g(">tbody>tr",p.dom.body).css("height","auto")}if(y.body!==null){y.body.parentNode.removeChild(y.body);y.body=null}y.body=g(this.dom.body).clone(true)[0];y.body.className+=" DTFC_Cloned";y.body.style.paddingBottom=this.s.dt.oScroll.iBarWidth+"px";y.body.style.marginBottom=(this.s.dt.oScroll.iBarWidth*2)+"px";if(y.body.getAttribute("id")!==null){y.body.removeAttribute("id")}g(">thead>tr",y.body).empty();g(">tfoot",y.body).remove();var s=g("tbody",y.body)[0];g(s).empty();if(this.s.dt.aiDisplay.length>0){var o=g(">thead>tr",y.body)[0];for(q=0;q<l.length;q++){B=l[q];t=g(this.s.dt.aoColumns[B].nTh).clone(true)[0];t.innerHTML="";var u=t.style;u.paddingTop="0";u.paddingBottom="0";u.borderTopWidth="0";u.borderBottomWidth="0";u.height=0;u.width=p.s.aiInnerWidths[B]+"px";o.appendChild(t)}g(">tbody>tr",p.dom.body).each(function(H){var I=this.cloneNode(false);I.removeAttribute("id");var j=p.s.dt.oFeatures.bServerSide===false?p.s.dt.aiDisplay[p.s.dt._iDisplayStart+H]:H;for(q=0;q<l.length;q++){var G=p.s.dt.aoData[j].anCells||p.s.dt.oApi._fnGetTdNodes(p.s.dt,j);B=l[q];if(G.length>0){t=g(G[B]).clone(true,true)[0];I.appendChild(t)}}s.appendChild(I)})}else{g(">tbody>tr",p.dom.body).each(function(i){t=this.cloneNode(true);t.className+=" DTFC_NoData";g("td",t).html("");s.appendChild(t)})}y.body.style.width="100%";y.body.style.margin="0";y.body.style.padding="0";if(h){if(typeof this.s.dt.oScroller!="undefined"){x.liner.appendChild(this.s.dt.oScroller.dom.force.cloneNode(true))}}x.liner.appendChild(y.body);this._fnEqualiseHeights("tbody",p.dom.body,y.body);if(this.s.dt.nTFoot!==null){if(h){if(y.footer!==null){y.footer.parentNode.removeChild(y.footer)}y.footer=g(this.dom.footer).clone(true,true)[0];y.footer.className+=" DTFC_Cloned";y.footer.style.width="100%";x.foot.appendChild(y.footer);m=this._fnCopyLayout(this.s.dt.aoFooter,l);var k=g(">tfoot",y.footer);k.empty();for(A=0,w=m.length;A<w;A++){k[0].appendChild(m[A].nTr)}this.s.dt.oApi._fnDrawHead(this.s.dt,m,true)}else{m=this._fnCopyLayout(this.s.dt.aoFooter,l);var C=[];this.s.dt.oApi._fnDetectHeader(C,g(">tfoot",y.footer)[0]);for(A=0,w=m.length;A<w;A++){for(z=0,E=m[A].length;z<E;z++){C[A][z].cell.className=m[A][z].cell.className}}}this._fnEqualiseHeights("tfoot",this.dom.footer,y.footer)}var D=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,g(">thead",y.header)[0]);g(D).each(function(j){B=l[j];this.style.width=p.s.aiInnerWidths[B]+"px"});if(p.s.dt.nTFoot!==null){D=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,g(">tfoot",y.footer)[0]);g(D).each(function(j){B=l[j];this.style.width=p.s.aiInnerWidths[B]+"px"})}},_fnGetTrNodes:function(j){var l=[];for(var k=0,h=j.childNodes.length;k<h;k++){if(j.childNodes[k].nodeName.toUpperCase()=="TR"){l.push(j.childNodes[k])}}return l},_fnEqualiseHeights:function(u,j,t){if(this.s.sHeightMatch=="none"&&u!=="thead"&&u!=="tfoot"){return}var q=this,n,k,h,m,y,x,p=j.getElementsByTagName(u)[0],r=t.getElementsByTagName(u)[0],l=g(">"+u+">tr:eq(0)",j).children(":first"),w=l.outerHeight()-l.height(),o=this._fnGetTrNodes(p),v=this._fnGetTrNodes(r),s=[];for(n=0,k=v.length;n<k;n++){y=o[n].offsetHeight;x=v[n].offsetHeight;h=x>y?x:y;if(this.s.sHeightMatch=="semiauto"){o[n]._DTTC_iHeight=h}s.push(h)}for(n=0,k=v.length;n<k;n++){v[n].style.height=s[n]+"px";o[n].style.height=s[n]+"px"}}};e.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"};e.version="3.0.0";g.fn.dataTable.FixedColumns=e;g.fn.DataTable.FixedColumns=e;return e};b(jQuery,jQuery.fn.dataTable)})(window,document);