update dependencies and push version
This commit is contained in:
158
vendor/datatables/jquery.dataTables.js
vendored
158
vendor/datatables/jquery.dataTables.js
vendored
@@ -1,15 +1,15 @@
|
||||
/*! DataTables 1.10.19
|
||||
* ©2008-2018 SpryMedia Ltd - datatables.net/license
|
||||
/*! DataTables 1.10.20
|
||||
* ©2008-2019 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @summary DataTables
|
||||
* @description Paginate, search and order HTML tables
|
||||
* @version 1.10.19
|
||||
* @version 1.10.20
|
||||
* @file jquery.dataTables.js
|
||||
* @author SpryMedia Ltd
|
||||
* @contact www.datatables.net
|
||||
* @copyright Copyright 2008-2018 SpryMedia Ltd.
|
||||
* @copyright Copyright 2008-2019 SpryMedia Ltd.
|
||||
*
|
||||
* This source file is free software, available under the following license:
|
||||
* MIT license - http://datatables.net/license
|
||||
@@ -898,7 +898,7 @@
|
||||
_fnCamelToHungarian( defaults.column, defaults.column, true );
|
||||
|
||||
/* Setting up the initialisation object */
|
||||
_fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) );
|
||||
_fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ), true );
|
||||
|
||||
|
||||
|
||||
@@ -1334,7 +1334,7 @@
|
||||
var _api_registerPlural; // DataTable.Api.registerPlural
|
||||
|
||||
var _re_dic = {};
|
||||
var _re_new_lines = /[\r\n]/g;
|
||||
var _re_new_lines = /[\r\n\u2028]/g;
|
||||
var _re_html = /<.*?>/g;
|
||||
|
||||
// This is not strict ISO8601 - Date.parse() is quite lax, although
|
||||
@@ -2024,7 +2024,7 @@
|
||||
_fnCompatCols( oOptions );
|
||||
|
||||
// Map camel case parameters to their Hungarian counterparts
|
||||
_fnCamelToHungarian( DataTable.defaults.column, oOptions );
|
||||
_fnCamelToHungarian( DataTable.defaults.column, oOptions, true );
|
||||
|
||||
/* Backwards compatibility for mDataProp */
|
||||
if ( oOptions.mDataProp !== undefined && !oOptions.mData )
|
||||
@@ -3078,7 +3078,7 @@
|
||||
rowData = row._aData,
|
||||
cells = [],
|
||||
nTr, nTd, oCol,
|
||||
i, iLen;
|
||||
i, iLen, create;
|
||||
|
||||
if ( row.nTr === null )
|
||||
{
|
||||
@@ -3099,8 +3099,9 @@
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
oCol = oSettings.aoColumns[i];
|
||||
create = nTrIn ? false : true;
|
||||
|
||||
nTd = nTrIn ? anTds[i] : document.createElement( oCol.sCellType );
|
||||
nTd = create ? document.createElement( oCol.sCellType ) : anTds[i];
|
||||
nTd._DT_CellIndex = {
|
||||
row: iRow,
|
||||
column: i
|
||||
@@ -3109,9 +3110,9 @@
|
||||
cells.push( nTd );
|
||||
|
||||
// Need to create the HTML if new, or if a rendering function is defined
|
||||
if ( (!nTrIn || oCol.mRender || oCol.mData !== i) &&
|
||||
if ( create || ((!nTrIn || oCol.mRender || oCol.mData !== i) &&
|
||||
(!$.isPlainObject(oCol.mData) || oCol.mData._ !== i+'.display')
|
||||
) {
|
||||
)) {
|
||||
nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );
|
||||
}
|
||||
|
||||
@@ -4406,6 +4407,7 @@
|
||||
// New search - start from the master array
|
||||
if ( invalidated ||
|
||||
force ||
|
||||
regex ||
|
||||
prevSearch.length > input.length ||
|
||||
input.indexOf(prevSearch) !== 0 ||
|
||||
settings.bSorted // On resort, the display master needs to be
|
||||
@@ -4529,7 +4531,7 @@
|
||||
}
|
||||
|
||||
if ( cellData.replace ) {
|
||||
cellData = cellData.replace(/[\r\n]/g, '');
|
||||
cellData = cellData.replace(/[\r\n\u2028]/g, '');
|
||||
}
|
||||
|
||||
filterData.push( cellData );
|
||||
@@ -5457,7 +5459,7 @@
|
||||
table.children('colgroup').insertBefore( table.children('thead') );
|
||||
|
||||
/* Adjust the position of the header in case we loose the y-scrollbar */
|
||||
divBody.scroll();
|
||||
divBody.trigger('scroll');
|
||||
|
||||
// If sorting or filtering has occurred, jump the scrolling back to the top
|
||||
// only if we aren't holding the position
|
||||
@@ -6410,7 +6412,7 @@
|
||||
|
||||
_fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, s] );
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
if ( ! settings.oFeatures.bStateSave ) {
|
||||
callback();
|
||||
@@ -6890,7 +6892,7 @@
|
||||
var ctxSettings = function ( o ) {
|
||||
var a = _toSettings( o );
|
||||
if ( a ) {
|
||||
settings = settings.concat( a );
|
||||
settings.push.apply( settings, a );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7188,8 +7190,7 @@
|
||||
|
||||
var
|
||||
i, ien,
|
||||
j, jen,
|
||||
struct, inner,
|
||||
struct,
|
||||
methodScoping = function ( scope, fn, struc ) {
|
||||
return function () {
|
||||
var ret = fn.apply( scope, arguments );
|
||||
@@ -7204,9 +7205,9 @@
|
||||
struct = ext[i];
|
||||
|
||||
// Value
|
||||
obj[ struct.name ] = typeof struct.val === 'function' ?
|
||||
obj[ struct.name ] = struct.type === 'function' ?
|
||||
methodScoping( scope, struct.val, struct ) :
|
||||
$.isPlainObject( struct.val ) ?
|
||||
struct.type === 'object' ?
|
||||
{} :
|
||||
struct.val;
|
||||
|
||||
@@ -7287,13 +7288,19 @@
|
||||
name: key,
|
||||
val: {},
|
||||
methodExt: [],
|
||||
propExt: []
|
||||
propExt: [],
|
||||
type: 'object'
|
||||
};
|
||||
struct.push( src );
|
||||
}
|
||||
|
||||
if ( i === ien-1 ) {
|
||||
src.val = val;
|
||||
src.type = typeof val === 'function' ?
|
||||
'function' :
|
||||
$.isPlainObject( val ) ?
|
||||
'object' :
|
||||
'other';
|
||||
}
|
||||
else {
|
||||
struct = method ?
|
||||
@@ -7303,7 +7310,6 @@
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
_Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) {
|
||||
_Api.register( pluralName, val );
|
||||
|
||||
@@ -7916,7 +7922,7 @@
|
||||
[];
|
||||
}
|
||||
else if ( cellIdx ) {
|
||||
return aoData[ cellIdx.row ] && aoData[ cellIdx.row ].nTr === sel ?
|
||||
return aoData[ cellIdx.row ] && aoData[ cellIdx.row ].nTr === sel.parentNode ?
|
||||
[ cellIdx.row ] :
|
||||
[];
|
||||
}
|
||||
@@ -8575,16 +8581,6 @@
|
||||
|
||||
// Common actions
|
||||
col.bVisible = vis;
|
||||
_fnDrawHead( settings, settings.aoHeader );
|
||||
_fnDrawHead( settings, settings.aoFooter );
|
||||
|
||||
// Update colspan for no records display. Child rows and extensions will use their own
|
||||
// listeners to do this - only need to update the empty table item here
|
||||
if ( ! settings.aiDisplay.length ) {
|
||||
$(settings.nTBody).find('td[colspan]').attr('colspan', _fnVisbleColumns(settings));
|
||||
}
|
||||
|
||||
_fnSaveState( settings );
|
||||
};
|
||||
|
||||
|
||||
@@ -8648,6 +8644,7 @@
|
||||
} );
|
||||
|
||||
_api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {
|
||||
var that = this;
|
||||
var ret = this.iterator( 'column', function ( settings, column ) {
|
||||
if ( vis === undefined ) {
|
||||
return settings.aoColumns[ column ].bVisible;
|
||||
@@ -8657,14 +8654,28 @@
|
||||
|
||||
// Group the column visibility changes
|
||||
if ( vis !== undefined ) {
|
||||
// Second loop once the first is done for events
|
||||
this.iterator( 'column', function ( settings, column ) {
|
||||
_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, calc] );
|
||||
} );
|
||||
this.iterator( 'table', function ( settings ) {
|
||||
// Redraw the header after changes
|
||||
_fnDrawHead( settings, settings.aoHeader );
|
||||
_fnDrawHead( settings, settings.aoFooter );
|
||||
|
||||
// Update colspan for no records display. Child rows and extensions will use their own
|
||||
// listeners to do this - only need to update the empty table item here
|
||||
if ( ! settings.aiDisplay.length ) {
|
||||
$(settings.nTBody).find('td[colspan]').attr('colspan', _fnVisbleColumns(settings));
|
||||
}
|
||||
|
||||
_fnSaveState( settings );
|
||||
|
||||
if ( calc === undefined || calc ) {
|
||||
this.columns.adjust();
|
||||
}
|
||||
// Second loop once the first is done for events
|
||||
that.iterator( 'column', function ( settings, column ) {
|
||||
_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, calc] );
|
||||
} );
|
||||
|
||||
if ( calc === undefined || calc ) {
|
||||
that.columns.adjust();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -8815,13 +8826,20 @@
|
||||
} );
|
||||
}
|
||||
|
||||
// Row + column selector
|
||||
var columns = this.columns( columnSelector );
|
||||
var rows = this.rows( rowSelector );
|
||||
var a, i, ien, j, jen;
|
||||
// The default built in options need to apply to row and columns
|
||||
var internalOpts = opts ? {
|
||||
page: opts.page,
|
||||
order: opts.order,
|
||||
search: opts.search
|
||||
} : {};
|
||||
|
||||
this.iterator( 'table', function ( settings, idx ) {
|
||||
a = [];
|
||||
// Row + column selector
|
||||
var columns = this.columns( columnSelector, internalOpts );
|
||||
var rows = this.rows( rowSelector, internalOpts );
|
||||
var i, ien, j, jen;
|
||||
|
||||
var cellsNoOpts = this.iterator( 'table', function ( settings, idx ) {
|
||||
var a = [];
|
||||
|
||||
for ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {
|
||||
for ( j=0, jen=columns[idx].length ; j<jen ; j++ ) {
|
||||
@@ -8831,10 +8849,16 @@
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
return a;
|
||||
}, 1 );
|
||||
|
||||
// Now pass through the cell selector for options
|
||||
var cells = this.cells( a, opts );
|
||||
// There is currently only one extension which uses a cell selector extension
|
||||
// It is a _major_ performance drag to run this if it isn't needed, so this is
|
||||
// an extension specific check at the moment
|
||||
var cells = opts && opts.selected ?
|
||||
this.cells( cellsNoOpts, opts ) :
|
||||
cellsNoOpts;
|
||||
|
||||
$.extend( cells.selector, {
|
||||
cols: columnSelector,
|
||||
@@ -9463,7 +9487,7 @@
|
||||
* @type string
|
||||
* @default Version number
|
||||
*/
|
||||
DataTable.version = "1.10.19";
|
||||
DataTable.version = "1.10.20";
|
||||
|
||||
/**
|
||||
* Private data store, containing all of the settings objects that are
|
||||
@@ -14526,7 +14550,8 @@
|
||||
var btnDisplay, btnClass, counter=0;
|
||||
|
||||
var attach = function( container, buttons ) {
|
||||
var i, ien, node, button;
|
||||
var i, ien, node, button, tabIndex;
|
||||
var disabledClass = classes.sPageButtonDisabled;
|
||||
var clickHandler = function ( e ) {
|
||||
_fnPageChange( settings, e.data.action, true );
|
||||
};
|
||||
@@ -14541,7 +14566,8 @@
|
||||
}
|
||||
else {
|
||||
btnDisplay = null;
|
||||
btnClass = '';
|
||||
btnClass = button;
|
||||
tabIndex = settings.iTabIndex;
|
||||
|
||||
switch ( button ) {
|
||||
case 'ellipsis':
|
||||
@@ -14550,26 +14576,38 @@
|
||||
|
||||
case 'first':
|
||||
btnDisplay = lang.sFirst;
|
||||
btnClass = button + (page > 0 ?
|
||||
'' : ' '+classes.sPageButtonDisabled);
|
||||
|
||||
if ( page === 0 ) {
|
||||
tabIndex = -1;
|
||||
btnClass += ' ' + disabledClass;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'previous':
|
||||
btnDisplay = lang.sPrevious;
|
||||
btnClass = button + (page > 0 ?
|
||||
'' : ' '+classes.sPageButtonDisabled);
|
||||
|
||||
if ( page === 0 ) {
|
||||
tabIndex = -1;
|
||||
btnClass += ' ' + disabledClass;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'next':
|
||||
btnDisplay = lang.sNext;
|
||||
btnClass = button + (page < pages-1 ?
|
||||
'' : ' '+classes.sPageButtonDisabled);
|
||||
|
||||
if ( page === pages-1 ) {
|
||||
tabIndex = -1;
|
||||
btnClass += ' ' + disabledClass;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'last':
|
||||
btnDisplay = lang.sLast;
|
||||
btnClass = button + (page < pages-1 ?
|
||||
'' : ' '+classes.sPageButtonDisabled);
|
||||
|
||||
if ( page === pages-1 ) {
|
||||
tabIndex = -1;
|
||||
btnClass += ' ' + disabledClass;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -14585,7 +14623,7 @@
|
||||
'aria-controls': settings.sTableId,
|
||||
'aria-label': aria[ button ],
|
||||
'data-dt-idx': counter,
|
||||
'tabindex': settings.iTabIndex,
|
||||
'tabindex': tabIndex,
|
||||
'id': idx === 0 && typeof button === 'string' ?
|
||||
settings.sTableId +'_'+ button :
|
||||
null
|
||||
@@ -15213,7 +15251,7 @@
|
||||
|
||||
/**
|
||||
* Processing event, fired when DataTables is doing some kind of processing
|
||||
* (be it, order, searcg or anything else). It can be used to indicate to
|
||||
* (be it, order, search or anything else). It can be used to indicate to
|
||||
* the end user that there is something happening, or that something has
|
||||
* finished.
|
||||
* @name DataTable#processing.dt
|
||||
|
||||
Reference in New Issue
Block a user