Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) Safe-mode: OFF (not secure) /var/www/clients/client172/web473/web/aps/xcrud/plugins/tabulator-master/dist/js/modules/ drwxr-xr-x |
Viewing file: print.js (2.94 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | /* Tabulator v4.4.3 (c) Oliver Folkerd */ var Print = function Print(table) { this.table = table; //hold Tabulator object this.element = false; this.manualBlock = false; }; Print.prototype.initialize = function () { window.addEventListener("beforeprint", this.replaceTable.bind(this)); window.addEventListener("afterprint", this.cleanup.bind(this)); }; Print.prototype.replaceTable = function () { if (!this.manualBlock) { this.element = document.createElement("div"); this.element.classList.add("tabulator-print-table"); this.element.appendChild(this.table.modules.htmlTableExport.genereateTable(this.table.options.printConfig, this.table.options.printCopyStyle, this.table.options.printVisibleRows, "print")); this.table.element.style.display = "none"; this.table.element.parentNode.insertBefore(this.element, this.table.element); } }; Print.prototype.cleanup = function () { document.body.classList.remove("tabulator-print-fullscreen-hide"); if (this.element && this.element.parentNode) { this.element.parentNode.removeChild(this.element); this.table.element.style.display = ""; } }; Print.prototype.printFullscreen = function (visible, style, config) { var scrollX = window.scrollX, scrollY = window.scrollY, headerEl = document.createElement("div"), footerEl = document.createElement("div"), tableEl = this.table.modules.htmlTableExport.genereateTable(typeof config != "undefined" ? config : this.table.options.printConfig, typeof style != "undefined" ? style : this.table.options.printCopyStyle, visible, "print"), headerContent, footerContent; this.manualBlock = true; this.element = document.createElement("div"); this.element.classList.add("tabulator-print-fullscreen"); if (this.table.options.printHeader) { headerEl.classList.add("tabulator-print-header"); headerContent = typeof this.table.options.printHeader == "function" ? this.table.options.printHeader.call(this.table) : this.table.options.printHeader; if (typeof headerContent == "string") { headerEl.innerHTML = headerContent; } else { headerEl.appendChild(headerContent); } this.element.appendChild(headerEl); } this.element.appendChild(tableEl); if (this.table.options.printFooter) { footerEl.classList.add("tabulator-print-footer"); footerContent = typeof this.table.options.printFooter == "function" ? this.table.options.printFooter.call(this.table) : this.table.options.printFooter; if (typeof footerContent == "string") { footerEl.innerHTML = footerContent; } else { footerEl.appendChild(footerContent); } this.element.appendChild(footerEl); } document.body.classList.add("tabulator-print-fullscreen-hide"); document.body.appendChild(this.element); if (this.table.options.printFormatter) { this.table.options.printFormatter(this.element, tableEl); } window.print(); this.cleanup(); window.scrollTo(scrollX, scrollY); this.manualBlock = false; }; Tabulator.prototype.registerModule("print", Print); |
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0143 ]-- |