From f3f5471ef776f7cd6a0f7dbc2656ebcf30e20aa3 Mon Sep 17 00:00:00 2001 From: DerLinkman Date: Mon, 26 Dec 2022 15:56:23 +0100 Subject: [PATCH 1/3] [Web] Removed double Sender Entry in RSPAMD Logs --- data/web/js/site/debug.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/data/web/js/site/debug.js b/data/web/js/site/debug.js index 1996600a..85e6b789 100644 --- a/data/web/js/site/debug.js +++ b/data/web/js/site/debug.js @@ -775,11 +775,6 @@ jQuery(function($){ $(td).html(cellData.value); } }, - { - title: 'Subject', - data: 'header_subject', - defaultContent: '' - }, { title: 'Symbols', data: 'symbols', From eaa0dea63bb951081b8ff6cfb1b2b4987724a094 Mon Sep 17 00:00:00 2001 From: Tom Udding Date: Mon, 26 Dec 2022 17:30:25 +0100 Subject: [PATCH 2/3] [WEB] Update DataTables to v1.13.1 and fix crash for non-English locales This newer version of DataTables includes a fix for improper access to localisation information from `Intl.NumberFormat`. This improper access lead to datatables not being created. --- data/web/css/build/011-datatables.css | 58 ++-- data/web/js/build/004-datatables.js | 417 ++++++++++++++++---------- 2 files changed, 278 insertions(+), 197 deletions(-) diff --git a/data/web/css/build/011-datatables.css b/data/web/css/build/011-datatables.css index e0512bdf..d03514ff 100644 --- a/data/web/css/build/011-datatables.css +++ b/data/web/css/build/011-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-1.12.0/r-2.3.0/sl-1.4.0 + * https://datatables.net/download/#bs5/dt-1.13.1/r-2.4.0/sl-1.5.0 * * Included libraries: - * DataTables 1.12.0, Responsive 2.3.0, Select 1.4.0 + * DataTables 1.13.1, Responsive 2.4.0, Select 1.5.0 */ @charset "UTF-8"; @@ -63,7 +63,7 @@ table.dataTable thead > tr > td.sorting_desc_disabled:after { opacity: 0.125; right: 10px; line-height: 9px; - font-size: 0.9em; + font-size: 0.8em; } table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:before, table.dataTable thead > tr > td.sorting:before, @@ -72,7 +72,7 @@ table.dataTable thead > tr > td.sorting_desc:before, table.dataTable thead > tr > td.sorting_asc_disabled:before, table.dataTable thead > tr > td.sorting_desc_disabled:before { bottom: 50%; - content: "▴"; + content: "▲"; } table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:after, table.dataTable thead > tr > td.sorting:after, @@ -81,7 +81,7 @@ table.dataTable thead > tr > td.sorting_desc:after, table.dataTable thead > tr > td.sorting_asc_disabled:after, table.dataTable thead > tr > td.sorting_desc_disabled:after { top: 50%; - content: "▾"; + content: "▼"; } table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > td.sorting_asc:before, @@ -287,6 +287,9 @@ table.dataTable > tbody > tr.selected > * { box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.9); color: white; } +table.dataTable > tbody > tr.selected a { + color: #090a0b; +} table.dataTable.table-striped > tbody > tr.odd > * { box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.05); } @@ -335,6 +338,9 @@ div.dataTables_wrapper div.dataTables_paginate ul.pagination { white-space: nowrap; justify-content: flex-end; } +div.dataTables_wrapper div.dt-row { + position: relative; +} div.dataTables_scrollHead table.dataTable { margin-bottom: 0 !important; @@ -380,17 +386,6 @@ div.dataTables_wrapper div.dataTables_paginate { table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) { padding-right: 20px; } -table.dataTable.table-sm .sorting:before, -table.dataTable.table-sm .sorting_asc:before, -table.dataTable.table-sm .sorting_desc:before { - top: 5px; - right: 0.85em; -} -table.dataTable.table-sm .sorting:after, -table.dataTable.table-sm .sorting_asc:after, -table.dataTable.table-sm .sorting_desc:after { - top: 5px; -} table.table-bordered.dataTable { border-right-width: 0; @@ -629,13 +624,13 @@ table.dataTable > tbody > tr > .selected { background-color: rgba(13, 110, 253, 0.9); color: white; } -table.dataTable tbody td.select-checkbox, -table.dataTable tbody th.select-checkbox { +table.dataTable > tbody > tr > td.select-checkbox, +table.dataTable > tbody > tr > th.select-checkbox { position: relative; } -table.dataTable tbody td.select-checkbox:before, table.dataTable tbody td.select-checkbox:after, -table.dataTable tbody th.select-checkbox:before, -table.dataTable tbody th.select-checkbox:after { +table.dataTable > tbody > tr > td.select-checkbox:before, table.dataTable > tbody > tr > td.select-checkbox:after, +table.dataTable > tbody > tr > th.select-checkbox:before, +table.dataTable > tbody > tr > th.select-checkbox:after { display: block; position: absolute; top: 1.2em; @@ -644,20 +639,20 @@ table.dataTable tbody th.select-checkbox:after { height: 12px; box-sizing: border-box; } -table.dataTable tbody td.select-checkbox:before, -table.dataTable tbody th.select-checkbox:before { +table.dataTable > tbody > tr > td.select-checkbox:before, +table.dataTable > tbody > tr > th.select-checkbox:before { content: " "; margin-top: -5px; margin-left: -6px; border: 1px solid black; border-radius: 3px; } -table.dataTable tr.selected td.select-checkbox:before, -table.dataTable tr.selected th.select-checkbox:before { +table.dataTable > tbody > tr.selected > td.select-checkbox:before, +table.dataTable > tbody > tr.selected > th.select-checkbox:before { border: 1px solid white; } -table.dataTable tr.selected td.select-checkbox:after, -table.dataTable tr.selected th.select-checkbox:after { +table.dataTable > tbody > tr.selected > td.select-checkbox:after, +table.dataTable > tbody > tr.selected > th.select-checkbox:after { content: "✓"; font-size: 20px; margin-top: -19px; @@ -665,12 +660,12 @@ table.dataTable tr.selected th.select-checkbox:after { text-align: center; text-shadow: 1px 1px #B0BED9, -1px -1px #B0BED9, 1px -1px #B0BED9, -1px 1px #B0BED9; } -table.dataTable.compact tbody td.select-checkbox:before, -table.dataTable.compact tbody th.select-checkbox:before { +table.dataTable.compact > tbody > tr > td.select-checkbox:before, +table.dataTable.compact > tbody > tr > th.select-checkbox:before { margin-top: -12px; } -table.dataTable.compact tr.selected td.select-checkbox:after, -table.dataTable.compact tr.selected th.select-checkbox:after { +table.dataTable.compact > tbody > tr.selected > td.select-checkbox:after, +table.dataTable.compact > tbody > tr.selected > th.select-checkbox:after { margin-top: -16px; } @@ -690,4 +685,3 @@ table.dataTable.table-sm tbody td.select-checkbox::before { margin-top: -9px; } - diff --git a/data/web/js/build/004-datatables.js b/data/web/js/build/004-datatables.js index 7dadd85a..9ece8ea5 100644 --- a/data/web/js/build/004-datatables.js +++ b/data/web/js/build/004-datatables.js @@ -4,20 +4,20 @@ * * To rebuild or modify this file with the latest versions of the included * software please visit: - * https://datatables.net/download/#bs5/dt-1.12.0/r-2.3.0/sl-1.4.0 + * https://datatables.net/download/#bs5/dt-1.13.1/r-2.4.0/sl-1.5.0 * * Included libraries: - * DataTables 1.12.0, Responsive 2.3.0, Select 1.4.0 + * DataTables 1.13.1, Responsive 2.4.0, Select 1.5.0 */ -/*! DataTables 1.12.0 +/*! DataTables 1.13.1 * ©2008-2022 SpryMedia Ltd - datatables.net/license */ /** * @summary DataTables * @description Paginate, search and order HTML tables - * @version 1.12.0 + * @version 1.13.1 * @author SpryMedia Ltd * @contact www.datatables.net * @copyright SpryMedia Ltd. @@ -1162,6 +1162,10 @@ $( rowOne[0] ).children('th, td').each( function (i, cell) { var col = oSettings.aoColumns[i]; + if (! col) { + _fnLog( oSettings, 0, 'Incorrect column count', 18 ); + } + if ( col.mData === i ) { var sort = a( cell, 'sort' ) || a( cell, 'order' ); var filter = a( cell, 'filter' ) || a( cell, 'search' ); @@ -3166,6 +3170,11 @@ create = nTrIn ? false : true; nTd = create ? document.createElement( oCol.sCellType ) : anTds[i]; + + if (! nTd) { + _fnLog( oSettings, 0, 'Incorrect column count', 18 ); + } + nTd._DT_CellIndex = { row: iRow, column: i @@ -3316,10 +3325,16 @@ for ( i=0, ien=cells.length ; i<'col-sm-12 col-md-6'f>>" + - "<'row'<'col-sm-12'tr>>" + + "<'row dt-row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", renderer: 'bootstrap' } ); @@ -15645,7 +15696,7 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu var classes = settings.oClasses; var lang = settings.oLanguage.oPaginate; var aria = settings.oLanguage.oAria.paginate || {}; - var btnDisplay, btnClass, counter=0; + var btnDisplay, btnClass; var attach = function( container, buttons ) { var i, ien, node, button; @@ -15714,7 +15765,7 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu 'href': '#', 'aria-controls': settings.sTableId, 'aria-label': aria[ button ], - 'data-dt-idx': counter, + 'data-dt-idx': button, 'tabindex': settings.iTabIndex, 'class': 'page-link' } ) @@ -15725,13 +15776,12 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu settings.oApi._fnBindAction( node, {action: button}, clickHandler ); - - counter++; } } } }; + var hostEl = $(host); // IE9 throws an 'unknown error' if document.activeElement is used // inside an iframe or frame. var activeEl; @@ -15741,17 +15791,26 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu // elements, focus is lost on the select button which is bad for // accessibility. So we want to restore focus once the draw has // completed - activeEl = $(host).find(document.activeElement).data('dt-idx'); + activeEl = hostEl.find(document.activeElement).data('dt-idx'); } catch (e) {} + var paginationEl = hostEl.children('ul.pagination'); + + if (paginationEl.length) { + paginationEl.empty(); + } + else { + paginationEl = hostEl.html('
    ').children('ul').addClass('pagination'); + } + attach( - $(host).empty().html('
      ').children('ul'), + paginationEl, buttons ); if ( activeEl !== undefined ) { - $(host).find( '[data-dt-idx='+activeEl+']' ).trigger('focus'); + hostEl.find('[data-dt-idx='+activeEl+']').trigger('focus'); } }; @@ -15760,14 +15819,54 @@ return DataTable; })); -/*! Responsive 2.3.0 +/*! Responsive 2.4.0 * 2014-2022 SpryMedia Ltd - datatables.net/license */ +(function( factory ){ + if ( typeof define === 'function' && define.amd ) { + // AMD + define( ['jquery', 'datatables.net'], function ( $ ) { + return factory( $, window, document ); + } ); + } + else if ( typeof exports === 'object' ) { + // CommonJS + module.exports = function (root, $) { + if ( ! root ) { + // CommonJS environments without a window global must pass a + // root. This will give an error otherwise + root = window; + } + + if ( ! $ ) { + $ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window + require('jquery') : + require('jquery')( root ); + } + + if ( ! $.fn.dataTable ) { + require('datatables.net')(root, $); + } + + + return factory( $, root, root.document ); + }; + } + else { + // Browser + factory( jQuery, window, document ); + } +}(function( $, window, document, undefined ) { +'use strict'; +var DataTable = $.fn.dataTable; + + + /** * @summary Responsive * @description Responsive tables plug-in for DataTables - * @version 2.3.0 + * @version 2.4.0 * @author SpryMedia Ltd (www.sprymedia.co.uk) * @contact www.sprymedia.co.uk/contact * @copyright SpryMedia Ltd. @@ -15781,35 +15880,6 @@ return DataTable; * * For details please refer to: http://www.datatables.net */ -(function( factory ){ - if ( typeof define === 'function' && define.amd ) { - // AMD - define( ['jquery', 'datatables.net'], function ( $ ) { - return factory( $, window, document ); - } ); - } - else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = function (root, $) { - if ( ! root ) { - root = window; - } - - if ( ! $ || ! $.fn.dataTable ) { - $ = require('datatables.net')(root, $).$; - } - - return factory( $, root, root.document ); - }; - } - else { - // Browser - factory( jQuery, window, document ); - } -}(function( $, window, document, undefined ) { -'use strict'; -var DataTable = $.fn.dataTable; - /** * Responsive is a plug-in for the DataTables library that makes use of @@ -15863,9 +15933,10 @@ var Responsive = function ( settings, opts ) { } this.s = { - dt: new DataTable.Api( settings ), + childNodeStore: {}, columns: [], - current: [] + current: [], + dt: new DataTable.Api( settings ) }; // Check if responsive has already been initialised on this table @@ -16070,6 +16141,63 @@ $.extend( Responsive.prototype, { * Private methods */ + /** + * Get and store nodes from a cell - use for node moving renderers + * + * @param {*} dt DT instance + * @param {*} row Row index + * @param {*} col Column index + */ + _childNodes: function( dt, row, col ) { + var name = row+'-'+col; + + if ( this.s.childNodeStore[ name ] ) { + return this.s.childNodeStore[ name ]; + } + + // https://jsperf.com/childnodes-array-slice-vs-loop + var nodes = []; + var children = dt.cell( row, col ).node().childNodes; + for ( var i=0, ien=children.length ; i