diff --git a/plugins/DataTables/datatables.css b/plugins/DataTables/datatables.css index 2e9b2b58..3fedcdc3 100644 --- a/plugins/DataTables/datatables.css +++ b/plugins/DataTables/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/#bs4/dt-2.1.8 + * https://datatables.net/download/#bs4/dt-2.2.1 * * Included libraries: - * DataTables 2.1.8 + * DataTables 2.2.1 */ @charset "UTF-8"; @@ -43,6 +43,9 @@ table.dataTable tr.dt-hasChild td.dt-control:before { border-bottom: 0px solid transparent; border-right: 5px solid transparent; } +table.dataTable tfoot:empty { + display: none; +} html.dark table.dataTable td.dt-control:before, :root[data-bs-theme=dark] table.dataTable td.dt-control:before, @@ -251,6 +254,11 @@ table.dataTable th, table.dataTable td { box-sizing: border-box; } +table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date, +table.dataTable td.dt-type-numeric, +table.dataTable td.dt-type-date { + text-align: right; +} table.dataTable th.dt-left, table.dataTable td.dt-left { text-align: left; @@ -276,11 +284,6 @@ table.dataTable td.dt-empty { text-align: center; vertical-align: top; } -table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date, -table.dataTable td.dt-type-numeric, -table.dataTable td.dt-type-date { - text-align: right; -} table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, diff --git a/plugins/DataTables/datatables.js b/plugins/DataTables/datatables.js index 0a220fb0..9a1a9b9d 100644 --- a/plugins/DataTables/datatables.js +++ b/plugins/DataTables/datatables.js @@ -4,34 +4,16 @@ * * To rebuild or modify this file with the latest versions of the included * software please visit: - * https://datatables.net/download/#bs4/dt-2.1.8 + * https://datatables.net/download/#bs4/dt-2.2.1 * * Included libraries: - * DataTables 2.1.8 + * DataTables 2.2.1 */ -/*! DataTables 2.1.8 +/*! DataTables 2.2.1 * © SpryMedia Ltd - datatables.net/license */ -/** - * @summary DataTables - * @description Paginate, search and order HTML tables - * @version 2.1.8 - * @author SpryMedia Ltd - * @contact www.datatables.net - * @copyright SpryMedia Ltd. - * - * This source file is free software, available under the following license: - * MIT license - https://datatables.net/license - * - * This source file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. - * - * For details please refer to: https://www.datatables.net - */ - (function( factory ) { "use strict"; @@ -441,7 +423,6 @@ thead = $('').appendTo($this); } oSettings.nTHead = thead[0]; - $('tr', thead).addClass(oClasses.thead.row); var tbody = $this.children('tbody'); if ( tbody.length === 0 ) { @@ -456,7 +437,6 @@ tfoot = $('
').appendTo($this); } oSettings.nTFoot = tfoot[0]; - $('tr', tfoot).addClass(oClasses.tfoot.row); // Copy the data index array oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); @@ -539,7 +519,7 @@ * * @type string */ - builder: "bs4/dt-2.1.8", + builder: "bs4/dt-2.2.1", /** @@ -2173,6 +2153,10 @@ var width = _fnColumnsSumWidth(settings, [i], false, false); cols[i].colEl.css('width', width); + + if (settings.oScroll.sX) { + cols[i].colEl.css('min-width', width); + } } } @@ -3240,9 +3224,13 @@ // Add the number of cells needed to make up to the number of columns if (row.length === 1) { - var cells = $('td, th', row); + var cellCount = 0; + + $('td, th', row).each(function () { + cellCount += this.colSpan; + }); - for ( i=cells.length, ien=columns.length ; i").addClass("dt-column-title").append(r.childNodes).appendTo(r),d)&&0===H("span.dt-column-order",r).length&&H("").addClass("dt-column-order").appendTo(r),i=0;i")[0],kt=void 0!==Et.textContent;function Mt(i){var l,e,n,t,s=i.oInit,u=i.deferLoading,c=J(i);i.bInitialised?(wt(i,"header"),wt(i,"footer"),n=function(){_t(i,i.aoHeader),_t(i,i.aoFooter);var n=i.iInitDisplayStart;if(s.aaData)for(l=0;l").attr("data-dt-row",i.idx).addClass(e),H("td",n).addClass(e).html(t)[0].colSpan=ot(o),s.push(n[0]))}var s=[];l(t,e),i._details&&i._details.detach(),i._details=H(s),i._detailsShow&&i._details.insertAfter(i.nTr)}function fe(t,e){var n=t.context;if(n.length&&t.length){var a=n[0].aoData[t[0]];if(a._details){(a._detailsShow=e)?(a._details.insertAfter(a.nTr),H(a.nTr).addClass("dt-hasChild")):(a._details.detach(),H(a.nTr).removeClass("dt-hasChild")),G(n[0],null,"childRow",[e,t.row(t[0])]);var i=n[0],r=new X(i),a=".dt.DT_details",e="draw"+a,t="column-sizing"+a,a="destroy"+a,l=i.aoData;if(r.off(e+" "+t+" "+a),m(l,"_details").length>0){r.on(e,function(t,e){if(i!==e)return;r.rows({page:"current"}).eq(0).each(function(t){var e=l[t];if(e._detailsShow)e._details.insertAfter(e.nTr)})});r.on(t,function(t,e){if(i!==e)return;var n,a=ot(e);for(var r=0,o=l.length;r "+Array(t).join(" ")+" "),n=(H(this.table().body()).append(t),t.children().map(function(){return H(this).outerWidth()}));return t.remove(),this.iterator("column",function(t,e){t=rt(t,e);return null!==t?n[t]:0},1)}),t("columns().indexes()","column().index()",function(n){return this.iterator("column",function(t,e){return"visible"===n?rt(t,e):e},1)}),e("columns.adjust()",function(){return this.iterator("table",function(t){nt(t)},1)}),e("column.index()",function(t,e){var n;if(0!==this.context.length)return n=this.context[0],"fromVisible"===t||"toData"===t?at(n,e):"fromData"===t||"toVisible"===t?rt(n,e):void 0}),e("column()",function(t,e){return ce(this.columns(t,e))}),e("cells()",function(g,t,v){var a,r,o,i,l,s,e;return H.isPlainObject(g)&&(void 0===g.row?(v=g,g=null):(v=t,t=null)),H.isPlainObject(t)&&(v=t,t=null),null==t?this.iterator("table",function(t){return a=t,t=g,e=ue(v),d=a.aoData,f=ve(a,e),n=A(b(d,f,"anCells")),h=H(M([],n)),p=a.aoColumns.length,se("cell",t,function(t){var e,n="function"==typeof t;if(null==t||n){for(o=[],i=0,l=f.length;i