Added datatables.net plugins

This commit is contained in:
MatteoBiscosi 2022-03-04 12:06:01 +01:00
parent e3b408ac27
commit 93332f09e2
8 changed files with 81 additions and 75 deletions

View file

@ -0,0 +1,20 @@
/**
* (C) 2020-22 - ntop.org
* This file contains datatables.net extensions.
*/
/* See issue https://datatables.net/forums/discussion/44885 */
$.fn.dataTable.Api.registerPlural( 'columns().names()', 'column().name()', function ( setter ) {
return this.iterator( 'column', function ( settings, column ) {
var col = settings.aoColumns[column];
if ( setter !== undefined ) {
col.sName = setter;
return this;
}
else {
return col.sName;
}
}, 1 );
} );