X-Git-Url: http://spangdorfia.com/code/?p=kismet-logviewer.git;a=blobdiff_plain;f=logviewer%2Fstatic%2Fjs%2FdataTables.scrollResize.min.js;fp=logviewer%2Fstatic%2Fjs%2FdataTables.scrollResize.min.js;h=db35d38a9ac2be1c3b5455a4ee3c3aa22001cbb4;hp=0000000000000000000000000000000000000000;hb=d4fe9834a60132f118a1e8ee68e5221b28e10ccc;hpb=662453a92f419012cde6a79dc38df89c5be4d91b diff --git a/logviewer/static/js/dataTables.scrollResize.min.js b/logviewer/static/js/dataTables.scrollResize.min.js new file mode 100644 index 0000000..db35d38 --- /dev/null +++ b/logviewer/static/js/dataTables.scrollResize.min.js @@ -0,0 +1,27 @@ +/*! + Copyright 2015 SpryMedia Ltd. + + License MIT - http://datatables.net/license/mit + + This feature plug-in for DataTables will automatically change the DataTables + page length in order to fit inside its container. This can be particularly + useful for control panels and other interfaces which resize dynamically with + the user's browser window instead of scrolling. + + Page resizing in DataTables can be enabled by using any one of the following + options: + + * Setting the `scrollResize` parameter in the DataTables initialisation to + be true - i.e. `scrollResize: true` + * Setting the `scrollResize` parameter to be true in the DataTables + defaults (thus causing all tables to have this feature) - i.e. + `$.fn.dataTable.defaults.scrollResize = true`. + * Creating a new instance: `new $.fn.dataTable.ScrollResize( table );` where + `table` is a DataTable's API instance. + ScrollResize for DataTables v1.0.0 + 2015 SpryMedia Ltd - datatables.net/license +*/ +(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return a(e,window,document)}):"object"===typeof exports?module.exports=function(e,f){e||(e=window);f&&f.fn.dataTable||(f=require("datatables.net")(e,f).$);return a(f,e,e.document)}:a(jQuery,window,document)})(function(a,e,f,n){var k=function(c){var d=this,b=c.table();this.s={dt:c,host:a(b.container()).parent(),header:a(b.header()),footer:a(b.footer()),body:a(b.body()),container:a(b.container()),table:a(b.node())}; +b=this.s.host;"static"===b.css("position")&&b.css("position","relative");c.on("draw",function(){d._size()});this._attach();this._size()};k.prototype={_size:function(){var c=this.s,d=c.dt.table(),b=a(c.table).offset().top,g=c.host.height(),h=a("div.dataTables_scrollBody",d.container());g=g-b-(c.container.height()-(b+h.height()));a("div.dataTables_scrollBody",d.container()).css({maxHeight:g,height:g})},_attach:function(){var c=this,d=a("