Browse Source

Update datatables

Signed-off-by: BlackDex <black.dex@gmail.com>
pull/7235/head
BlackDex 7 days ago
parent
commit
48fe504b31
No known key found for this signature in database GPG Key ID: 58C80A2AA6C765E1
  1. 4
      src/static/scripts/datatables.css
  2. 52
      src/static/scripts/datatables.js

4
src/static/scripts/datatables.css

@ -4,10 +4,10 @@
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#bs5/dt-2.3.7
* https://datatables.net/download/#bs5/dt-2.3.8
*
* Included libraries:
* DataTables 2.3.7
* DataTables 2.3.8
*/
:root {

52
src/static/scripts/datatables.js

@ -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.3.7
* https://datatables.net/download/#bs5/dt-2.3.8
*
* Included libraries:
* DataTables 2.3.7
* DataTables 2.3.8
*/
/*! DataTables 2.3.7
/*! DataTables 2.3.8
* © SpryMedia Ltd - datatables.net/license
*/
@ -525,7 +525,7 @@
*
* @type string
*/
builder: "bs5/dt-2.3.7",
builder: "bs5/dt-2.3.8",
/**
* Buttons. For use with the Buttons extension for DataTables. This is
@ -3607,6 +3607,11 @@
if ( holdPosition !== true ) {
settings._iDisplayStart = 0;
}
else {
// Keep position, but make sure that there is actually data to display,
// otherwise we need to rewind a bit (e.g. if rows were deleted)
_fnLengthOverflow(settings);
}
// Let any modules know about the draw hold position state (used by
// scrolling internally)
@ -4920,6 +4925,12 @@
var args = [settings, settings.json];
// If the footer element is empty after initialisation, then remove it
let tfoot = $(settings.tfoot);
if (tfoot.children().length === 0) {
tfoot.remove();
}
settings._bInitComplete = true;
// Table is fully set up and we have data, so calculate the
@ -5376,12 +5387,12 @@
// the content of the cell so that the width applied to the header and body
// both match, but we want to hide it completely.
$('th, td', headerCopy).each(function () {
$(this.childNodes).wrapAll('<div class="dt-scroll-sizing">');
$(this.childNodes).wrapAll('<div class="dt-scroll-sizing" />');
});
if ( footer ) {
$('th, td', footerCopy).each(function () {
$(this.childNodes).wrapAll('<div class="dt-scroll-sizing">');
$(this.childNodes).wrapAll('<div class="dt-scroll-sizing" />');
});
}
@ -5409,6 +5420,10 @@
// Correct DOM ordering for colgroup - comes before the thead
table.children('colgroup').prependTo(table);
// Remove tabindex from the hidden row elements
table.find('thead, tfoot').find('[tabindex]').removeAttr('tabindex');
table.find('thead, tfoot').find('role').removeAttr('role');
// Adjust the position of the header in case we loose the y-scrollbar
divBody.trigger('scroll');
@ -5732,8 +5747,12 @@
.replace(/id=".*?"/g, '')
.replace(/name=".*?"/g, '');
// Don't want Javascript at all in these calculation cells.
cellString = cellString.replace(/<script.*?<\/script>/gi, ' ');
// Don't want script, dialog or template tags in the width
// calculations as they are hidden content
cellString = cellString
.replace(/<script[\s\S]*?<\/script>/gi, ' ')
.replace(/<dialog[\s\S]*?<\/dialog>/gi, ' ')
.replace(/<template[\s\S]*?<\/template>/gi, ' ');
var noHtml = _stripHtml(cellString, ' ')
.replace( /&nbsp;/g, ' ' );
@ -10304,7 +10323,7 @@
* @type string
* @default Version number
*/
DataTable.version = "2.3.7";
DataTable.version = "2.3.8";
/**
* Private data store, containing all of the settings objects that are
@ -12586,6 +12605,7 @@
var __mlWarning = false;
var __luxon; // Can be assigned in DateTable.use()
var __moment; // Can be assigned in DateTable.use()
var __reIsoTimezone = /[T\s]\d{2}.*?(Z|[+-]\d{2}(?::?\d{2})?)$/;
/**
*
@ -12606,7 +12626,7 @@
resolveWindowLibs();
if (__moment) {
dt = __moment.utc( d, format, locale, true );
dt = __moment( d, format, locale, true );
if (! dt.isValid()) {
return null;
@ -12716,6 +12736,16 @@
return d;
}
// Determine if there is a timezone. If there is, we want to reuse
// it for the output, so the timezone doesn't change between the
// input and output.
let options = {};
let tzMatch = typeof d === 'string' ? d.match(__reIsoTimezone) : null;
if (tzMatch) {
options.timeZone = tzMatch[1] === 'Z' ? 'UTC' : tzMatch[1];
}
var dt = __mldObj(d, from, locale);
if (dt === null) {
@ -12729,7 +12759,7 @@
var formatted = to === null
? __mld(dt, 'toDate', 'toJSDate', '')[localeString](
navigator.language,
{ timeZone: "UTC" }
options
)
: __mld(dt, 'format', 'toFormat', 'toISOString', to);

Loading…
Cancel
Save