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.
Plugins/features/rowFill/dataTables.rowFill.min.js

4 lines
1.0 KiB
JavaScript

/*! RowFill for DataTables v1.0.0
* 2018 SpryMedia Ltd - datatables.net/license
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return e(t,window,document)}):"object"==typeof exports?module.exports=function(t,n){return t=t||window,n&&n.fn.dataTable||(n=require("datatables.net")(t,n).$),e(n,0,t.document)}:e(jQuery,window,document)}(function(l,t,n,e){"use strict";function a(t,n){var e=t.table();this.s={dt:t,body:l(e.body())},this._attach()}a.prototype={_attach:function(){var d=this.s.dt,i=this.s.body;d.on("draw",function(){var t=d.columns(":visible").count(),n=d.rows({page:"current"}).count(),e="even",a="odd";(n=0===n?1:n)%2==0&&(e="odd",a="even");for(var o=0;o<d.page.len()-n;o++)i.append(l('<tr><td colspan="'+t+'">&nbsp;</td></tr>').addClass(o%2==0?e:a).addClass("dt-rowFill--filler"))})}},l.fn.dataTable.RowFill=a,l.fn.DataTable.RowFill=a,l(n).on("preInit.dt",function(t,n){"dt"===t.namespace&&(t=new l.fn.dataTable.Api(n),n.oInit.rowFill||l.fn.dataTable.defaults.rowFill)&&new a(t)})});