Fix JS per stampa footer tabelle
This commit is contained in:
parent
016dfdf098
commit
d9bb35c33c
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue