META-INF.resources.bower_components.datatables.net-buttons.js.buttons.print.min.js Maven / Gradle / Ivy
/*!
* Print button for Buttons and DataTables.
* 2016 SpryMedia Ltd - datatables.net/license
*/
(function(a){if(typeof define==="function"&&define.amd){define(["jquery","datatables.net","datatables.net-buttons"],function(b){return a(b,window,document)})}else{if(typeof exports==="object"){module.exports=function(b,c){if(!b){b=window}if(!c||!c.fn.dataTable){c=require("datatables.net")(b,c).$}if(!c.fn.dataTable.Buttons){require("datatables.net-buttons")(b,c)}return a(c,b,b.document)}}else{a(jQuery,window,document)}}}(function(f,c,a,h){var e=f.fn.dataTable;var b=a.createElement("a");var g=function(k){var j;var l=f(k).clone()[0];var i;if(l.nodeName.toLowerCase()==="link"){l.href=d(l.href)}return l.outerHTML};var d=function(j){b.href=j;var i=b.host;if(i.indexOf("/")===-1&&b.pathname.indexOf("/")!==0){i+="/"}return b.protocol+"//"+i+b.pathname+b.search};e.ext.buttons.print={className:"buttons-print",text:function(i){return i.i18n("buttons.print","Print")},action:function(t,m,r,n){var p=m.buttons.exportData(f.extend({decodeEntities:false},n.exportOptions));var k=m.buttons.exportInfo(n);var l=f.map(m.settings()[0].aoColumns,function(i,w){return i.sClass});var j=function(C,w){var B="";for(var z=0,x=C.length;z"+A+""+w+">"}return B+" "};var q='';if(n.header){q+=""+j(p.header,"th")+""}q+="";for(var o=0,v=p.body.length;o";if(n.footer&&p.footer){q+=""+j(p.footer,"th")+""}q+="
";var s=c.open("","");s.document.close();var u=""+k.title+" ";f("style, link").each(function(){u+=g(this)});try{s.document.head.innerHTML=u}catch(t){f(s.document.head).html(u)}s.document.body.innerHTML=""+k.title+"
"+(k.messageTop||"")+""+q+""+(k.messageBottom||"")+"";f(s.document.body).addClass("dt-print-view");f("img",s.document.body).each(function(x,w){w.setAttribute("src",d(w.getAttribute("src")))});if(n.customize){n.customize(s,n,m)}s.setTimeout(function(){if(n.autoPrint){s.print();s.close()}},1000)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:true,footer:false,autoPrint:true,customize:null};return e.Buttons}));
© 2015 - 2025 Weber Informatics LLC | Privacy Policy