X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fextras%2FScroller%2Fmedia%2Fjs%2FdataTables.scroller.min.js;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fextras%2FScroller%2Fmedia%2Fjs%2FdataTables.scroller.min.js;h=0cc129a866b78b9870f44887fcb0b4fb5836b168;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/extras/Scroller/media/js/dataTables.scroller.min.js b/webapp/resources/datatables-1.9.4/extras/Scroller/media/js/dataTables.scroller.min.js new file mode 100644 index 0000000..0cc129a --- /dev/null +++ b/webapp/resources/datatables-1.9.4/extras/Scroller/media/js/dataTables.scroller.min.js @@ -0,0 +1,40 @@ +/* + * File: dataTables.scroller.min.js + * Version: 1.1.0 + * Author: Allan Jardine (www.sprymedia.co.uk) + * + * Copyright 2011 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD (3 point) style license, as supplied with this software. + * + * 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 2011-2012 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 +*/ +(function(d,h,g){var e=function(a,b){!this instanceof e?alert("Scroller warning: Scroller must be initialised with the 'new' keyword."):("undefined"==typeof b&&(b={}),this.s={dt:a,tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,rowHeight:null,autoHeight:!0,viewportHeight:0,viewportRows:0,stateTO:null,drawTO:null},this.s=d.extend(this.s,e.oDefaults,b),this.dom={force:g.createElement("div"),scroller:null,table:null},this.s.dt.oScroller=this,this._fnConstruct())};e.prototype={fnRowToPixels:function(a){return a* +this.s.rowHeight},fnPixelsToRow:function(a){return parseInt(a/this.s.rowHeight,10)},fnScrollToRow:function(a,b){var c=this.fnRowToPixels(a);"undefined"==typeof b||b?d(this.dom.scroller).animate({scrollTop:c}):d(this.dom.scroller).scrollTop(c)},fnMeasure:function(a){this.s.autoHeight&&this._fnCalcRowHeight();this.s.viewportHeight=d(this.dom.scroller).height();this.s.viewportRows=parseInt(this.s.viewportHeight/this.s.rowHeight,10)+1;this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer; +this.s.trace&&console.log("Row height: "+this.s.rowHeight+" Viewport height: "+this.s.viewportHeight+" Viewport rows: "+this.s.viewportRows+" Display rows: "+this.s.dt._iDisplayLength);("undefined"==typeof a||a)&&this.s.dt.oInstance.fnDraw()},_fnConstruct:function(){var a=this;this.dom.force.style.position="absolute";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width="1px";this.dom.scroller=d("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0]; +this.dom.scroller.appendChild(this.dom.force);this.dom.scroller.style.position="relative";this.dom.table=d(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";d(this.s.dt.nTableWrapper).addClass("DTS");this.s.loadingIndicator&&d(this.dom.scroller.parentNode).css("position","relative").append('