You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
1.5 KiB
JavaScript
20 lines
1.5 KiB
JavaScript
/*!
|
|
Copyright 2018 SpryMedia Ltd.
|
|
|
|
License MIT - http://datatables.net/license/mit
|
|
|
|
This feature plug-in for DataTables will automatically insert temporary rows
|
|
into a DataTable that draws a page that is less than the configured page
|
|
length. This can be handy to ensure that your table always as (e.g.) 10 rows
|
|
visible.
|
|
|
|
Filler rows have the class `dt-rowFill--filler` assigned to them allowing for
|
|
additional styling (e.g. reducing opacity).
|
|
|
|
To enable for a table add `rowFill: true` to your DataTables configuration.
|
|
RowFill for DataTables v1.0.0
|
|
2018 SpryMedia Ltd - datatables.net/license
|
|
*/
|
|
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net")(a,b).$);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,k){var d=function(e,a){a=e.table();this.s={dt:e,body:c(a.body())};this._attach()};d.prototype={_attach:function(){var a=this.s.dt,b=this.s.body;a.on("draw",function(){var e=a.columns(":visible").count(),
|
|
d=a.rows({page:"current"}).count(),g="even",h="odd";0===d&&(d=1);0===d%2&&(g="odd",h="even");for(var f=0;f<a.page.len()-d;f++)b.append(c('<tr><td colspan="'+e+'"> </td></tr>').addClass(0===f%2?g:h).addClass("dt-rowFill--filler"))})}};c.fn.dataTable.RowFill=d;c.fn.DataTable.RowFill=d;c(b).on("preInit.dt",function(a,b){"dt"===a.namespace&&(a=new c.fn.dataTable.Api(b),(b.oInit.rowFill||c.fn.dataTable.defaults.rowFill)&&new d(a))})});
|