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.mjs

2 lines
759 B
JavaScript

/*! © SpryMedia Ltd - datatables.net/license */
import $ from"jquery";import DataTable from"datatables.net";var RowFill=function(t){var a=t.table();this.s={dt:t,body:$(a.body())},this._attach()};RowFill.prototype={_attach:function(){var n=this.s.dt,d=this.s.body;n.on("draw",function(){var t=n.columns(":visible").count(),a=n.rows({page:"current"}).count(),o="even",l="odd";(a=0===a?1:a)%2==0&&(o="odd",l="even");for(var e=0;e<n.page.len()-a;e++)d.append($('<tr><td colspan="'+t+'">&nbsp;</td></tr>').addClass(e%2==0?o:l).addClass("dt-rowFill--filler"))})}},DataTable.RowFill=RowFill,$(document).on("preInit.dt",function(t,a){"dt"===t.namespace&&(t=new DataTable.Api(a),a.oInit.rowFill||DataTable.defaults.rowFill)&&new RowFill(t)});export default DataTable;