From 5ef60983787af4893ddb3006c5a65a5cc40e0e9f Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Sun, 31 Dec 2017 13:13:58 +0000 Subject: [PATCH] Features - scroll resize: Add min file and allow to work offline --- .../dataTables.scrollResize.min.js | 26 +++++++++++++++++++ features/scrollResize/dynamic.html | 6 ++--- features/scrollResize/dynamicVh.html | 6 ++--- features/scrollResize/index.html | 6 ++--- 4 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 features/scrollResize/dataTables.scrollResize.min.js diff --git a/features/scrollResize/dataTables.scrollResize.min.js b/features/scrollResize/dataTables.scrollResize.min.js new file mode 100644 index 0000000..0119793 --- /dev/null +++ b/features/scrollResize/dataTables.scrollResize.min.js @@ -0,0 +1,26 @@ +/*! + 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){var e=function(d){var c=this,b=d.table();this.s={dt:d,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");d.on("draw",function(){c._size()});this._attach();this._size()};e.prototype={_size:function(){var d=this.s,c=d.dt,b=c.table(),h=a(d.table).offset().top,g=d.host.height(),f=a("div.dataTables_scrollBody",b.container()),g=g-h-(d.container.height()- +(h+f.height()));a("div.dataTables_scrollBody",b.container()).css({maxHeight:g,height:g});c.fixedColumns&&c.fixedColumns().relayout()},_attach:function(){var d=this,c=a("