META-INF.resources.bower_components.datatables.net-buttons.js.buttons.html5.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-data-tables Show documentation
Show all versions of jwebmp-data-tables Show documentation
The JWebSwing implementation for Data Tables
(function(j){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(f){return j(f,window,document)}):"object"===typeof exports?module.exports=function(f,k,v,r){f||(f=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(f,k).$;k.fn.dataTable.Buttons||require("datatables.net-buttons")(f,k);return j(k,f,f.document,v,r)}:j(jQuery,window,document)})(function(j,f,k,v,r,o){function x(a){for(var b="";0<=a;)b=String.fromCharCode(a%26+65)+b,a=Math.floor(a/
26)-1;return b}function A(a,b){s===o&&(s=-1===z.serializeToString(j.parseXML(B["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r"));j.each(b,function(b,c){if(j.isPlainObject(c)){var e=a.folder(b);A(e,c)}else{if(s){var e=c.childNodes[0],g,w,i=[];for(g=e.attributes.length-1;0<=g;g--){w=e.attributes[g].nodeName;var f=e.attributes[g].nodeValue;-1!==w.indexOf(":")&&(i.push({name:w,value:f}),e.removeAttribute(w))}g=0;for(w=i.length;g'+e),e=e.replace(/_dt_b_namespace_token_/g,":"),e=e.replace(/xmlns:NS[\d]+="" NS[\d]+:/g,""));e=e.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");a.file(b,e)}})}function n(a,b,d){var c=a.createElement(b);d&&(d.attr&&j(c).attr(d.attr),d.children&&j.each(d.children,function(a,b){c.appendChild(b)}),null!==d.text&&d.text!==o&&c.appendChild(a.createTextNode(d.text)));
return c}function L(a,b){var d=a.header[b].length,c;a.footer&&a.footer[b].length>d&&(d=a.footer[b].length);for(var e=0,g=a.body.length;ed&&(d=c),401*a[1]?!0:!1};try{var z=new XMLSerializer,s}catch(P){}var B={"_rels/.rels":' ',
"xl/_rels/workbook.xml.rels":' ',"[Content_Types].xml":' ',
"xl/workbook.xml":' ',
"xl/worksheets/sheet1.xml":' ',"xl/styles.xml":' '},
K=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(a){return a/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(a){return a/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(a){return-1*a.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},
{match:/^\-?[\d,]+\.\d{2}$/,style:64}];q.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,b,d,c){this.processing(!0);var e=this,a=I(b,c),g=b.buttons.exportInfo(c),f=H(c),i=a.str,d=j("").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});g.title&&(i=g.title+f+f+i);g.messageTop&&(i=g.messageTop+f+f+i);g.messageBottom&&(i=i+f+f+g.messageBottom);c.customize&&(i=c.customize(i,c,b));c=j("").val(i).appendTo(d);
if(k.queryCommandSupported("copy")){d.appendTo(b.table().container());c[0].focus();c[0].select();try{var h=k.execCommand("copy");d.remove();if(h){b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),b.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",_:"Copied %d rows to clipboard"},a.rows),2E3);this.processing(!1);return}}catch(n){}}h=j(""+b.i18n("buttons.copyKeys","Press ctrl or ⌘ + C to copy the table data
to your system clipboard.
To cancel, click this message or press escape.")+
"").append(d);b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),h,0);c[0].focus();c[0].select();var l=j(h).closest(".dt-button-info"),o=function(){l.off("click.buttons-copy");j(k).off(".buttons-copy");b.buttons.info(!1)};l.on("click.buttons-copy",o);j(k).on("keydown.buttons-copy",function(a){27===a.keyCode&&(o(),e.processing(!1))}).on("copy.buttons-copy cut.buttons-copy",function(){o();e.processing(!1)})},exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!1,
title:"*",messageTop:"*",messageBottom:"*"};q.ext.buttons.csvHtml5={bom:!1,className:"buttons-csv buttons-html5",available:function(){return f.FileReader!==o&&f.Blob},text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,b,d,c){this.processing(!0);var a=I(b,c).str,d=b.buttons.exportInfo(c),e=c.charset;c.customize&&(a=c.customize(a,c,b));!1!==e?(e||(e=k.characterSet||k.charset),e&&(e=";charset="+e)):e="";c.bom&&(a=""+a);u(new Blob([a],{type:"text/csv"+e}),d.filename,!0);this.processing(!1)},
filename:"*",extension:".csv",exportOptions:{},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!1};q.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return f.FileReader!==o&&(v||f.JSZip)!==o&&!J()&&z},text:function(a){return a.i18n("buttons.excel","Excel")},action:function(a,b,d,c){this.processing(!0);var e=this,g=0,h,a=function(a){return j.parseXML(B[a])},i=a("xl/worksheets/sheet1.xml"),l=i.getElementsByTagName("sheetData")[0],
a={_rels:{".rels":a("_rels/.rels")},xl:{_rels:{"workbook.xml.rels":a("xl/_rels/workbook.xml.rels")},"workbook.xml":a("xl/workbook.xml"),"styles.xml":a("xl/styles.xml"),worksheets:{"sheet1.xml":i}},"[Content_Types].xml":a("[Content_Types].xml")},k=b.buttons.exportData(c.exportOptions),q,r,m=function(a){q=g+1;r=n(i,"row",{attr:{r:q}});for(var b=0,d=a.length;b
© 2015 - 2025 Weber Informatics LLC | Privacy Policy