X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fextras%2FFixedColumns%2Fmedia%2Fjs%2FFixedColumns.min.js;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fextras%2FFixedColumns%2Fmedia%2Fjs%2FFixedColumns.min.js;h=21e4a52256c252a69075a59c2362d1ee746a7d2b;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/extras/FixedColumns/media/js/FixedColumns.min.js b/webapp/resources/datatables-1.9.4/extras/FixedColumns/media/js/FixedColumns.min.js new file mode 100644 index 0000000..21e4a52 --- /dev/null +++ b/webapp/resources/datatables-1.9.4/extras/FixedColumns/media/js/FixedColumns.min.js @@ -0,0 +1,48 @@ +/* + * File: FixedColumns.min.js + * Version: 2.0.3 + * Author: Allan Jardine (www.sprymedia.co.uk) + * + * Copyright 2010-2010 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, available at: + * http://datatables.net/license_gpl2 + * http://datatables.net/license_bsd + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + */ +/* + GPL v2 or BSD 3 point style + @contact www.sprymedia.co.uk/contact + + @copyright Copyright 2010-2011 Allan Jardine, all rights reserved. + + This source file is free software, under either the GPL v2 license or a + BSD style license, available at: + http://datatables.net/license_gpl2 + http://datatables.net/license_bsd +*/ +var FixedColumns; +(function(b,q){FixedColumns=function(a,e){!this instanceof FixedColumns?alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword."):("undefined"==typeof e&&(e={}),this.s={dt:a.fnSettings(),iTableColumns:a.fnSettings().aoColumns.length,aiWidths:[],bOldIE:b.browser.msie&&("6.0"==b.browser.version||"7.0"==b.browser.version)},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}}},this.s.dt.oFixedColumns=this,this._fnConstruct(e))};FixedColumns.prototype={fnUpdate:function(){this._fnDraw(!0)},fnRedrawLayout:function(){this._fnGridLayout()},fnRecalculateHeight:function(a){a._DTTC_iHeight=null;a.style.height="auto"},fnSetRowHeight:function(a,e){var c=b(a).children(":first"),c=c.outerHeight()-c.height();b.browser.mozilla||b.browser.opera?a.style.height=e+ +"px":b(a).children().height(e-c)},_fnConstruct:function(a){var e,c=this;if("function"!=typeof this.s.dt.oInstance.fnVersionCheck||!0!==this.s.dt.oInstance.fnVersionCheck("1.8.0"))alert("FixedColumns "+FixedColumns.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");else 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"); +else{this.s=b.extend(!0,this.s,FixedColumns.defaults,a);this.dom.grid.dt=b(this.s.dt.nTable).parents("div.dataTables_scroll")[0];this.dom.scroller=b("div.dataTables_scrollBody",this.dom.grid.dt)[0];var a=b(this.dom.grid.dt).width(),f=0,g=0;b("tbody>tr:eq(0)>td",this.s.dt.nTable).each(function(a){e=b(this).outerWidth();c.s.aiWidths.push(e);a0)c.dom.grid.right.body.scrollTop=c.dom.scroller.scrollTop});b(q).resize(function(){c._fnGridLayout.call(c)}); +var d=!0;this.s.dt.aoDrawCallback=[{fn:function(){c._fnDraw.call(c,d);c._fnGridHeight(c);d=false},sName:"FixedColumns"}].concat(this.s.dt.aoDrawCallback);this._fnGridLayout();this._fnGridHeight();this.s.dt.oInstance.fnDraw(!1)}},_fnGridSetup:function(){this.dom.body=this.s.dt.nTable;this.dom.header=this.s.dt.nTHead.parentNode;this.dom.header.parentNode.parentNode.style.position="relative";var a=b('
')[0]; +nLeft=a.childNodes[0];nRight=a.childNodes[1];this.dom.grid.wrapper=a;this.dom.grid.left.wrapper=nLeft;this.dom.grid.left.head=nLeft.childNodes[0];this.dom.grid.left.body=nLeft.childNodes[1];0=this.s.iRightColumns)){var b,c=[];for(b=this.s.iTableColumns-this.s.iRightColumns;b=this.s.iLeftColumns)){var b,c=[];for(b=0;bthead",a.header);k.empty();d=0;for(h=l.length;dthead",a.header)[0]);d=0;for(h=l.length;dtbody>tr",g.dom.body).css("height","auto");null!==a.body&&(a.body.parentNode.removeChild(a.body),a.body=null); +a.body=b(this.dom.body).clone(!0)[0];a.body.className+=" DTFC_Cloned";a.body.style.paddingBottom=this.s.dt.oScroll.iBarWidth+"px";a.body.style.marginBottom=2*this.s.dt.oScroll.iBarWidth+"px";null!==a.body.getAttribute("id")&&a.body.removeAttribute("id");b(">thead>tr",a.body).empty();b(">tfoot",a.body).remove();var p=b("tbody",a.body)[0];b(p).empty();if(0thead>tr",a.body)[0];for(n=0;ntbody>tr",g.dom.body).each(function(a){var d=this.cloneNode(false),a=g.s.dt.oFeatures.bServerSide===false?g.s.dt.aiDisplay[g.s.dt._iDisplayStart+a]:a;for(n=0;ntbody>tr", +g.dom.body).each(function(){j=this.cloneNode(true);j.className=j.className+" DTFC_NoData";b("td",j).html("");p.appendChild(j)});a.body.style.width="100%";e.body.appendChild(a.body);this._fnEqualiseHeights("tbody",g.dom.body,a.body);if(null!==this.s.dt.nTFoot){if(f){null!==a.footer&&a.footer.parentNode.removeChild(a.footer);a.footer=b(this.dom.footer).clone(!0)[0];a.footer.className+=" DTFC_Cloned";a.footer.style.width="100%";e.foot.appendChild(a.footer);l=this._fnCopyLayout(this.s.dt.aoFooter,c); +e=b(">tfoot",a.footer);e.empty();d=0;for(h=l.length;dtfoot",a.footer)[0]);d=0;for(h=l.length;dthead",a.header)[0]);b(h).each(function(a){m=c[a]; +this.style.width=g.s.aiWidths[m]+"px"});null!==g.s.dt.nTFoot&&(h=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,b(">tfoot",a.footer)[0]),b(h).each(function(a){m=c[a];this.style.width=g.s.aiWidths[m]+"px"}))},_fnGetTrNodes:function(a){for(var b=[],c=0,f=a.childNodes.length;c"+a+">tr:eq(0)",e).children(":first"),a=a.outerHeight()-a.height(),d=this._fnGetTrNodes(d),h=this._fnGetTrNodes(c),c=0,e=h.length;cf?g:f,"semiauto"==this.s.sHeightMatch&&(d[c]._DTTC_iHeight=f),b.browser.msie&&8>b.browser.version)?(b(h[c]).children().height(f-a),b(d[c]).children().height(f- +a)):(h[c].style.height=f+"px",d[c].style.height=f+"px")}};FixedColumns.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sLeftWidth:"fixed",iLeftWidth:null,sRightWidth:"fixed",iRightWidth:null,sHeightMatch:"semiauto"};FixedColumns.prototype.CLASS="FixedColumns";FixedColumns.VERSION="2.0.3"})(jQuery,window,document);