@ -4,13 +4,13 @@
*
* To rebuild or modify this file with the latest versions of the included
* software please visit :
* https : //datatables.net/download/#bs5/dt-2.2.2
* https : //datatables.net/download/#bs5/dt-2.3.1
*
* Included libraries :
* DataTables 2.2 . 2
* DataTables 2.3 . 1
* /
/ * ! D a t a T a b l e s 2 . 2 . 2
/ * ! D a t a T a b l e s 2 . 3 . 1
* © SpryMedia Ltd - datatables . net / license
* /
@ -101,15 +101,19 @@
var defaults = DataTable . defaults ;
var $this = $ ( this ) ;
/* Sanity check */
// Sanity check
if ( this . nodeName . toLowerCase ( ) != 'table' )
{
_ fnLog ( null , 0 , 'Non-table node initialisation (' + this . nodeName + ')' , 2 ) ;
return ;
}
$ ( this ) . trigger ( 'options.dt' , oInit ) ;
// Special case for options
if ( oInit . on && oInit . on . options ) {
_ fnListener ( $this , 'options' , oInit . on . options ) ;
}
$this . trigger ( 'options.dt' , oInit ) ;
/* Backwards compatibility for the defaults */
_ fnCompatOpts ( defaults ) ;
@ -248,6 +252,9 @@
"caption" ,
"layout" ,
"orderDescReverse" ,
"orderIndicators" ,
"orderHandler" ,
"titleRow" ,
"typeDetect" ,
[ "iCookieDuration" , "iStateDuration" ] , // backwards compat
[ "oSearch" , "oPreviousSearch" ] ,
@ -276,6 +283,13 @@
oSettings . rowIdFn = _ fnGetObjectDataFn ( oInit . rowId ) ;
// Add event listeners
if ( oInit . on ) {
Object . keys ( oInit . on ) . forEach ( function ( key ) {
_ fnListener ( $this , key , oInit . on [ key ] ) ;
} ) ;
}
/* Browser support detection */
_ fnBrowserDetect ( oSettings ) ;
@ -336,7 +350,7 @@
/ * H T M L 5 a t t r i b u t e d e t e c t i o n - b u i l d a n m D a t a o b j e c t a u t o m a t i c a l l y i f t h e
* attributes are found
* /
var rowOne = $this . children ( 'tbody' ) . find ( 'tr' ) . eq ( 0 ) ;
var rowOne = $this . children ( 'tbody' ) . find ( 'tr:first-child ' ) . eq ( 0 ) ;
if ( rowOne . length ) {
var a = function ( cell , name ) {
@ -494,6 +508,13 @@
* @ namespace
* /
DataTable . ext = _ ext = {
/ * *
* DataTables build type ( expanded by the download builder )
*
* @ type string
* /
builder : "bs5/dt-2.3.1" ,
/ * *
* Buttons . For use with the Buttons extension for DataTables . This is
* defined here so other extensions can define buttons regardless of load
@ -506,20 +527,20 @@
/ * *
* Element class names
* ColumnControl buttons and content
*
* @ type object
* @ default { }
* /
classes : { } ,
ccContent : { } ,
/ * *
* DataTables build type ( expanded by the download builder )
* Element class names
*
* @ type string
* @ type object
* @ default { }
* /
builder : "bs5/dt-2.2.2" ,
classes : { } ,
/ * *
@ -1887,6 +1908,26 @@
init . scrollX = init . scrollX ? '100%' : '' ;
}
// Objects for ordering
if ( typeof init . bSort === 'object' ) {
init . orderIndicators = init . bSort . indicators !== undefined ? init . bSort . indicators : true ;
init . orderHandler = init . bSort . handler !== undefined ? init . bSort . handler : true ;
init . bSort = true ;
}
else if ( init . bSort === false ) {
init . orderIndicators = false ;
init . orderHandler = false ;
}
else if ( init . bSort === true ) {
init . orderIndicators = true ;
init . orderHandler = true ;
}
// Which cells are the title cells?
if ( typeof init . bSortCellsTop === 'boolean' ) {
init . titleRow = init . bSortCellsTop ;
}
// Column search objects are in an array, so it needs to be converted
// element by element
var searchCols = init . aoSearchCols ;
@ -3264,7 +3305,7 @@
* @ param { * } settings DataTables settings
* @ param { * } source Source layout array
* @ param { * } incColumns What columns should be included
* @ returns Layout array
* @ returns Layout array in column index order
* /
function _ fnHeaderLayout ( settings , source , incColumns )
{
@ -3548,7 +3589,9 @@
_ fnDraw ( settings ) ;
settings . api . one ( 'draw' , function ( ) {
settings . _ drawHold = false ;
} ) ;
}
@ -3560,10 +3603,9 @@
var zero = oLang . sZeroRecords ;
var dataSrc = _ fnDataSource ( settings ) ;
if (
( settings . iDraw < 1 && dataSrc === 'ssp' ) ||
( settings . iDraw <= 1 && dataSrc === 'ajax' )
) {
// Make use of the fact that settings.json is only set once the initial data has
// been loaded. Show loading when that isn't the case
if ( ( dataSrc === 'ssp' || dataSrc === 'ajax' ) && ! settings . json ) {
zero = oLang . sLoadingRecords ;
}
else if ( oLang . sEmptyTable && settings . fnRecordsTotal ( ) === 0 )
@ -3933,6 +3975,7 @@
var rows = $ ( thead ) . children ( 'tr' ) ;
var row , cell ;
var i , k , l , iLen , shifted , column , colspan , rowspan ;
var titleRow = settings . titleRow ;
var isHeader = thead && thead . nodeName . toLowerCase ( ) === 'thead' ;
var layout = [ ] ;
var unique ;
@ -3961,6 +4004,7 @@
cell . nodeName . toUpperCase ( ) == 'TH'
) {
var cols = [ ] ;
var jqCell = $ ( cell ) ;
// Get the col and rowspan attributes from the DOM and sanitise them
colspan = cell . getAttribute ( 'colspan' ) * 1 ;
@ -3981,7 +4025,7 @@
if ( write ) {
if ( unique ) {
// Allow column options to be set from HTML attributes
_ fnColumnOptions ( settings , shifted , $ ( cell ) . data ( ) ) ;
_ fnColumnOptions ( settings , shifted , jqCell . data ( ) ) ;
// Get the width for the column. This can be defined from the
// width attribute, style attribute or `columns.width` option
@ -3998,8 +4042,15 @@
// Column title handling - can be user set, or read from the DOM
// This happens before the render, so the original is still in place
if ( columnDef . sTitle !== null && ! columnDef . autoTitle ) {
if (
( titleRow === true && i === 0 ) || // top row
( titleRow === false && i === rows . length - 1 ) || // bottom row
( titleRow === i ) || // specific row
( titleRow === null )
) {
cell . innerHTML = columnDef . sTitle ;
}
}
if ( ! columnDef . sTitle && unique ) {
columnDef . sTitle = _ stripHtml ( cell . innerHTML ) ;
@ -4016,12 +4067,12 @@
// Fall back to the aria-label attribute on the table header if no ariaTitle is
// provided.
if ( ! columnDef . ariaTitle ) {
columnDef . ariaTitle = $ ( cell ) . attr ( "aria-label" ) || columnDef . sTitle ;
columnDef . ariaTitle = jqCell . attr ( "aria-label" ) || columnDef . sTitle ;
}
// Column specific class names
if ( columnDef . className ) {
$ ( cell ) . addClass ( columnDef . className ) ;
jqCell . addClass ( columnDef . className ) ;
}
}
@ -4033,11 +4084,28 @@
. appendTo ( cell ) ;
}
if ( isHeader && $ ( 'span.dt-column-order' , cell ) . length === 0 ) {
if (
settings . orderIndicators &&
isHeader &&
jqCell . filter ( ':not([data-dt-order=disable])' ) . length !== 0 &&
jqCell . parent ( ':not([data-dt-order=disable])' ) . length !== 0 &&
$ ( 'span.dt-column-order' , cell ) . length === 0
) {
$ ( '<span>' )
. addClass ( 'dt-column-order' )
. appendTo ( cell ) ;
}
// We need to wrap the elements in the header in another element to use flexbox
// layout for those elements
var headerFooter = isHeader ? 'header' : 'footer' ;
if ( $ ( 'span.dt-column-' + headerFooter , cell ) . length === 0 ) {
$ ( '<div>' )
. addClass ( 'dt-column-' + headerFooter )
. append ( cell . childNodes )
. appendTo ( cell ) ;
}
}
// If there is col / rowspan, copy the information into the layout grid
@ -4188,6 +4256,11 @@
// Allow plug-ins and external processes to modify the data
_ fnCallbackFire ( oSettings , null , 'preXhr' , [ oSettings , data , baseAjax ] , true ) ;
// Custom Ajax option to submit the parameters as a JSON string
if ( baseAjax . submitAs === 'json' && typeof data === 'object' ) {
baseAjax . data = JSON . stringify ( data ) ;
}
if ( typeof ajax === 'function' )
{
// Is a function - let the caller define what needs to be done
@ -5688,17 +5761,22 @@
function _ fnSortInit ( settings ) {
var target = settings . nTHead ;
var headerRows = target . querySelectorAll ( 'tr' ) ;
var legacyTop = settings . bSortCellsTop ;
var titleRow = settings . titleRow ;
var notSelector = ':not([data-dt-order="disable"]):not([data-dt-order="icon-only"])' ;
// Legacy support for `orderCellsTop`
if ( legacyTop === true ) {
if ( titleRow === true ) {
target = headerRows [ 0 ] ;
}
else if ( legacyTop === false ) {
else if ( titleRow === false ) {
target = headerRows [ headerRows . length - 1 ] ;
}
else if ( titleRow !== null ) {
target = headerRows [ titleRow ] ;
}
// else - all rows
if ( settings . orderHandler ) {
_ fnSortAttachListener (
settings ,
target ,
@ -5706,6 +5784,7 @@
? 'tr' + notSelector + ' th' + notSelector + ', tr' + notSelector + ' td' + notSelector
: 'th' + notSelector + ', td' + notSelector
) ;
}
// Need to resolve the user input array into our internal structure
var order = [ ] ;
@ -5720,6 +5799,8 @@
var run = false ;
var columns = column === undefined
? _ fnColumnsFromHeader ( e . target )
: Array . isArray ( column )
? column
: [ column ] ;
if ( columns . length ) {
@ -6343,16 +6424,19 @@
// A column name was stored and should be used for restore
if ( typeof col [ 0 ] === 'string' ) {
// Find the name from the current list of column names
var idx = currentNames . indexOf ( col [ 0 ] ) ;
// Find the name from the current list of column names, or fallback to index 0
set [ 0 ] = idx >= 0
? idx
: 0 ;
if ( idx < 0 ) {
// If the column was not found ignore it and continue
return ;
}
set [ 0 ] = idx ;
}
else if ( set [ 0 ] >= columns . length ) {
// If a column name, but it is out of bounds, set to 0
set [ 0 ] = 0 ;
// If the column index is out of bounds ignore it and continue
return ;
}
settings . aaSorting . push ( set ) ;
@ -6765,6 +6849,23 @@
}
}
/ * *
* Add one or more listeners to the table
*
* @ param { * } that JQ for the table
* @ param { * } name Event name
* @ param { * } src Listener ( s )
* /
function _ fnListener ( that , name , src ) {
if ( ! Array . isArray ( src ) ) {
src = [ src ] ;
}
for ( i = 0 ; i < src . length ; i ++ ) {
that . on ( name + '.dt' , src [ i ] ) ;
}
}
/ * *
@ -7421,12 +7522,24 @@
[ 'footer' , 'aoFooter' ] ,
] . forEach ( function ( item ) {
_ api_register ( 'table().' + item [ 0 ] + '.structure()' , function ( selector ) {
var indexes = this . columns ( selector ) . indexes ( ) . flatten ( ) ;
var indexes = this . columns ( selector ) . indexes ( ) . flatten ( ) . toArray ( ) ;
var ctx = this . context [ 0 ] ;
var structure = _ fnHeaderLayout ( ctx , ctx [ item [ 1 ] ] , indexes ) ;
// The structure is in column index order - but from this method we want the return to be
// in the columns() selector API order. In order to do that we need to map from one form
// to the other
var orderedIndexes = indexes . slice ( ) . sort ( function ( a , b ) {
return a - b ;
} ) ;
return _ fnHeaderLayout ( ctx , ctx [ item [ 1 ] ] , indexes ) ;
return structure . map ( function ( row ) {
return indexes . map ( function ( colIdx ) {
return row [ orderedIndexes . indexOf ( colIdx ) ] ;
} ) ;
} ) ;
} ) ;
} ) ;
} )
_ api_registerPlural ( 'tables().containers()' , 'table().container()' , function ( ) {
@ -7775,7 +7888,7 @@
{
var
out = [ ] , res ,
a , i , ien , j , jen ,
i , ien ,
selectorType = typeof selector ;
// Can't just check for isArray here, as an API or jQuery instance might be
@ -7785,13 +7898,7 @@
}
for ( i = 0 , ien = selector . length ; i < ien ; i ++ ) {
// Only split on simple strings - complex expressions will be jQuery selectors
a = selector [ i ] && selector [ i ] . split && ! selector [ i ] . match ( /[[(:]/ ) ?
selector [ i ] . split ( ',' ) :
[ selector [ i ] ] ;
for ( j = 0 , jen = a . length ; j < jen ; j ++ ) {
res = selectFn ( typeof a [ j ] === 'string' ? ( a [ j ] ) . trim ( ) : a [ j ] ) ;
res = selectFn ( typeof selector [ i ] === 'string' ? selector [ i ] . trim ( ) : selector [ i ] ) ;
// Remove empty items
res = res . filter ( function ( item ) {
@ -7802,7 +7909,6 @@
out = out . concat ( res ) ;
}
}
}
// selector extensions
var ext = _ ext . selector [ type ] ;
@ -7829,6 +7935,7 @@
}
return $ . extend ( {
columnOrder : 'implied' ,
search : 'none' ,
order : 'current' ,
page : 'all'
@ -8590,23 +8697,60 @@
var __ column_header = function ( settings , column , row ) {
var header = settings . aoHeader ;
var target = row !== undefined
? row
: settings . bSortCellsTop // legacy support
? 0
: header . length - 1 ;
var titleRow = settings . titleRow ;
var target = null ;
if ( row !== undefined ) {
target = row ;
}
else if ( titleRow === true ) { // legacy orderCellsTop support
target = 0 ;
}
else if ( titleRow === false ) {
target = header . length - 1 ;
}
else if ( titleRow !== null ) {
target = titleRow ;
}
else {
// Automatic - find the _last_ unique cell from the top that is not empty (last for
// backwards compatibility)
for ( var i = 0 ; i < header . length ; i ++ ) {
if ( header [ i ] [ column ] . unique && $ ( 'span.dt-column-title' , header [ i ] [ column ] . cell ) . text ( ) ) {
target = i ;
}
}
if ( target === null ) {
target = 0 ;
}
}
return header [ target ] [ column ] . cell ;
} ;
var __ column_header_cells = function ( header ) {
var out = [ ] ;
for ( var i = 0 ; i < header . length ; i ++ ) {
for ( var j = 0 ; j < header [ i ] . length ; j ++ ) {
var cell = header [ i ] [ j ] . cell ;
if ( ! out . includes ( cell ) ) {
out . push ( cell ) ;
}
}
}
return out ;
}
var __ column_selector = function ( settings , selector , opts )
{
var
columns = settings . aoColumns ,
names = _ pluck ( columns , 'sName' ) ,
titles = _ pluck ( columns , 'sTitle' ) ,
cells = DataTable . util . get ( '[].[].cell' ) ( settings . aoHeader ) ,
nodes = _ unique ( _ flatten ( [ ] , cells ) ) ;
names , titles ,
nodes = __ column_header_cells ( settings . aoHeader ) ;
var run = function ( s ) {
var selInt = _ intVal ( s ) ;
@ -8678,12 +8822,21 @@
} ) ;
case 'name' :
// Don't get names, unless needed, and only get once if it is
if ( ! names ) {
names = _ pluck ( columns , 'sName' ) ;
}
// match by name. `names` is column index complete and in order
return names . map ( function ( name , i ) {
return name === match [ 1 ] ? i : null ;
} ) ;
case 'title' :
if ( ! titles ) {
titles = _ pluck ( columns , 'sTitle' ) ;
}
// match by column title
return titles . map ( function ( title , i ) {
return title === match [ 1 ] ? i : null ;
@ -8722,7 +8875,11 @@
[ ] ;
} ;
return _ selector_run ( 'column' , selector , run , settings , opts ) ;
var selected = _ selector_run ( 'column' , selector , run , settings , opts ) ;
return opts . columnOrder && opts . columnOrder === 'index'
? selected . sort ( function ( a , b ) { return a - b ; } )
: selected ; // implied
} ;
@ -8846,6 +9003,12 @@
} , 1 ) ;
} ) ;
_ api_registerPlural ( 'columns().names()' , 'column().name()' , function ( ) {
return this . iterator ( 'column' , function ( settings , column ) {
return settings . aoColumns [ column ] . sName ;
} , 1 ) ;
} ) ;
_ api_registerPlural ( 'columns().nodes()' , 'column().nodes()' , function ( ) {
return this . iterator ( 'column-rows' , function ( settings , column , i , j , rows ) {
return _ pluck_order ( settings . aoData , rows , 'anCells' , column ) ;
@ -9272,7 +9435,10 @@
// otherwise a 2D array was passed in
return this . iterator ( 'table' , function ( settings ) {
settings . aaSorting = Array . isArray ( order ) ? order . slice ( ) : order ;
var resolved = [ ] ;
_ fnSortResolve ( settings , resolved , order ) ;
settings . aaSorting = resolved ;
} ) ;
} ) ;
@ -9398,7 +9564,7 @@
var fixed = settings . searchFixed ;
if ( ! name ) {
return Object . keys ( fixed )
return Object . keys ( fixed ) ;
}
else if ( search === undefined ) {
return fixed [ name ] ;
@ -9465,10 +9631,10 @@
var fixed = settings . aoColumns [ colIdx ] . searchFixed ;
if ( ! name ) {
return Object . keys ( fixed )
return Object . keys ( fixed ) ;
}
else if ( search === undefined ) {
return fixed [ name ] ;
return fixed [ name ] || null ;
}
else if ( search === null ) {
delete fixed [ name ] ;
@ -9920,14 +10086,9 @@
jqTable . append ( tfoot ) ;
}
// Clean up the header
$ ( thead ) . find ( 'span.dt-column-order' ) . remove ( ) ;
$ ( thead ) . find ( 'span.dt-column-title' ) . each ( function ( ) {
var title = $ ( this ) . html ( ) ;
$ ( this ) . parent ( ) . append ( title ) ;
$ ( this ) . remove ( ) ;
} ) ;
// Clean up the header / footer
cleanHeader ( thead , 'header' ) ;
cleanHeader ( tfoot , 'footer' ) ;
settings . colgroup . remove ( ) ;
settings . aaSorting = [ ] ;
@ -9949,7 +10110,6 @@
orderClasses . isDesc
)
. css ( 'width' , '' )
. removeAttr ( 'data-dt-column' )
. removeAttr ( 'aria-sort' ) ;
// Add the TR elements back into the table in their original order
@ -10030,6 +10190,19 @@
: resolved ;
} ) ;
// Needed for header and footer, so pulled into its own function
function cleanHeader ( node , className ) {
$ ( node ) . find ( 'span.dt-column-order' ) . remove ( ) ;
$ ( node ) . find ( 'span.dt-column-title' ) . each ( function ( ) {
var title = $ ( this ) . html ( ) ;
$ ( this ) . parent ( ) . parent ( ) . append ( title ) ;
$ ( this ) . remove ( ) ;
} ) ;
$ ( node ) . find ( 'div.dt-column-' + className ) . remove ( ) ;
$ ( 'th, td' , node ) . removeAttr ( 'data-dt-column' ) ;
}
/ * *
* Version string for plug - ins to check compatibility . Allowed format is
* ` a.b.c-d ` where : a : int , b : int , c : int , d : string ( dev | beta | alpha ) . ` d ` is used
@ -10038,7 +10211,7 @@
* @ type string
* @ default Version number
* /
DataTable . version = "2.2.2 " ;
DataTable . version = "2.3.1 " ;
/ * *
* Private data store , containing all of the settings objects that are
@ -10645,6 +10818,10 @@
"bSortCellsTop" : null ,
/** Specify which row is the title row in the header. Replacement for bSortCellsTop */
titleRow : null ,
/ * *
* Enable or disable the addition of the classes ` sorting \_ 1 ` , ` sorting \_ 2 ` and
* ` sorting \_ 3 ` to the columns which are currently being sorted on . This is
@ -10922,6 +11099,13 @@
1 : "entry"
} ,
/ * *
* Page length options
* /
lengthLabels : {
'-1' : 'All'
} ,
/ * *
* This string is shown in preference to ` zeroRecords ` when the table is
* empty of data ( regardless of filtering ) . Note that this is an optional
@ -11192,7 +11376,10 @@
/ * *
* For server - side processing - use the data from the DOM for the first draw
* /
iDeferLoading : null
iDeferLoading : null ,
/** Event listeners */
on : null
} ;
_ fnHungarianMap ( DataTable . defaults ) ;
@ -12019,10 +12206,7 @@
/ * *
* Indicate that if multiple rows are in the header and there is more than
* one unique cell per column , if the top one ( true ) or bottom one ( false )
* should be used for sorting / title by DataTables .
* Note that this parameter will be set by the initialisation routine . To
* set a default use { @ link DataTable . defaults } .
* one unique cell per column . Replaced by titleRow
* /
"bSortCellsTop" : null ,
@ -12147,7 +12331,19 @@
resizeObserver : null ,
/** Keep a record of the last size of the container, so we can skip duplicates */
containerWidth : - 1
containerWidth : - 1 ,
/** Reverse the initial order of the data set on desc ordering */
orderDescReverse : null ,
/** Show / hide ordering indicators in headers */
orderIndicators : true ,
/** Default ordering listener */
orderHandler : true ,
/** Title row indicator */
titleRow : null
} ;
/ * *
@ -12977,7 +13173,7 @@
cell . addClass ( classes . order . none ) ;
}
var legacyTop = settings . bSortCellsTop ;
var titleRow = settings . titleRow ;
var headerRows = cell . closest ( 'thead' ) . find ( 'tr' ) ;
var rowIdx = cell . parent ( ) . index ( ) ;
@ -12987,11 +13183,10 @@
cell . attr ( 'data-dt-order' ) === 'disable' ||
cell . parent ( ) . attr ( 'data-dt-order' ) === 'disable' ||
// Legacy support for `orderCellsTop`. If it is set, then cells
// which are not in the top or bottom row of the header (depending
// on the value) do not get the sorting classes applied to them
( legacyTop === true && rowIdx !== 0 ) ||
( legacyTop === false && rowIdx !== headerRows . length - 1 )
// titleRow support, for defining a specific row in the header
( titleRow === true && rowIdx !== 0 ) ||
( titleRow === false && rowIdx !== headerRows . length - 1 ) ||
( typeof titleRow === 'number' && rowIdx !== titleRow )
) {
return ;
}
@ -13001,7 +13196,7 @@
// `DT` namespace will allow the event to be removed automatically
// on destroy, while the `dt` namespaced event is the one we are
// listening for
$ ( settings . nTable ) . on ( 'order.dt.DT column-visibility.dt.DT' , function ( e , ctx ) {
$ ( settings . nTable ) . on ( 'order.dt.DT column-visibility.dt.DT' , function ( e , ctx , column ) {
if ( settings !== ctx ) { // need to check this this is the host
return ; // table, not a nested one
}
@ -13012,6 +13207,16 @@
return ;
}
var orderedColumns = _ pluck ( sorting , 'col' ) ;
// This handler is only needed on column visibility if the column is part of the
// ordering. If it isn't, then we can bail out to save performance. It could be a
// separate event handler, but this is a balance between code reuse / size and performance
// console.log(e, e.name, column, orderedColumns, orderedColumns.includes(column))
if ( e . type === 'column-visibility' && ! orderedColumns . includes ( column ) ) {
return ;
}
var i ;
var orderClasses = classes . order ;
var columns = ctx . api . columns ( cell ) ;
@ -13020,8 +13225,8 @@
var ariaType = '' ;
var indexes = columns . indexes ( ) ;
var sortDirs = columns . orderable ( true ) . flatten ( ) ;
var orderedColumns = _ pluck ( sorting , 'col' ) ;
var tabIndex = settings . iTabIndex ;
var canOrder = ctx . orderHandler && orderable ;
cell
. removeClass (
@ -13029,8 +13234,8 @@
orderClasses . isDesc
)
. toggleClass ( orderClasses . none , ! orderable )
. toggleClass ( orderClasses . canAsc , orderable && sortDirs . includes ( 'asc' ) )
. toggleClass ( orderClasses . canDesc , orderable && sortDirs . includes ( 'desc' ) ) ;
. toggleClass ( orderClasses . canAsc , canOrder && sortDirs . includes ( 'asc' ) )
. toggleClass ( orderClasses . canDesc , canOrder && sortDirs . includes ( 'desc' ) ) ;
// Determine if all of the columns that this cell covers are included in the
// current ordering
@ -13789,12 +13994,17 @@
} ) ;
for ( i = 0 ; i < lengths . length ; i ++ ) {
select [ 0 ] [ i ] = new Option (
typeof language [ i ] === 'number' ?
// Attempt to look up the length from the i18n options
var label = settings . api . i18n ( 'lengthLabels.' + lengths [ i ] , null ) ;
if ( label === null ) {
// If not present, fallback to old style
label = typeof language [ i ] === 'number' ?
settings . fnFormatNumber ( language [ i ] ) :
language [ i ] ,
lengths [ i ]
) ;
language [ i ] ;
}
select [ 0 ] [ i ] = new Option ( label , lengths [ i ] ) ;
}
// add for and id to label and input