|
|
|
(function(t){var e=function(e,a){var o=e.table();this.s={dt:e,host:t(o.container()).parent(),header:t(o.header()),footer:t(o.footer()),body:t(o.body()),container:t(o.container()),table:t(o.node()),delta:a};var i=this.s.host;"static"===i.css("position")&&i.css("position","relative"),this._attach(),this._size()};e.prototype={_size:function(){var e=this.s,a=e.dt,o=a.table(),i=t(e.table).offset().top,n=t("tr",e.body).eq(0).height(),s=e.host.height(),h=o.header().parentNode!==o.body().parentNode,r=e.delta;h||(o.header()&&(s-=e.header.height()),o.footer()&&(s-=e.footer.height())),s-=i,s-=e.container.height()-(i+e.table.height()),!isNaN(parseFloat(r))&&isFinite(r)&&(s-=r);var d=Math.floor(s/n);d!==1/0&&d!==-(1/0)&&!isNaN(d)&&d>0&&d!==a.page.len()&&a.page.len(d).draw()},_attach:function(){var e=this,a=t("<object/>").css({position:"absolute",top:0,left:0,height:"100%",width:"100%",zIndex:-1}).attr("type","text/html");a[0].onload=function(){var t=this.contentDocument.body,a=t.offsetHeight;this.contentDocument.defaultView.onresize=function(){var o=t.clientHeight||t.offsetHeight;o!==a&&(a=o,e._size())}},a.appendTo(this.s.host).attr("data","about:blank")}},t.fn.dataTable.PageResize=e,t.fn.DataTable.PageResize=e,t(document).on("init.dt",function(a,o){if("dt"===a.namespace){var i=new t.fn.dataTable.Api(o);(t(i.table().node()).hasClass("pageResize")||o.oInit.pageResize||t.fn.dataTable.defaults.pageResize)&&new e(i,o.oInit.pageResizeManualDelta)}})})(jQuery);
|