Fix JS per stampa footer tabelle

This commit is contained in:
Dasc3er 2021-07-29 10:44:03 +02:00
parent 016dfdf098
commit d9bb35c33c
2 changed files with 3 additions and 6 deletions

View File

@ -83,7 +83,7 @@ $(document).ready(function () {
// Gestione click sulla sidebar per evitare chiusura
$(".control-sidebar").on("click", function (e) {
if (largeScreen && e.target.tagName !== 'H4' && $(".main-footer").hasClass("with-control-sidebar")) {
if (largeScreen && e.target.tagName === 'A' && $(".main-footer").hasClass("with-control-sidebar")) {
toggleControlSidebar();
}
});

View File

@ -219,17 +219,14 @@ function getDatatablesButtons(table) {
extend: 'print',
autoPrint: true,
footer: false, // Non funzionante in Firefox, e saltuarmente in Chrome
customize: function (win) {
const datatable = getTable(table).datatable;
customize: function (win, config, datatable) {
const footer = datatable.table().footer().children[0];
console.log(footer);
const body = $(win.document.body);
body.find('table')
.addClass('compact')
.css('font-size', 'inherit')
.append(footer);
.append(footer.cloneNode(true));
body.find('td:first-child, th:first-child')
.addClass('hide');