datatables.net-buttons
Advanced tools
Comparing version 1.7.1 to 2.0.0
@@ -43,4 +43,8 @@ /*! | ||
colvis: function ( dt, conf ) { | ||
return { | ||
var node = null; | ||
var buttonConf = { | ||
extend: 'collection', | ||
init: function ( dt, n ) { | ||
node = n; | ||
}, | ||
text: function ( dt ) { | ||
@@ -56,2 +60,15 @@ return dt.i18n( 'buttons.colvis', 'Column visibility' ); | ||
}; | ||
// Rebuild the collection with the new column structure if columns are reordered | ||
dt.on( 'column-reorder.dt'+conf.namespace, function (e, settings, details) { | ||
// console.log(node); | ||
// console.log('node', dt.button(null, node).node()); | ||
dt.button(null, dt.button(null, node).node()).collectionRebuild([{ | ||
extend: 'columnsToggle', | ||
columns: conf.columns, | ||
columnText: conf.columnText | ||
}]); | ||
}); | ||
return buttonConf; | ||
}, | ||
@@ -122,2 +139,7 @@ | ||
.on( 'column-reorder.dt'+conf.namespace, function (e, settings, details) { | ||
// Button has been removed from the DOM | ||
if ( conf.destroying ) { | ||
return; | ||
} | ||
if ( dt.columns( conf.columns ).count() !== 1 ) { | ||
@@ -124,0 +146,0 @@ return; |
@@ -1,6 +0,10 @@ | ||
(function(g){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(e){return g(e,window,document)}):"object"===typeof exports?module.exports=function(e,f){e||(e=window);if(!f||!f.fn.dataTable)f=require("datatables.net")(e,f).$;f.fn.dataTable.Buttons||require("datatables.net-buttons")(e,f);return g(f,e,e.document)}:g(jQuery,window,document)})(function(g,e,f,h){e=g.fn.dataTable;g.extend(e.ext.buttons,{colvis:function(a,b){return{extend:"collection", | ||
text:function(b){return b.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",buttons:[{extend:"columnsToggle",columns:b.columns,columnText:b.columnText}]}},columnsToggle:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnToggle",columns:a,columnText:b.columnText}}).toArray()},columnToggle:function(a,b){return{extend:"columnVisibility",columns:b.columns,columnText:b.columnText}},columnsVisibility:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnVisibility", | ||
columns:a,visibility:b.visibility,columnText:b.columnText}}).toArray()},columnVisibility:{columns:h,text:function(a,b,c){return c._columnText(a,c)},className:"buttons-columnVisibility",action:function(a,b,c,d){a=b.columns(d.columns);b=a.visible();a.visible(d.visibility!==h?d.visibility:!(b.length&&b[0]))},init:function(a,b,c){var d=this;b.attr("data-cv-idx",c.columns);a.on("column-visibility.dt"+c.namespace,function(b,e){!e.bDestroying&&e.nTable==a.settings()[0].nTable&&d.active(a.column(c.columns).visible())}).on("column-reorder.dt"+ | ||
c.namespace,function(){1===a.columns(c.columns).count()&&(d.text(c._columnText(a,c)),d.active(a.column(c.columns).visible()))});this.active(a.column(c.columns).visible())},destroy:function(a,b,c){a.off("column-visibility.dt"+c.namespace).off("column-reorder.dt"+c.namespace)},_columnText:function(a,b){var c=a.column(b.columns).index(),d=a.settings()[0].aoColumns[c].sTitle;d||(d=a.column(c).header().innerHTML);d=d.replace(/\n/g," ").replace(/<br\s*\/?>/gi," ").replace(/<select(.*?)<\/select>/g,"").replace(/<!\-\-.*?\-\->/g, | ||
"").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"");return b.columnText?b.columnText(a,c,d):d}},colvisRestore:{className:"buttons-colvisRestore",text:function(a){return a.i18n("buttons.colvisRestore","Restore visibility")},init:function(a,b,c){c._visOriginal=a.columns().indexes().map(function(b){return a.column(b).visible()}).toArray()},action:function(a,b,c,d){b.columns().every(function(a){a=b.colReorder&&b.colReorder.transpose?b.colReorder.transpose(a,"toOriginal"):a;this.visible(d._visOriginal[a])})}}, | ||
colvisGroup:{className:"buttons-colvisGroup",action:function(a,b,c,d){b.columns(d.show).visible(!0,!1);b.columns(d.hide).visible(!1,!1);b.columns.adjust()},show:[],hide:[]}});return e.Buttons}); | ||
/*! | ||
Column visibility buttons for Buttons and DataTables. | ||
2016 SpryMedia Ltd - datatables.net/license | ||
*/ | ||
(function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(e){return h(e,window,document)}):"object"===typeof exports?module.exports=function(e,g){e||(e=window);g&&g.fn.dataTable||(g=require("datatables.net")(e,g).$);g.fn.dataTable.Buttons||require("datatables.net-buttons")(e,g);return h(g,e,e.document)}:h(jQuery,window,document)})(function(h,e,g,l){e=h.fn.dataTable;h.extend(e.ext.buttons,{colvis:function(b,a){var c=null,d={extend:"collection", | ||
init:function(f,k){c=k},text:function(f){return f.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",buttons:[{extend:"columnsToggle",columns:a.columns,columnText:a.columnText}]};b.on("column-reorder.dt"+a.namespace,function(f,k,m){b.button(null,b.button(null,c).node()).collectionRebuild([{extend:"columnsToggle",columns:a.columns,columnText:a.columnText}])});return d},columnsToggle:function(b,a){return b.columns(a.columns).indexes().map(function(c){return{extend:"columnToggle", | ||
columns:c,columnText:a.columnText}}).toArray()},columnToggle:function(b,a){return{extend:"columnVisibility",columns:a.columns,columnText:a.columnText}},columnsVisibility:function(b,a){return b.columns(a.columns).indexes().map(function(c){return{extend:"columnVisibility",columns:c,visibility:a.visibility,columnText:a.columnText}}).toArray()},columnVisibility:{columns:l,text:function(b,a,c){return c._columnText(b,c)},className:"buttons-columnVisibility",action:function(b,a,c,d){b=a.columns(d.columns); | ||
a=b.visible();b.visible(d.visibility!==l?d.visibility:!(a.length&&a[0]))},init:function(b,a,c){var d=this;a.attr("data-cv-idx",c.columns);b.on("column-visibility.dt"+c.namespace,function(f,k){k.bDestroying||k.nTable!=b.settings()[0].nTable||d.active(b.column(c.columns).visible())}).on("column-reorder.dt"+c.namespace,function(f,k,m){c.destroying||1!==b.columns(c.columns).count()||(d.text(c._columnText(b,c)),d.active(b.column(c.columns).visible()))});this.active(b.column(c.columns).visible())},destroy:function(b, | ||
a,c){b.off("column-visibility.dt"+c.namespace).off("column-reorder.dt"+c.namespace)},_columnText:function(b,a){var c=b.column(a.columns).index(),d=b.settings()[0].aoColumns[c].sTitle;d||(d=b.column(c).header().innerHTML);d=d.replace(/\n/g," ").replace(/<br\s*\/?>/gi," ").replace(/<select(.*?)<\/select>/g,"").replace(/<!\-\-.*?\-\->/g,"").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"");return a.columnText?a.columnText(b,c,d):d}},colvisRestore:{className:"buttons-colvisRestore",text:function(b){return b.i18n("buttons.colvisRestore", | ||
"Restore visibility")},init:function(b,a,c){c._visOriginal=b.columns().indexes().map(function(d){return b.column(d).visible()}).toArray()},action:function(b,a,c,d){a.columns().every(function(f){f=a.colReorder&&a.colReorder.transpose?a.colReorder.transpose(f,"toOriginal"):f;this.visible(d._visOriginal[f])})}},colvisGroup:{className:"buttons-colvisGroup",action:function(b,a,c,d){a.columns(d.show).visible(!0,!1);a.columns(d.hide).visible(!1,!1);a.columns.adjust()},show:[],hide:[]}});return e.Buttons}); |
@@ -1,32 +0,39 @@ | ||
(function(g){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(j){return g(j,window,document)}):"object"===typeof exports?module.exports=function(j,m){j||(j=window);if(!m||!m.fn.dataTable)m=require("datatables.net")(j,m).$;m.fn.dataTable.Buttons||require("datatables.net-buttons")(j,m);return g(m,j,j.document)}:g(jQuery,window,document)})(function(g,j,m,p){function w(a){for(var b="";0<=a;)b=String.fromCharCode(a%26+65)+b,a=Math.floor(a/26)- | ||
1;return b}function o(a,b,d){var c=a.createElement(b);d&&(d.attr&&g(c).attr(d.attr),d.children&&g.each(d.children,function(a,b){c.appendChild(b)}),null!==d.text&&d.text!==p&&c.appendChild(a.createTextNode(d.text)));return c}function C(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,f=a.body.length;e<f;e++)if(c=a.body[e][b],c=null!==c&&c!==p?c.toString():"",-1!==c.indexOf("\n")?(c=c.split("\n"),c.sort(function(a,b){return b.length-a.length}),c=c[0].length): | ||
c=c.length,c>d&&(d=c),40<d)return 52;d*=1.3;return 6<d?d:6}function x(a){r===p&&(r=-1===v.serializeToString(g.parseXML(q["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r"));g.each(a,function(b,d){if(g.isPlainObject(d))x(d);else{if(r){var c=d.childNodes[0],e,f,i=[];for(e=c.attributes.length-1;0<=e;e--){f=c.attributes[e].nodeName;var k=c.attributes[e].nodeValue;-1!==f.indexOf(":")&&(i.push({name:f,value:k}),c.removeAttribute(f))}e=0;for(f=i.length;e<f;e++)k=d.createAttribute(i[e].name.replace(":","_dt_b_namespace_token_")), | ||
k.value=i[e].value,c.setAttributeNode(k)}c=v.serializeToString(d);r&&(-1===c.indexOf("<?xml")&&(c='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+c),c=c.replace(/_dt_b_namespace_token_/g,":"));c=c.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");a[b]=c}})}var h=g.fn.dataTable,i={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=m.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display= | ||
""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,d){(a=this.clients[a])&&a.receiveEvent(b,d)},log:function(a){console.log("Flash: "+a)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b= | ||
{left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!==a.style.width&&(b.width=a.style.width.replace("px",""));""!==a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b},Client:function(a){this.handlers={};this.id=i.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;i.register(this.id,this);a&&this.glue(a)}};i.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"", | ||
action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,sheetName:"",glue:function(a,b){this.domElement=i.$(a);var d=99;this.domElement.style.zIndex&&(d=parseInt(this.domElement.style.zIndex,10)+1);var c=i.getDOMObjectPosition(this.domElement);this.div=m.createElement("div");var e=this.div.style;e.position="absolute";e.left="0px";e.top="0px";e.width=c.width+"px";e.height=c.height+"px";e.zIndex=d;"undefined"!=typeof b&&""!==b&&(this.div.title=b);0!==c.width&&0!==c.height&&(this.sized= | ||
!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(c.width,c.height).replace(/&/g,"&"))},positionElement:function(){var a=i.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!==a.width&&0!==a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height=a.height)},getHTML:function(a,b){var d="",c="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e= | ||
location.href.match(/^https/i)?"https://":"http://",d=d+('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+i.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+ | ||
c+'"/><param name="wmode" value="transparent"/></object>');else d+='<embed id="'+this.movieId+'" src="'+i.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+c+'" wmode="transparent" />';return d},hide:function(){this.div&&(this.div.style.left="-2000px")}, | ||
show:function(){this.reposition()},destroy:function(){var a=this;this.domElement&&this.div&&(g(this.div).remove(),this.div=this.domElement=null,g.each(i.clients,function(b,d){d===a&&delete i.clients[b]}))},reposition:function(a){a&&((this.domElement=i.$(a))||this.hide());if(this.domElement&&this.div){var a=i.getDOMObjectPosition(this.domElement),b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+= | ||
/*! | ||
Flash export buttons for Buttons and DataTables. | ||
2015-2017 SpryMedia Ltd - datatables.net/license | ||
ZeroClipbaord - MIT license | ||
Copyright (c) 2012 Joseph Huckaby | ||
*/ | ||
(function(g){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(q){return g(q,window,document)}):"object"===typeof exports?module.exports=function(q,r){q||(q=window);r&&r.fn.dataTable||(r=require("datatables.net")(q,r).$);r.fn.dataTable.Buttons||require("datatables.net-buttons")(q,r);return g(r,q,q.document)}:g(jQuery,window,document)})(function(g,q,r,z){function M(a){for(var b="";0<=a;)b=String.fromCharCode(a%26+65)+b,a=Math.floor(a/26)-1; | ||
return b}function t(a,b,c){var d=a.createElement(b);c&&(c.attr&&g(d).attr(c.attr),c.children&&g.each(c.children,function(f,e){d.appendChild(e)}),null!==c.text&&c.text!==z&&d.appendChild(a.createTextNode(c.text)));return d}function S(a,b){var c=a.header[b].length;a.footer&&a.footer[b].length>c&&(c=a.footer[b].length);for(var d=0,f=a.body.length;d<f;d++){var e=a.body[d][b];e=null!==e&&e!==z?e.toString():"";-1!==e.indexOf("\n")?(e=e.split("\n"),e.sort(function(n,l){return l.length-n.length}),e=e[0].length): | ||
e=e.length;e>c&&(c=e);if(40<c)return 52}c*=1.3;return 6<c?c:6}function N(a){G===z&&(G=-1===J.serializeToString(g.parseXML(A["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r"));g.each(a,function(b,c){if(g.isPlainObject(c))N(c);else{if(G){var d=c.childNodes[0],f,e=[];for(f=d.attributes.length-1;0<=f;f--){var n=d.attributes[f].nodeName;var l=d.attributes[f].nodeValue;-1!==n.indexOf(":")&&(e.push({name:n,value:l}),d.removeAttribute(n))}f=0;for(n=e.length;f<n;f++)l=c.createAttribute(e[f].name.replace(":", | ||
"_dt_b_namespace_token_")),l.value=e[f].value,d.setAttributeNode(l)}c=J.serializeToString(c);G&&(-1===c.indexOf("<?xml")&&(c='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+c),c=c.replace(/_dt_b_namespace_token_/g,":"));c=c.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");a[b]=c}})}var w=g.fn.dataTable,m={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=r.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show= | ||
function(){this.style.display=""},a.addClass=function(b){this.removeClass(b);this.className+=" "+b},a.removeClass=function(b){this.className=this.className.replace(new RegExp("\\s*"+b+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(b){return!!this.className.match(new RegExp("\\s*"+b+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){(a=this.clients[a])&&a.receiveEvent(b,c)},log:function(a){console.log("Flash: "+a)},register:function(a, | ||
b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!==a.style.width&&(b.width=a.style.width.replace("px",""));""!==a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b},Client:function(a){this.handlers={};this.id=m.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;m.register(this.id,this);a&&this.glue(a)}}; | ||
m.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,sheetName:"",glue:function(a,b){this.domElement=m.$(a);a=99;this.domElement.style.zIndex&&(a=parseInt(this.domElement.style.zIndex,10)+1);var c=m.getDOMObjectPosition(this.domElement);this.div=r.createElement("div");var d=this.div.style;d.position="absolute";d.left="0px";d.top="0px";d.width=c.width+"px";d.height=c.height+"px";d.zIndex=a;"undefined"!=typeof b&& | ||
""!==b&&(this.div.title=b);0!==c.width&&0!==c.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(c.width,c.height).replace(/&/g,"&"))},positionElement:function(){var a=m.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!==a.width&&0!==a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height=a.height)},getHTML:function(a,b){var c="",d="id="+this.id+ | ||
"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/)){var f=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+f+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+m.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+ | ||
d+'"/><param name="wmode" value="transparent"/></object>'}else c+='<embed id="'+this.movieId+'" src="'+m.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+d+'" wmode="transparent" />';return c},hide:function(){this.div&&(this.div.style.left="-2000px")}, | ||
show:function(){this.reposition()},destroy:function(){var a=this;this.domElement&&this.div&&(g(this.div).remove(),this.div=this.domElement=null,g.each(m.clients,function(b,c){c===a&&delete m.clients[b]}))},reposition:function(a){a&&((this.domElement=m.$(a))||this.hide());if(this.domElement&&this.div){a=m.getDOMObjectPosition(this.domElement);var b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+= | ||
a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)},setSheetData:function(a){this.ready&&this.movie.setSheetData(JSON.stringify(a))},setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled= | ||
a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){var d,a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=m.getElementById(this.movieId);if(!this.movie){d=this;setTimeout(function(){d.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){d=this;setTimeout(function(){d.receiveEvent("load",null)},100);this.ready=!0;return}this.ready= | ||
a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=r.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=!0;return}this.ready= | ||
!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setHandCursor(this.handCursorEnabled);break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&& | ||
this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var c=0,e=this.handlers[a].length;c<e;c++){var f=this.handlers[a][c];if("function"==typeof f)f(this,b);else if("object"==typeof f&&2==f.length)f[0][f[1]](this,b);else if("string"==typeof f)j[f](this,b)}}};i.hasFlash=function(){try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return!0}catch(a){if(navigator.mimeTypes&& | ||
navigator.mimeTypes["application/x-shockwave-flash"]!==p&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return!0}return!1};j.ZeroClipboard_TableTools=i;var y=function(a,b){b.attr("id");b.parents("html").length?a.glue(b[0],""):setTimeout(function(){y(a,b)},500)},D=function(a){var b="Sheet1";a.sheetName&&(b=a.sheetName.replace(/[\[\]\*\/\\\?\:]/g,""));return b},t=function(a,b){var d=b.match(/[\s\S]{1,8192}/g)||[];a.clearText();for(var c=0,e=d.length;c<e;c++)a.appendText(d[c])}, | ||
z=function(a){return a.newline?a.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n"},A=function(a,b){for(var d=z(b),c=a.buttons.exportData(b.exportOptions),e=b.fieldBoundary,f=b.fieldSeparator,g=RegExp(e,"g"),i=b.escapeChar!==p?b.escapeChar:"\\",j=function(a){for(var b="",c=0,d=a.length;c<d;c++)0<c&&(b+=f),b+=e?e+(""+a[c]).replace(g,i+e)+e:a[c];return b},m=b.header?j(c.header)+d:"",o=b.footer&&c.footer?d+j(c.footer):"",n=[],l=0,h=c.body.length;l<h;l++)n.push(j(c.body[l]));return{str:m+n.join(d)+ | ||
o,rows:n.length}},u={available:function(){return i.hasFlash()},init:function(a,b,d){i.moviePath=h.Buttons.swfPath;var c=new i.Client;c.setHandCursor(!0);c.addEventListener("mouseDown",function(){d._fromFlash=!0;a.button(b[0]).trigger();d._fromFlash=!1});y(c,b);d._flash=c},destroy:function(a,b,d){d._flash.destroy()},fieldSeparator:",",fieldBoundary:'"',exportOptions:{},title:"*",messageTop:"*",messageBottom:"*",filename:"*",extension:".csv",header:!0,footer:!1},v="",v="undefined"===typeof j.XMLSerializer? | ||
new function(){this.serializeToString=function(a){return a.xml}}:new XMLSerializer,r,q={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>', | ||
this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var d=0,f=this.handlers[a].length;d<f;d++){var e=this.handlers[a][d];if("function"==typeof e)e(this,b);else if("object"==typeof e&&2==e.length)e[0][e[1]](this,b);else if("string"==typeof e)q[e](this,b)}}};m.hasFlash=function(){try{return new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),!0}catch(a){if(navigator.mimeTypes&& | ||
navigator.mimeTypes["application/x-shockwave-flash"]!==z&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return!0}return!1};q.ZeroClipboard_TableTools=m;var O=function(a,b){b.attr("id");b.parents("html").length?a.glue(b[0],""):setTimeout(function(){O(a,b)},500)},T=function(a){var b="Sheet1";a.sheetName&&(b=a.sheetName.replace(/[\[\]\*\/\\\?:]/g,""));return b},H=function(a,b){b=b.match(/[\s\S]{1,8192}/g)||[];a.clearText();for(var c=0,d=b.length;c<d;c++)a.appendText(b[c])},P=function(a){return a.newline? | ||
a.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n"},Q=function(a,b){var c=P(b);a=a.buttons.exportData(b.exportOptions);var d=b.fieldBoundary,f=b.fieldSeparator,e=new RegExp(d,"g"),n=b.escapeChar!==z?b.escapeChar:"\\",l=function(u){for(var x="",B=0,h=u.length;B<h;B++)0<B&&(x+=f),x+=d?d+(""+u[B]).replace(e,n+d)+d:u[B];return x},E=b.header?l(a.header)+c:"";b=b.footer&&a.footer?c+l(a.footer):"";for(var C=[],p=0,v=a.body.length;p<v;p++)C.push(l(a.body[p]));return{str:E+C.join(c)+b,rows:C.length}}, | ||
I={available:function(){return m.hasFlash()},init:function(a,b,c){m.moviePath=w.Buttons.swfPath;var d=new m.Client;d.setHandCursor(!0);d.addEventListener("mouseDown",function(f){c._fromFlash=!0;a.button(b[0]).trigger();c._fromFlash=!1});O(d,b);c._flash=d},destroy:function(a,b,c){c._flash.destroy()},fieldSeparator:",",fieldBoundary:'"',exportOptions:{},title:"*",messageTop:"*",messageBottom:"*",filename:"*",extension:".csv",header:!0,footer:!1},J="";J="undefined"===typeof q.XMLSerializer?new function(){this.serializeToString= | ||
function(a){return a.xml}}:new XMLSerializer;var G,A={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>', | ||
"[Content_Types].xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="jpeg" ContentType="image/jpeg" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /></Types>', | ||
"xl/workbook.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/><workbookPr showInkAnnotation="0" autoCompressPictures="0"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/></bookViews><sheets><sheet name="" sheetId="1" r:id="rId1"/></sheets></workbook>', | ||
"xl/worksheets/sheet1.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><sheetData/><mergeCells count="0"/></worksheet>',"xl/styles.xml":'<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="6"><numFmt numFmtId="164" formatCode="#,##0.00_- [$$-45C]"/><numFmt numFmtId="165" formatCode=""£"#,##0.00"/><numFmt numFmtId="166" formatCode="[$€-2] #,##0.00"/><numFmt numFmtId="167" formatCode="0.0%"/><numFmt numFmtId="168" formatCode="#,##0;(#,##0)"/><numFmt numFmtId="169" formatCode="#,##0.00;(#,##0.00)"/></numFmts><fonts count="5" x14ac:knownFonts="1"><font><sz val="11" /><name val="Calibri" /></font><font><sz val="11" /><name val="Calibri" /><color rgb="FFFFFFFF" /></font><font><sz val="11" /><name val="Calibri" /><b /></font><font><sz val="11" /><name val="Calibri" /><i /></font><font><sz val="11" /><name val="Calibri" /><u /></font></fonts><fills count="6"><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD9D9D9" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD99795" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6efce" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6cfef" /><bgColor indexed="64" /></patternFill></fill></fills><borders count="2"><border><left /><right /><top /><bottom /><diagonal /></border><border diagonalUp="false" diagonalDown="false"><left style="thin"><color auto="1" /></left><right style="thin"><color auto="1" /></right><top style="thin"><color auto="1" /></top><bottom style="thin"><color auto="1" /></bottom><diagonal /></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" /></cellStyleXfs><cellXfs count="61"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="left"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="fill"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment textRotation="90"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment wrapText="1"/></xf><xf numFmtId="9" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="164" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="165" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="166" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="167" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="168" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="169" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="3" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="4" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0" /></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4" /></styleSheet>'}, | ||
B=[{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: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}];h.Buttons.swfPath="//cdn.datatables.net/buttons/"+ | ||
h.Buttons.version+"/swf/flashExport.swf";h.Api.register("buttons.resize()",function(){g.each(i.clients,function(a,b){b.domElement!==p&&b.domElement.parentNode&&b.positionElement()})});h.ext.buttons.copyFlash=g.extend({},u,{className:"buttons-copy buttons-flash",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,b,d,c){if(c._fromFlash){this.processing(!0);var a=c._flash,e=A(b,c),d=b.buttons.exportInfo(c),f=z(c),e=e.str;d.title&&(e=d.title+f+f+e);d.messageTop&&(e=d.messageTop+ | ||
f+f+e);d.messageBottom&&(e=e+f+f+d.messageBottom);c.customize&&(e=c.customize(e,c,b));a.setAction("copy");t(a,e);this.processing(!1);b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),b.i18n("buttons.copySuccess",{_:"Copied %d rows to clipboard",1:"Copied 1 row to clipboard"},data.rows),3E3)}},fieldSeparator:"\t",fieldBoundary:""});h.ext.buttons.csvFlash=g.extend({},u,{className:"buttons-csv buttons-flash",text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,b,d,c){var a= | ||
c._flash,e=A(b,c),d=b.buttons.exportInfo(c),b=c.customize?c.customize(e.str,c,b):e.str;a.setAction("csv");a.setFileName(d.filename);t(a,b)},escapeChar:'"'});h.ext.buttons.excelFlash=g.extend({},u,{className:"buttons-excel buttons-flash",text:function(a){return a.i18n("buttons.excel","Excel")},action:function(a,b,d,c){this.processing(!0);var a=c._flash,e=0,f=g.parseXML(q["xl/worksheets/sheet1.xml"]),i=f.getElementsByTagName("sheetData")[0],d={_rels:{".rels":g.parseXML(q["_rels/.rels"])},xl:{_rels:{"workbook.xml.rels":g.parseXML(q["xl/_rels/workbook.xml.rels"])}, | ||
"workbook.xml":g.parseXML(q["xl/workbook.xml"]),"styles.xml":g.parseXML(q["xl/styles.xml"]),worksheets:{"sheet1.xml":f}},"[Content_Types].xml":g.parseXML(q["[Content_Types].xml"])},k=b.buttons.exportData(c.exportOptions),j,m,h=function(a){j=e+1;m=o(f,"row",{attr:{r:j}});for(var b=0,d=a.length;b<d;b++){var g=w(b)+""+j,h=null;if(null===a[b]||a[b]===p||""===a[b])if(!0===c.createEmptyCells)a[b]="";else continue;a[b]="function"===typeof a[b].trim?a[b].trim():a[b];for(var k=0,n=B.length;k<n;k++){var l= | ||
B[k];if(a[b].match&&!a[b].match(/^0\d+/)&&a[b].match(l.match)){h=a[b].replace(/[^\d\.\-]/g,"");l.fmt&&(h=l.fmt(h));h=o(f,"c",{attr:{r:g,s:l.style},children:[o(f,"v",{text:h})]});break}}h||("number"===typeof a[b]||a[b].match&&a[b].match(/^-?\d+(\.\d+)?$/)&&!a[b].match(/^0\d+/)?h=o(f,"c",{attr:{t:"n",r:g},children:[o(f,"v",{text:a[b]})]}):(l=!a[b].replace?a[b]:a[b].replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""),h=o(f,"c",{attr:{t:"inlineStr",r:g},children:{row:o(f,"is",{children:{row:o(f,"t", | ||
{text:l})}})}})));m.appendChild(h)}i.appendChild(m);e++};g("sheets sheet",d.xl["workbook.xml"]).attr("name",D(c));c.customizeData&&c.customizeData(k);var n=function(a,b){var c=g("mergeCells",f);c[0].appendChild(o(f,"mergeCell",{attr:{ref:"A"+a+":"+w(b)+a}}));c.attr("count",c.attr("count")+1);g("row:eq("+(a-1)+") c",f).attr("s","51")},l=b.buttons.exportInfo(c);l.title&&(h([l.title],e),n(e,k.header.length-1));l.messageTop&&(h([l.messageTop],e),n(e,k.header.length-1));c.header&&(h(k.header,e),g("row:last c", | ||
f).attr("s","2"));for(var s=0,r=k.body.length;s<r;s++)h(k.body[s],e);c.footer&&k.footer&&(h(k.footer,e),g("row:last c",f).attr("s","2"));l.messageBottom&&(h([l.messageBottom],e),n(e,k.header.length-1));h=o(f,"cols");g("worksheet",f).prepend(h);n=0;for(s=k.header.length;n<s;n++)h.appendChild(o(f,"col",{attr:{min:n+1,max:n+1,width:C(k,n),customWidth:1}}));c.customize&&c.customize(d,c,b);x(d);a.setAction("excel");a.setFileName(l.filename);a.setSheetData(d);t(a,"");this.processing(!1)},extension:".xlsx", | ||
createEmptyCells:!1});h.ext.buttons.pdfFlash=g.extend({},u,{className:"buttons-pdf buttons-flash",text:function(a){return a.i18n("buttons.pdf","PDF")},action:function(a,b,d,c){this.processing(!0);var a=c._flash,d=b.buttons.exportData(c.exportOptions),e=b.buttons.exportInfo(c),f=b.table().node().offsetWidth,g=b.columns(c.columns).indexes().map(function(a){return b.column(a).header().offsetWidth/f});a.setAction("pdf");a.setFileName(e.filename);t(a,JSON.stringify({title:e.title||"",messageTop:e.messageTop|| | ||
"",messageBottom:e.messageBottom||"",colWidth:g.toArray(),orientation:c.orientation,size:c.pageSize,header:c.header?d.header:null,footer:c.footer?d.footer:null,body:d.body}));this.processing(!1)},extension:".pdf",orientation:"portrait",pageSize:"A4",newline:"\n"});return h.Buttons}); | ||
R=[{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: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}];w.Buttons.swfPath="//cdn.datatables.net/buttons/"+ | ||
w.Buttons.version+"/swf/flashExport.swf";w.Api.register("buttons.resize()",function(){g.each(m.clients,function(a,b){b.domElement!==z&&b.domElement.parentNode&&b.positionElement()})});w.ext.buttons.copyFlash=g.extend({},I,{className:"buttons-copy buttons-flash",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,b,c,d){if(d._fromFlash){this.processing(!0);a=d._flash;var f=Q(b,d);c=b.buttons.exportInfo(d);var e=P(d);f=f.str;c.title&&(f=c.title+e+e+f);c.messageTop&&(f=c.messageTop+ | ||
e+e+f);c.messageBottom&&(f=f+e+e+c.messageBottom);d.customize&&(f=d.customize(f,d,b));a.setAction("copy");H(a,f);this.processing(!1);b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),b.i18n("buttons.copySuccess",{_:"Copied %d rows to clipboard",1:"Copied 1 row to clipboard"},data.rows),3E3)}},fieldSeparator:"\t",fieldBoundary:""});w.ext.buttons.csvFlash=g.extend({},I,{className:"buttons-csv buttons-flash",text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,b,c,d){a= | ||
d._flash;var f=Q(b,d);c=b.buttons.exportInfo(d);b=d.customize?d.customize(f.str,d,b):f.str;a.setAction("csv");a.setFileName(c.filename);H(a,b)},escapeChar:'"'});w.ext.buttons.excelFlash=g.extend({},I,{className:"buttons-excel buttons-flash",text:function(a){return a.i18n("buttons.excel","Excel")},action:function(a,b,c,d){this.processing(!0);a=d._flash;var f=0,e=g.parseXML(A["xl/worksheets/sheet1.xml"]),n=e.getElementsByTagName("sheetData")[0];c={_rels:{".rels":g.parseXML(A["_rels/.rels"])},xl:{_rels:{"workbook.xml.rels":g.parseXML(A["xl/_rels/workbook.xml.rels"])}, | ||
"workbook.xml":g.parseXML(A["xl/workbook.xml"]),"styles.xml":g.parseXML(A["xl/styles.xml"]),worksheets:{"sheet1.xml":e}},"[Content_Types].xml":g.parseXML(A["[Content_Types].xml"])};var l=b.buttons.exportData(d.exportOptions),E,C,p=function(h){E=f+1;C=t(e,"row",{attr:{r:E}});for(var k=0,F=h.length;k<F;k++){var K=M(k)+""+E,y=null;if(null===h[k]||h[k]===z||""===h[k])if(!0===d.createEmptyCells)h[k]="";else continue;h[k]="function"===typeof h[k].trim?h[k].trim():h[k];for(var L=0,U=R.length;L<U;L++){var D= | ||
R[L];if(h[k].match&&!h[k].match(/^0\d+/)&&h[k].match(D.match)){y=h[k].replace(/[^\d\.\-]/g,"");D.fmt&&(y=D.fmt(y));y=t(e,"c",{attr:{r:K,s:D.style},children:[t(e,"v",{text:y})]});break}}y||("number"===typeof h[k]||h[k].match&&h[k].match(/^-?\d+(\.\d+)?$/)&&!h[k].match(/^0\d+/)?y=t(e,"c",{attr:{t:"n",r:K},children:[t(e,"v",{text:h[k]})]}):(D=h[k].replace?h[k].replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""):h[k],y=t(e,"c",{attr:{t:"inlineStr",r:K},children:{row:t(e,"is",{children:{row:t(e,"t",{text:D})}})}}))); | ||
C.appendChild(y)}n.appendChild(C);f++};g("sheets sheet",c.xl["workbook.xml"]).attr("name",T(d));d.customizeData&&d.customizeData(l);var v=function(h,k){var F=g("mergeCells",e);F[0].appendChild(t(e,"mergeCell",{attr:{ref:"A"+h+":"+M(k)+h}}));F.attr("count",F.attr("count")+1);g("row:eq("+(h-1)+") c",e).attr("s","51")},u=b.buttons.exportInfo(d);u.title&&(p([u.title],f),v(f,l.header.length-1));u.messageTop&&(p([u.messageTop],f),v(f,l.header.length-1));d.header&&(p(l.header,f),g("row:last c",e).attr("s", | ||
"2"));for(var x=0,B=l.body.length;x<B;x++)p(l.body[x],f);d.footer&&l.footer&&(p(l.footer,f),g("row:last c",e).attr("s","2"));u.messageBottom&&(p([u.messageBottom],f),v(f,l.header.length-1));p=t(e,"cols");g("worksheet",e).prepend(p);v=0;for(x=l.header.length;v<x;v++)p.appendChild(t(e,"col",{attr:{min:v+1,max:v+1,width:S(l,v),customWidth:1}}));d.customize&&d.customize(c,d,b);N(c);a.setAction("excel");a.setFileName(u.filename);a.setSheetData(c);H(a,"");this.processing(!1)},extension:".xlsx",createEmptyCells:!1}); | ||
w.ext.buttons.pdfFlash=g.extend({},I,{className:"buttons-pdf buttons-flash",text:function(a){return a.i18n("buttons.pdf","PDF")},action:function(a,b,c,d){this.processing(!0);a=d._flash;c=b.buttons.exportData(d.exportOptions);var f=b.buttons.exportInfo(d),e=b.table().node().offsetWidth,n=b.columns(d.columns).indexes().map(function(l){return b.column(l).header().offsetWidth/e});a.setAction("pdf");a.setFileName(f.filename);H(a,JSON.stringify({title:f.title||"",messageTop:f.messageTop||"",messageBottom:f.messageBottom|| | ||
"",colWidth:n.toArray(),orientation:d.orientation,size:d.pageSize,header:d.header?c.header:null,footer:d.footer?c.footer:null,body:c.body}));this.processing(!1)},extension:".pdf",orientation:"portrait",pageSize:"A4",newline:"\n"});return w.Buttons}); |
@@ -775,3 +775,3 @@ /*! | ||
var _excelSpecials = [ | ||
{ match: /^\-?\d+\.\d%$/, style: 60, fmt: function (d) { return d/100; } }, // Precent with d.p. | ||
{ match: /^\-?\d+\.\d%$/, style: 60, fmt: function (d) { return d/100; } }, // Percent with d.p. | ||
{ match: /^\-?\d+\.?\d*%$/, style: 56, fmt: function (d) { return d/100; } }, // Percent | ||
@@ -778,0 +778,0 @@ { match: /^\-?\$[\d,]+.?\d*$/, style: 57 }, // Dollars |
@@ -1,29 +0,36 @@ | ||
(function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(f){return h(f,window,document)}):"object"===typeof exports?module.exports=function(f,j,v,q){f||(f=window);if(!j||!j.fn.dataTable)j=require("datatables.net")(f,j).$;j.fn.dataTable.Buttons||require("datatables.net-buttons")(f,j);return h(j,f,f.document,v,q)}:h(jQuery,window,document)})(function(h,f,j,v,q,r){function w(a){for(var c="";0<=a;)c=String.fromCharCode(a%26+65)+c,a=Math.floor(a/ | ||
26)-1;return c}function A(a,c){x===r&&(x=-1===z.serializeToString((new f.DOMParser).parseFromString(B["xl/worksheets/sheet1.xml"],"text/xml")).indexOf("xmlns:r"));h.each(c,function(c,b){if(h.isPlainObject(b)){var e=a.folder(c);A(e,b)}else{if(x){var e=b.childNodes[0],g,k,i=[];for(g=e.attributes.length-1;0<=g;g--){k=e.attributes[g].nodeName;var f=e.attributes[g].nodeValue;-1!==k.indexOf(":")&&(i.push({name:k,value:f}),e.removeAttribute(k))}g=0;for(k=i.length;g<k;g++)f=b.createAttribute(i[g].name.replace(":", | ||
"_dt_b_namespace_token_")),f.value=i[g].value,e.setAttributeNode(f)}e=z.serializeToString(b);x&&(-1===e.indexOf("<?xml")&&(e='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+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(c,e)}})}function o(a,c,d){var b=a.createElement(c);d&&(d.attr&&h(b).attr(d.attr),d.children&&h.each(d.children,function(a,c){b.appendChild(c)}),null!==d.text&&d.text!== | ||
r&&b.appendChild(a.createTextNode(d.text)));return b}function L(a,c){var d=a.header[c].length,b;a.footer&&a.footer[c].length>d&&(d=a.footer[c].length);for(var e=0,g=a.body.length;e<g;e++)if(b=a.body[e][c],b=null!==b&&b!==r?b.toString():"",-1!==b.indexOf("\n")?(b=b.split("\n"),b.sort(function(a,b){return b.length-a.length}),b=b[0].length):b=b.length,b>d&&(d=b),40<d)return 54;d*=1.35;return 6<d?d:6}var p=h.fn.dataTable;p.Buttons.pdfMake=function(a){if(!a)return q||f.pdfMake;q=a};p.Buttons.jszip=function(a){if(!a)return v|| | ||
f.JSZip;v=a};var u;var l="undefined"!==typeof self&&self||"undefined"!==typeof f&&f||this.content;if("undefined"===typeof l||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))u=void 0;else{var y=l.document.createElementNS("http://www.w3.org/1999/xhtml","a"),M="download"in y,N=/constructor/i.test(l.HTMLElement)||l.safari,C=/CriOS\/[\d]+/.test(navigator.userAgent),O=function(a){(l.setImmediate||l.setTimeout)(function(){throw a;},0)},D=function(a){setTimeout(function(){"string"=== | ||
typeof a?(l.URL||l.webkitURL||l).revokeObjectURL(a):a.remove()},4E4)},E=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob([String.fromCharCode(65279),a],{type:a.type}):a},F=function(a,c,d){d||(a=E(a));var b=this,d="application/octet-stream"===a.type,e,g=function(){for(var a=["writestart","progress","write","writeend"],a=[].concat(a),c=a.length;c--;){var d=b["on"+a[c]];if("function"===typeof d)try{d.call(b,b)}catch(e){O(e)}}};b.readyState= | ||
b.INIT;if(M)e=(l.URL||l.webkitURL||l).createObjectURL(a),setTimeout(function(){y.href=e;y.download=c;var a=new MouseEvent("click");y.dispatchEvent(a);g();D(e);b.readyState=b.DONE});else if((C||d&&N)&&l.FileReader){var k=new FileReader;k.onloadend=function(){var a=C?k.result:k.result.replace(/^data:[^;]*;/,"data:attachment/file;");l.open(a,"_blank")||(l.location.href=a);b.readyState=b.DONE;g()};k.readAsDataURL(a);b.readyState=b.INIT}else e||(e=(l.URL||l.webkitURL||l).createObjectURL(a)),d?l.location.href= | ||
e:l.open(e,"_blank")||(l.location.href=e),b.readyState=b.DONE,g(),D(e)},n=F.prototype;"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob?u=function(a,c,d){c=c||a.name||"download";d||(a=E(a));return navigator.msSaveOrOpenBlob(a,c)}:(n.abort=function(){},n.readyState=n.INIT=0,n.WRITING=1,n.DONE=2,n.error=n.onwritestart=n.onprogress=n.onwrite=n.onabort=n.onerror=n.onwriteend=null,u=function(a,c,d){return new F(a,c||a.name||"download",d)})}p.fileSave=u;var G=function(a){var c="Sheet1";a.sheetName&& | ||
(c=a.sheetName.replace(/[\[\]\*\/\\\?\:]/g,""));return c},H=function(a){return a.newline?a.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n"},I=function(a,c){for(var d=H(c),b=a.buttons.exportData(c.exportOptions),e=c.fieldBoundary,g=c.fieldSeparator,k=RegExp(e,"g"),i=c.escapeChar!==r?c.escapeChar:"\\",h=function(a){for(var b="",c=0,d=a.length;c<d;c++)0<c&&(b+=g),b+=e?e+(""+a[c]).replace(k,i+e)+e:a[c];return b},f=c.header?h(b.header)+d:"",l=c.footer&&b.footer?d+h(b.footer):"",j=[],m=0,o=b.body.length;m< | ||
o;m++)j.push(h(b.body[m]));return{str:f+j.join(d)+l,rows:j.length}},J=function(){if(!(-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Opera")))return!1;var a=navigator.userAgent.match(/AppleWebKit\/(\d+\.\d+)/);return a&&1<a.length&&603.1>1*a[1]?!0:!1};try{var z=new XMLSerializer,x}catch(P){}var B={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>', | ||
/*! | ||
HTML5 export buttons for Buttons and DataTables. | ||
2016 SpryMedia Ltd - datatables.net/license | ||
FileSaver.js (1.3.3) - MIT license | ||
Copyright © 2016 Eli Grey - http://eligrey.com | ||
*/ | ||
(function(n){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(u){return n(u,window,document)}):"object"===typeof exports?module.exports=function(u,x,E,F){u||(u=window);x&&x.fn.dataTable||(x=require("datatables.net")(u,x).$);x.fn.dataTable.Buttons||require("datatables.net-buttons")(u,x);return n(x,u,u.document,E,F)}:n(jQuery,window,document)})(function(n,u,x,E,F,B){function I(a){for(var c="";0<=a;)c=String.fromCharCode(a%26+65)+c,a=Math.floor(a/ | ||
26)-1;return c}function O(a,c){J===B&&(J=-1===M.serializeToString((new u.DOMParser).parseFromString(P["xl/worksheets/sheet1.xml"],"text/xml")).indexOf("xmlns:r"));n.each(c,function(d,b){if(n.isPlainObject(b))d=a.folder(d),O(d,b);else{if(J){var m=b.childNodes[0],e,f=[];for(e=m.attributes.length-1;0<=e;e--){var g=m.attributes[e].nodeName;var p=m.attributes[e].nodeValue;-1!==g.indexOf(":")&&(f.push({name:g,value:p}),m.removeAttribute(g))}e=0;for(g=f.length;e<g;e++)p=b.createAttribute(f[e].name.replace(":", | ||
"_dt_b_namespace_token_")),p.value=f[e].value,m.setAttributeNode(p)}b=M.serializeToString(b);J&&(-1===b.indexOf("<?xml")&&(b='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+b),b=b.replace(/_dt_b_namespace_token_/g,":"),b=b.replace(/xmlns:NS[\d]+="" NS[\d]+:/g,""));b=b.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");a.file(d,b)}})}function y(a,c,d){var b=a.createElement(c);d&&(d.attr&&n(b).attr(d.attr),d.children&&n.each(d.children,function(m,e){b.appendChild(e)}),null!==d.text&&d.text!== | ||
B&&b.appendChild(a.createTextNode(d.text)));return b}function V(a,c){var d=a.header[c].length;a.footer&&a.footer[c].length>d&&(d=a.footer[c].length);for(var b=0,m=a.body.length;b<m;b++){var e=a.body[b][c];e=null!==e&&e!==B?e.toString():"";-1!==e.indexOf("\n")?(e=e.split("\n"),e.sort(function(f,g){return g.length-f.length}),e=e[0].length):e=e.length;e>d&&(d=e);if(40<d)return 54}d*=1.35;return 6<d?d:6}var D=n.fn.dataTable;D.Buttons.pdfMake=function(a){if(!a)return F||u.pdfMake;F=a};D.Buttons.jszip= | ||
function(a){if(!a)return E||u.JSZip;E=a};var K=function(a){if(!("undefined"===typeof a||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var c=a.document.createElementNS("http://www.w3.org/1999/xhtml","a"),d="download"in c,b=/constructor/i.test(a.HTMLElement)||a.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent),e=function(h){(a.setImmediate||a.setTimeout)(function(){throw h;},0)},f=function(h){setTimeout(function(){"string"===typeof h?(a.URL||a.webkitURL||a).revokeObjectURL(h): | ||
h.remove()},4E4)},g=function(h){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob([String.fromCharCode(65279),h],{type:h.type}):h},p=function(h,q,v){v||(h=g(h));var r=this,w="application/octet-stream"===h.type,C=function(){var l=["writestart","progress","write","writeend"];l=[].concat(l);for(var z=l.length;z--;){var G=r["on"+l[z]];if("function"===typeof G)try{G.call(r,r)}catch(A){e(A)}}};r.readyState=r.INIT;if(d){var k=(a.URL||a.webkitURL||a).createObjectURL(h); | ||
setTimeout(function(){c.href=k;c.download=q;var l=new MouseEvent("click");c.dispatchEvent(l);C();f(k);r.readyState=r.DONE})}else(function(){if((m||w&&b)&&a.FileReader){var l=new FileReader;l.onloadend=function(){var z=m?l.result:l.result.replace(/^data:[^;]*;/,"data:attachment/file;");a.open(z,"_blank")||(a.location.href=z);r.readyState=r.DONE;C()};l.readAsDataURL(h);r.readyState=r.INIT}else k||(k=(a.URL||a.webkitURL||a).createObjectURL(h)),w?a.location.href=k:a.open(k,"_blank")||(a.location.href= | ||
k),r.readyState=r.DONE,C(),f(k)})()},t=p.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(h,q,v){q=q||h.name||"download";v||(h=g(h));return navigator.msSaveOrOpenBlob(h,q)};t.abort=function(){};t.readyState=t.INIT=0;t.WRITING=1;t.DONE=2;t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null;return function(h,q,v){return new p(h,q||h.name||"download",v)}}}("undefined"!==typeof self&&self||"undefined"!==typeof u&&u||this.content);D.fileSave= | ||
K;var Q=function(a){var c="Sheet1";a.sheetName&&(c=a.sheetName.replace(/[\[\]\*\/\\\?:]/g,""));return c},R=function(a){return a.newline?a.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n"},S=function(a,c){var d=R(c);a=a.buttons.exportData(c.exportOptions);var b=c.fieldBoundary,m=c.fieldSeparator,e=new RegExp(b,"g"),f=c.escapeChar!==B?c.escapeChar:"\\",g=function(v){for(var r="",w=0,C=v.length;w<C;w++)0<w&&(r+=m),r+=b?b+(""+v[w]).replace(e,f+b)+b:v[w];return r},p=c.header?g(a.header)+d:"";c= | ||
c.footer&&a.footer?d+g(a.footer):"";for(var t=[],h=0,q=a.body.length;h<q;h++)t.push(g(a.body[h]));return{str:p+t.join(d)+c,rows:t.length}},T=function(){if(-1===navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("Chrome")||-1!==navigator.userAgent.indexOf("Opera"))return!1;var a=navigator.userAgent.match(/AppleWebKit\/(\d+\.\d+)/);return a&&1<a.length&&603.1>1*a[1]?!0:!1};try{var M=new XMLSerializer,J}catch(a){}var P={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>', | ||
"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>',"[Content_Types].xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="jpeg" ContentType="image/jpeg" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /></Types>', | ||
"xl/workbook.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/><workbookPr showInkAnnotation="0" autoCompressPictures="0"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><definedNames/></workbook>', | ||
"xl/worksheets/sheet1.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><sheetData/><mergeCells count="0"/></worksheet>',"xl/styles.xml":'<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="6"><numFmt numFmtId="164" formatCode="#,##0.00_- [$$-45C]"/><numFmt numFmtId="165" formatCode=""£"#,##0.00"/><numFmt numFmtId="166" formatCode="[$€-2] #,##0.00"/><numFmt numFmtId="167" formatCode="0.0%"/><numFmt numFmtId="168" formatCode="#,##0;(#,##0)"/><numFmt numFmtId="169" formatCode="#,##0.00;(#,##0.00)"/></numFmts><fonts count="5" x14ac:knownFonts="1"><font><sz val="11" /><name val="Calibri" /></font><font><sz val="11" /><name val="Calibri" /><color rgb="FFFFFFFF" /></font><font><sz val="11" /><name val="Calibri" /><b /></font><font><sz val="11" /><name val="Calibri" /><i /></font><font><sz val="11" /><name val="Calibri" /><u /></font></fonts><fills count="6"><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD9D9D9" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD99795" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6efce" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6cfef" /><bgColor indexed="64" /></patternFill></fill></fills><borders count="2"><border><left /><right /><top /><bottom /><diagonal /></border><border diagonalUp="false" diagonalDown="false"><left style="thin"><color auto="1" /></left><right style="thin"><color auto="1" /></right><top style="thin"><color auto="1" /></top><bottom style="thin"><color auto="1" /></bottom><diagonal /></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" /></cellStyleXfs><cellXfs count="68"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="left"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="fill"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment textRotation="90"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment wrapText="1"/></xf><xf numFmtId="9" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="164" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="165" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="166" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="167" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="168" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="169" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="3" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="4" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="1" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="2" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="14" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0" /></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4" /></styleSheet>'}, | ||
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},{match:/^[\d]{4}\-[\d]{2}\-[\d]{2}$/,style:67,fmt:function(a){return Math.round(25569+Date.parse(a)/864E5)}}];p.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,c,d,b){this.processing(!0);var e=this,a=I(c,b),g=c.buttons.exportInfo(b),k=H(b),i=a.str,d=h("<div/>").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});g.title&&(i=g.title+k+k+i);g.messageTop&&(i= | ||
g.messageTop+k+k+i);g.messageBottom&&(i=i+k+k+g.messageBottom);b.customize&&(i=b.customize(i,b,c));b=h("<textarea readonly/>").val(i).appendTo(d);if(j.queryCommandSupported("copy")){d.appendTo(c.table().container());b[0].focus();b[0].select();try{var f=j.execCommand("copy");d.remove();if(f){c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),c.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",_:"Copied %d rows to clipboard"},a.rows),2E3);this.processing(!1);return}}catch(l){}}f= | ||
h("<span>"+c.i18n("buttons.copyKeys","Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.")+"</span>").append(d);c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),f,0);b[0].focus();b[0].select();var o=h(f).closest(".dt-button-info"),n=function(){o.off("click.buttons-copy");h(j).off(".buttons-copy");c.buttons.info(!1)};o.on("click.buttons-copy",n);h(j).on("keydown.buttons-copy",function(a){27=== | ||
a.keyCode&&(n(),e.processing(!1))}).on("copy.buttons-copy cut.buttons-copy",function(){n();e.processing(!1)})},exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*"};p.ext.buttons.csvHtml5={bom:!1,className:"buttons-csv buttons-html5",available:function(){return f.FileReader!==r&&f.Blob},text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,c,d,b){this.processing(!0);var a=I(c,b).str,d=c.buttons.exportInfo(b),e=b.charset; | ||
b.customize&&(a=b.customize(a,b,c));!1!==e?(e||(e=j.characterSet||j.charset),e&&(e=";charset="+e)):e="";b.bom&&(a=String.fromCharCode(65279)+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};p.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return f.FileReader!==r&&(v||f.JSZip)!==r&&!J()&&z},text:function(a){return a.i18n("buttons.excel", | ||
"Excel")},action:function(a,c,d,b){this.processing(!0);var e=this,g=0,k,a=function(a){return h.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")},j=c.buttons.exportData(b.exportOptions),n,p,m=function(a){n=g+1;p=o(i,"row", | ||
{attr:{r:n}});for(var c=0,d=a.length;c<d;c++){var e=w(c)+""+n,f=null;if(null===a[c]||a[c]===r||""===a[c])if(!0===b.createEmptyCells)a[c]="";else continue;var h=a[c];a[c]="function"===typeof a[c].trim?a[c].trim():a[c];for(var j=0,k=K.length;j<k;j++){var m=K[j];if(a[c].match&&!a[c].match(/^0\d+/)&&a[c].match(m.match)){f=a[c].replace(/[^\d\.\-]/g,"");m.fmt&&(f=m.fmt(f));f=o(i,"c",{attr:{r:e,s:m.style},children:[o(i,"v",{text:f})]});break}}f||("number"===typeof a[c]||a[c].match&&a[c].match(/^-?\d+(\.\d+)?$/)&& | ||
!a[c].match(/^0\d+/)?f=o(i,"c",{attr:{t:"n",r:e},children:[o(i,"v",{text:a[c]})]}):(h=!h.replace?h:h.replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""),f=o(i,"c",{attr:{t:"inlineStr",r:e},children:{row:o(i,"is",{children:{row:o(i,"t",{text:h,attr:{"xml:space":"preserve"}})}})}})));p.appendChild(f)}l.appendChild(p);g++};b.customizeData&&b.customizeData(j);var s=function(a,c){var b=h("mergeCells",i);b[0].appendChild(o(i,"mergeCell",{attr:{ref:"A"+a+":"+w(c)+a}}));b.attr("count",parseFloat(b.attr("count"))+ | ||
1);h("row:eq("+(a-1)+") c",i).attr("s","51")},t=c.buttons.exportInfo(b);t.title&&(m([t.title],g),s(g,j.header.length-1));t.messageTop&&(m([t.messageTop],g),s(g,j.header.length-1));b.header&&(m(j.header,g),h("row:last c",i).attr("s","2"));d=g;k=0;for(var q=j.body.length;k<q;k++)m(j.body[k],g);k=g;b.footer&&j.footer&&(m(j.footer,g),h("row:last c",i).attr("s","2"));t.messageBottom&&(m([t.messageBottom],g),s(g,j.header.length-1));m=o(i,"cols");h("worksheet",i).prepend(m);s=0;for(q=j.header.length;s<q;s++)m.appendChild(o(i, | ||
"col",{attr:{min:s+1,max:s+1,width:L(j,s),customWidth:1}}));m=a.xl["workbook.xml"];h("sheets sheet",m).attr("name",G(b));b.autoFilter&&(h("mergeCells",i).before(o(i,"autoFilter",{attr:{ref:"A"+d+":"+w(j.header.length-1)+k}})),h("definedNames",m).append(o(m,"definedName",{attr:{name:"_xlnm._FilterDatabase",localSheetId:"0",hidden:1},text:G(b)+"!$A$"+d+":"+w(j.header.length-1)+k})));b.customize&&b.customize(a,b,c);0===h("mergeCells",i).children().length&&h("mergeCells",i).remove();c=new (v||f.JSZip); | ||
d={type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};A(c,a);c.generateAsync?c.generateAsync(d).then(function(a){u(a,t.filename);e.processing(false)}):(u(c.generate(d),t.filename),this.processing(!1))},filename:"*",extension:".xlsx",exportOptions:{},header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*",createEmptyCells:!1,autoFilter:!1,sheetName:""};p.ext.buttons.pdfHtml5={className:"buttons-pdf buttons-html5",available:function(){return f.FileReader!== | ||
r&&(q||f.pdfMake)},text:function(a){return a.i18n("buttons.pdf","PDF")},action:function(a,c,d,b){this.processing(!0);var d=c.buttons.exportData(b.exportOptions),a=c.buttons.exportInfo(b),e=[];b.header&&e.push(h.map(d.header,function(a){return{text:"string"===typeof a?a:a+"",style:"tableHeader"}}));for(var g=0,j=d.body.length;g<j;g++)e.push(h.map(d.body[g],function(a){if(null===a||a===r)a="";return{text:"string"===typeof a?a:a+"",style:g%2?"tableBodyEven":"tableBodyOdd"}}));b.footer&&d.footer&&e.push(h.map(d.footer, | ||
function(a){return{text:"string"===typeof a?a:a+"",style:"tableFooter"}}));d={pageSize:b.pageSize,pageOrientation:b.orientation,content:[{table:{headerRows:1,body:e},layout:"noBorders"}],styles:{tableHeader:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154",alignment:"center"},tableBodyEven:{},tableBodyOdd:{fillColor:"#f3f3f3"},tableFooter:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154"},title:{alignment:"center",fontSize:15},message:{}},defaultStyle:{fontSize:10}};a.messageTop&&d.content.unshift({text:a.messageTop, | ||
style:"message",margin:[0,0,0,12]});a.messageBottom&&d.content.push({text:a.messageBottom,style:"message",margin:[0,0,0,12]});a.title&&d.content.unshift({text:a.title,style:"title",margin:[0,0,0,12]});b.customize&&b.customize(d,b,c);c=(q||f.pdfMake).createPdf(d);"open"===b.download&&!J()?c.open():c.download(a.filename);this.processing(!1)},title:"*",filename:"*",extension:".pdf",exportOptions:{},orientation:"portrait",pageSize:"A4",header:!0,footer:!1,messageTop:"*",messageBottom:"*",customize:null, | ||
download:"download"};return p.Buttons}); | ||
U=[{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},{match:/^[\d]{4}\-[\d]{2}\-[\d]{2}$/,style:67,fmt:function(a){return Math.round(25569+Date.parse(a)/864E5)}}];D.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,c,d,b){this.processing(!0);var m=this;a=S(c,b);var e=c.buttons.exportInfo(b),f=R(b),g=a.str;d=n("<div/>").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});e.title&&(g=e.title+f+f+g);e.messageTop&& | ||
(g=e.messageTop+f+f+g);e.messageBottom&&(g=g+f+f+e.messageBottom);b.customize&&(g=b.customize(g,b,c));b=n("<textarea readonly/>").val(g).appendTo(d);if(x.queryCommandSupported("copy")){d.appendTo(c.table().container());b[0].focus();b[0].select();try{var p=x.execCommand("copy");d.remove();if(p){c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),c.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",_:"Copied %d rows to clipboard"},a.rows),2E3);this.processing(!1);return}}catch(q){}}p= | ||
n("<span>"+c.i18n("buttons.copyKeys","Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.")+"</span>").append(d);c.buttons.info(c.i18n("buttons.copyTitle","Copy to clipboard"),p,0);b[0].focus();b[0].select();var t=n(p).closest(".dt-button-info"),h=function(){t.off("click.buttons-copy");n(x).off(".buttons-copy");c.buttons.info(!1)};t.on("click.buttons-copy",h);n(x).on("keydown.buttons-copy",function(q){27=== | ||
q.keyCode&&(h(),m.processing(!1))}).on("copy.buttons-copy cut.buttons-copy",function(){h();m.processing(!1)})},exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*"};D.ext.buttons.csvHtml5={bom:!1,className:"buttons-csv buttons-html5",available:function(){return u.FileReader!==B&&u.Blob},text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,c,d,b){this.processing(!0);a=S(c,b).str;d=c.buttons.exportInfo(b);var m=b.charset; | ||
b.customize&&(a=b.customize(a,b,c));!1!==m?(m||(m=x.characterSet||x.charset),m&&(m=";charset="+m)):m="";b.bom&&(a=String.fromCharCode(65279)+a);K(new Blob([a],{type:"text/csv"+m}),d.filename,!0);this.processing(!1)},filename:"*",extension:".csv",exportOptions:{},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!1};D.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return u.FileReader!==B&&(E||u.JSZip)!==B&&!T()&&M},text:function(a){return a.i18n("buttons.excel", | ||
"Excel")},action:function(a,c,d,b){this.processing(!0);var m=this,e=0;a=function(k){return n.parseXML(P[k])};var f=a("xl/worksheets/sheet1.xml"),g=f.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":f}},"[Content_Types].xml":a("[Content_Types].xml")};var p=c.buttons.exportData(b.exportOptions),t,h,q=function(k){t=e+1;h= | ||
y(f,"row",{attr:{r:t}});for(var l=0,z=k.length;l<z;l++){var G=I(l)+""+t,A=null;if(null===k[l]||k[l]===B||""===k[l])if(!0===b.createEmptyCells)k[l]="";else continue;var H=k[l];k[l]="function"===typeof k[l].trim?k[l].trim():k[l];for(var N=0,W=U.length;N<W;N++){var L=U[N];if(k[l].match&&!k[l].match(/^0\d+/)&&k[l].match(L.match)){A=k[l].replace(/[^\d\.\-]/g,"");L.fmt&&(A=L.fmt(A));A=y(f,"c",{attr:{r:G,s:L.style},children:[y(f,"v",{text:A})]});break}}A||("number"===typeof k[l]||k[l].match&&k[l].match(/^-?\d+(\.\d+)?$/)&& | ||
!k[l].match(/^0\d+/)?A=y(f,"c",{attr:{t:"n",r:G},children:[y(f,"v",{text:k[l]})]}):(H=H.replace?H.replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""):H,A=y(f,"c",{attr:{t:"inlineStr",r:G},children:{row:y(f,"is",{children:{row:y(f,"t",{text:H,attr:{"xml:space":"preserve"}})}})}})));h.appendChild(A)}g.appendChild(h);e++};b.customizeData&&b.customizeData(p);var v=function(k,l){var z=n("mergeCells",f);z[0].appendChild(y(f,"mergeCell",{attr:{ref:"A"+k+":"+I(l)+k}}));z.attr("count",parseFloat(z.attr("count"))+ | ||
1);n("row:eq("+(k-1)+") c",f).attr("s","51")},r=c.buttons.exportInfo(b);r.title&&(q([r.title],e),v(e,p.header.length-1));r.messageTop&&(q([r.messageTop],e),v(e,p.header.length-1));b.header&&(q(p.header,e),n("row:last c",f).attr("s","2"));d=e;var w=0;for(var C=p.body.length;w<C;w++)q(p.body[w],e);w=e;b.footer&&p.footer&&(q(p.footer,e),n("row:last c",f).attr("s","2"));r.messageBottom&&(q([r.messageBottom],e),v(e,p.header.length-1));q=y(f,"cols");n("worksheet",f).prepend(q);v=0;for(C=p.header.length;v< | ||
C;v++)q.appendChild(y(f,"col",{attr:{min:v+1,max:v+1,width:V(p,v),customWidth:1}}));q=a.xl["workbook.xml"];n("sheets sheet",q).attr("name",Q(b));b.autoFilter&&(n("mergeCells",f).before(y(f,"autoFilter",{attr:{ref:"A"+d+":"+I(p.header.length-1)+w}})),n("definedNames",q).append(y(q,"definedName",{attr:{name:"_xlnm._FilterDatabase",localSheetId:"0",hidden:1},text:Q(b)+"!$A$"+d+":"+I(p.header.length-1)+w})));b.customize&&b.customize(a,b,c);0===n("mergeCells",f).children().length&&n("mergeCells",f).remove(); | ||
c=new (E||u.JSZip);d={type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};O(c,a);c.generateAsync?c.generateAsync(d).then(function(k){K(k,r.filename);m.processing(!1)}):(K(c.generate(d),r.filename),this.processing(!1))},filename:"*",extension:".xlsx",exportOptions:{},header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*",createEmptyCells:!1,autoFilter:!1,sheetName:""};D.ext.buttons.pdfHtml5={className:"buttons-pdf buttons-html5",available:function(){return u.FileReader!== | ||
B&&(F||u.pdfMake)},text:function(a){return a.i18n("buttons.pdf","PDF")},action:function(a,c,d,b){this.processing(!0);d=c.buttons.exportData(b.exportOptions);a=c.buttons.exportInfo(b);var m=[];b.header&&m.push(n.map(d.header,function(g){return{text:"string"===typeof g?g:g+"",style:"tableHeader"}}));for(var e=0,f=d.body.length;e<f;e++)m.push(n.map(d.body[e],function(g){if(null===g||g===B)g="";return{text:"string"===typeof g?g:g+"",style:e%2?"tableBodyEven":"tableBodyOdd"}}));b.footer&&d.footer&&m.push(n.map(d.footer, | ||
function(g){return{text:"string"===typeof g?g:g+"",style:"tableFooter"}}));d={pageSize:b.pageSize,pageOrientation:b.orientation,content:[{table:{headerRows:1,body:m},layout:"noBorders"}],styles:{tableHeader:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154",alignment:"center"},tableBodyEven:{},tableBodyOdd:{fillColor:"#f3f3f3"},tableFooter:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154"},title:{alignment:"center",fontSize:15},message:{}},defaultStyle:{fontSize:10}};a.messageTop&&d.content.unshift({text:a.messageTop, | ||
style:"message",margin:[0,0,0,12]});a.messageBottom&&d.content.push({text:a.messageBottom,style:"message",margin:[0,0,0,12]});a.title&&d.content.unshift({text:a.title,style:"title",margin:[0,0,0,12]});b.customize&&b.customize(d,b,c);c=(F||u.pdfMake).createPdf(d);"open"!==b.download||T()?c.download(a.filename):c.open();this.processing(!1)},title:"*",filename:"*",extension:".pdf",exportOptions:{},orientation:"portrait",pageSize:"A4",header:!0,footer:!1,messageTop:"*",messageBottom:"*",customize:null, | ||
download:"download"};return D.Buttons}); |
@@ -1,5 +0,9 @@ | ||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(f){return c(f,window,document)}):"object"===typeof exports?module.exports=function(f,b){f||(f=window);if(!b||!b.fn.dataTable)b=require("datatables.net")(f,b).$;b.fn.dataTable.Buttons||require("datatables.net-buttons")(f,b);return c(b,f,f.document)}:c(jQuery,window,document)})(function(c,f,b,o){var j=c.fn.dataTable,h=b.createElement("a"),n=function(a){h.href=a;a=h.host;-1===a.indexOf("/")&& | ||
0!==h.pathname.indexOf("/")&&(a+="/");return h.protocol+"//"+a+h.pathname+h.search};j.ext.buttons.print={className:"buttons-print",text:function(a){return a.i18n("buttons.print","Print")},action:function(a,g,b,i){var a=g.buttons.exportData(c.extend({decodeEntities:!1},i.exportOptions)),b=g.buttons.exportInfo(i),h=g.columns(i.exportOptions.columns).flatten().map(function(a){return g.settings()[0].aoColumns[g.column(a).index()].sClass}).toArray(),l=function(a,b){for(var d="<tr>",c=0,e=a.length;c<e;c++)d+= | ||
"<"+b+" "+(h[c]?'class="'+h[c]+'"':"")+">"+(null===a[c]||a[c]===o?"":a[c])+"</"+b+">";return d+"</tr>"},d='<table class="'+g.table().node().className+'">';i.header&&(d+="<thead>"+l(a.header,"th")+"</thead>");for(var d=d+"<tbody>",m=0,j=a.body.length;m<j;m++)d+=l(a.body[m],"td");d+="</tbody>";i.footer&&a.footer&&(d+="<tfoot>"+l(a.footer,"th")+"</tfoot>");var d=d+"</table>",e=f.open("","");if(e){e.document.close();var k="<title>"+b.title+"</title>";c("style, link").each(function(){var a=k,b=c(this).clone()[0]; | ||
"link"===b.nodeName.toLowerCase()&&(b.href=n(b.href));k=a+b.outerHTML});try{e.document.head.innerHTML=k}catch(p){c(e.document.head).html(k)}e.document.body.innerHTML="<h1>"+b.title+"</h1><div>"+(b.messageTop||"")+"</div>"+d+"<div>"+(b.messageBottom||"")+"</div>";c(e.document.body).addClass("dt-print-view");c("img",e.document.body).each(function(a,b){b.setAttribute("src",n(b.getAttribute("src")))});i.customize&&i.customize(e,i,g);a=function(){i.autoPrint&&(e.print(),e.close())};navigator.userAgent.match(/Trident\/\d.\d/)? | ||
a():e.setTimeout(a,1E3)}else g.buttons.info(g.i18n("buttons.printErrorTitle","Unable to open print view"),g.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};return j.Buttons}); | ||
/*! | ||
Print button for Buttons and DataTables. | ||
2016 SpryMedia Ltd - datatables.net/license | ||
*/ | ||
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(d){return b(d,window,document)}):"object"===typeof exports?module.exports=function(d,h){d||(d=window);h&&h.fn.dataTable||(h=require("datatables.net")(d,h).$);h.fn.dataTable.Buttons||require("datatables.net-buttons")(d,h);return b(h,d,d.document)}:b(jQuery,window,document)})(function(b,d,h,y){var u=b.fn.dataTable,n=h.createElement("a"),v=function(a){n.href=a;a=n.host;-1===a.indexOf("/")&& | ||
0!==n.pathname.indexOf("/")&&(a+="/");return n.protocol+"//"+a+n.pathname+n.search};u.ext.buttons.print={className:"buttons-print",text:function(a){return a.i18n("buttons.print","Print")},action:function(a,e,p,k){a=e.buttons.exportData(b.extend({decodeEntities:!1},k.exportOptions));p=e.buttons.exportInfo(k);var w=e.columns(k.exportOptions.columns).flatten().map(function(f){return e.settings()[0].aoColumns[e.column(f).index()].sClass}).toArray(),r=function(f,g){for(var x="<tr>",l=0,z=f.length;l<z;l++)x+= | ||
"<"+g+" "+(w[l]?'class="'+w[l]+'"':"")+">"+(null===f[l]||f[l]===y?"":f[l])+"</"+g+">";return x+"</tr>"},m='<table class="'+e.table().node().className+'">';k.header&&(m+="<thead>"+r(a.header,"th")+"</thead>");m+="<tbody>";for(var t=0,A=a.body.length;t<A;t++)m+=r(a.body[t],"td");m+="</tbody>";k.footer&&a.footer&&(m+="<tfoot>"+r(a.footer,"th")+"</tfoot>");m+="</table>";var c=d.open("","");if(c){c.document.close();var q="<title>"+p.title+"</title>";b("style, link").each(function(){var f=q,g=b(this).clone()[0]; | ||
"link"===g.nodeName.toLowerCase()&&(g.href=v(g.href));q=f+g.outerHTML});try{c.document.head.innerHTML=q}catch(f){b(c.document.head).html(q)}c.document.body.innerHTML="<h1>"+p.title+"</h1><div>"+(p.messageTop||"")+"</div>"+m+"<div>"+(p.messageBottom||"")+"</div>";b(c.document.body).addClass("dt-print-view");b("img",c.document.body).each(function(f,g){g.setAttribute("src",v(g.getAttribute("src")))});k.customize&&k.customize(c,k,e);a=function(){k.autoPrint&&(c.print(),c.close())};navigator.userAgent.match(/Trident\/\d.\d/)? | ||
a():c.setTimeout(a,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};return u.Buttons}); |
@@ -1,2 +0,2 @@ | ||
/*! Buttons for DataTables 1.7.1 | ||
/*! Buttons for DataTables 2.0.0 | ||
* ©2016-2021 SpryMedia Ltd - datatables.net/license | ||
@@ -200,3 +200,9 @@ */ | ||
this._expandButton( buttons, config, base !== undefined, idx ); | ||
this._expandButton( | ||
buttons, | ||
config, | ||
config !== undefined ? config.split : undefined, | ||
(config === undefined || config.split === undefined || config.split.length === 0) && base !== undefined, | ||
false, | ||
idx ); | ||
this._draw(); | ||
@@ -208,2 +214,22 @@ | ||
/** | ||
* Clear buttons from a collection and then insert new buttons | ||
*/ | ||
collectionRebuild: function ( node, newButtons ) | ||
{ | ||
var button = this._nodeToButton( node ); | ||
var i; | ||
// Need to reverse the array | ||
for (i=button.buttons.length-1; i>=0; i--) { | ||
this.remove(button.buttons[i].node); | ||
} | ||
for (i=0; i<newButtons.length; i++) { | ||
this._expandButton( button.buttons, newButtons[i], true, i ); | ||
} | ||
this._draw(button.collection, button.buttons); | ||
}, | ||
/** | ||
* Get the container node for the buttons | ||
@@ -353,2 +379,4 @@ * @return {jQuery} Buttons node | ||
button.conf.destroying = true; | ||
// Allow the button to remove event handlers, etc | ||
@@ -510,10 +538,21 @@ if ( button.conf.destroy ) { | ||
*/ | ||
_expandButton: function ( attachTo, button, inCollection, attachPoint ) | ||
_expandButton: function ( attachTo, button, split, inCollection, inSplit, attachPoint, parentConf ) | ||
{ | ||
var dt = this.s.dt; | ||
var buttonCounter = 0; | ||
var isSplit = false; | ||
var buttons = ! Array.isArray( button ) ? | ||
[ button ] : | ||
button; | ||
if(button === undefined ) { | ||
buttons = !Array.isArray(split) ? | ||
[ split ] : | ||
split; | ||
} | ||
if (button !== undefined && button.split !== undefined) { | ||
isSplit = true; | ||
} | ||
for ( var i=0, ien=buttons.length ; i<ien ; i++ ) { | ||
@@ -526,10 +565,17 @@ var conf = this._resolveExtends( buttons[i] ); | ||
if( conf.config !== undefined && conf.config.split) { | ||
isSplit = true; | ||
} | ||
else { | ||
isSplit = false; | ||
} | ||
// If the configuration is an array, then expand the buttons at this | ||
// point | ||
if ( Array.isArray( conf ) ) { | ||
this._expandButton( attachTo, conf, inCollection, attachPoint ); | ||
this._expandButton( attachTo, conf, built !== undefined && built.conf !== undefined ? built.conf.split : undefined, inCollection, parentConf !== undefined && parentConf.split !== undefined, attachPoint, parentConf ); | ||
continue; | ||
} | ||
var built = this._buildButton( conf, inCollection ); | ||
var built = this._buildButton( conf, inCollection, conf.split !== undefined || (conf.config !== undefined && conf.config.split !== undefined), inSplit ); | ||
if ( ! built ) { | ||
@@ -547,9 +593,31 @@ continue; | ||
if ( built.conf.buttons ) { | ||
built.collection = $('<'+this.c.dom.collection.tag+'/>'); | ||
if ( built.conf.buttons || built.conf.split ) { | ||
built.collection = $('<'+(isSplit ? this.c.dom.splitCollection.tag : this.c.dom.collection.tag)+'/>'); | ||
built.conf._collection = built.collection; | ||
this._expandButton( built.buttons, built.conf.buttons, true, attachPoint ); | ||
if(built.conf.split) { | ||
for(var j = 0; j < built.conf.split.length; j++) { | ||
if(typeof built.conf.split[j] === "object") { | ||
built.conf.split[i].parent = parentConf; | ||
if(built.conf.split[j].collectionLayout === undefined) { | ||
built.conf.split[j].collectionLayout = built.conf.collectionLayout; | ||
} | ||
if(built.conf.split[j].dropup === undefined) { | ||
built.conf.split[j].dropup = built.conf.dropup; | ||
} | ||
if(built.conf.split[j].fade === undefined) { | ||
built.conf.split[j].fade = built.conf.fade; | ||
} | ||
} | ||
} | ||
} | ||
else { | ||
$(built.node).append($('<span class="dt-down-arrow">'+this.c.dom.splitDropdown.text+'</span>')) | ||
} | ||
this._expandButton( built.buttons, built.conf.buttons, built.conf.split, !isSplit, isSplit, attachPoint, built.conf ); | ||
} | ||
built.conf.parent = parentConf; | ||
@@ -573,3 +641,3 @@ // init call is made here, rather than buildButton as it needs to | ||
*/ | ||
_buildButton: function ( config, inCollection ) | ||
_buildButton: function ( config, inCollection, isSplit, inSplit ) | ||
{ | ||
@@ -579,2 +647,5 @@ var buttonDom = this.c.dom.button; | ||
var collectionDom = this.c.dom.collection; | ||
var splitDom = this.c.dom.split; | ||
var splitCollectionDom = this.c.dom.splitCollection; | ||
var splitDropdownButton = this.c.dom.splitDropdownButton; | ||
var dt = this.s.dt; | ||
@@ -587,7 +658,13 @@ var text = function ( opt ) { | ||
if ( inCollection && collectionDom.button ) { | ||
if ( !isSplit && inSplit && splitCollectionDom ) { | ||
buttonDom = splitDropdownButton; | ||
} | ||
else if ( !isSplit && inCollection && collectionDom.button ) { | ||
buttonDom = collectionDom.button; | ||
} | ||
if ( !isSplit && inSplit && splitCollectionDom.buttonLiner ) { | ||
linerDom = splitCollectionDom.buttonLiner | ||
} | ||
if ( inCollection && collectionDom.buttonLiner ) { | ||
else if ( !isSplit && inCollection && collectionDom.buttonLiner ) { | ||
linerDom = collectionDom.buttonLiner; | ||
@@ -598,83 +675,94 @@ } | ||
// it has. For example, PDF button require pdfmake | ||
if ( config.available && ! config.available( dt, config ) ) { | ||
if ( config.available && ! config.available( dt, config ) && !config.hasOwnProperty('html') ) { | ||
return false; | ||
} | ||
var action = function ( e, dt, button, config ) { | ||
config.action.call( dt.button( button ), e, dt, button, config ); | ||
var button; | ||
if(!config.hasOwnProperty('html')) { | ||
var action = function ( e, dt, button, config ) { | ||
config.action.call( dt.button( button ), e, dt, button, config ); | ||
$(dt.table().node()).triggerHandler( 'buttons-action.dt', [ | ||
dt.button( button ), dt, button, config | ||
] ); | ||
}; | ||
$(dt.table().node()).triggerHandler( 'buttons-action.dt', [ | ||
dt.button( button ), dt, button, config | ||
] ); | ||
}; | ||
var tag = config.tag || buttonDom.tag; | ||
var clickBlurs = config.clickBlurs === undefined ? true : config.clickBlurs | ||
var button = $('<'+tag+'/>') | ||
.addClass( buttonDom.className ) | ||
.attr( 'tabindex', this.s.dt.settings()[0].iTabIndex ) | ||
.attr( 'aria-controls', this.s.dt.table().node().id ) | ||
.on( 'click.dtb', function (e) { | ||
e.preventDefault(); | ||
if ( ! button.hasClass( buttonDom.disabled ) && config.action ) { | ||
action( e, dt, button, config ); | ||
} | ||
if( clickBlurs ) { | ||
button.trigger('blur'); | ||
} | ||
} ) | ||
.on( 'keyup.dtb', function (e) { | ||
if ( e.keyCode === 13 ) { | ||
var tag = config.tag || buttonDom.tag; | ||
var clickBlurs = config.clickBlurs === undefined ? true : config.clickBlurs | ||
button = $('<'+tag+'/>') | ||
.addClass( buttonDom.className ) | ||
.addClass( inSplit ? this.c.dom.splitDropdownButton.className : '') | ||
.attr( 'tabindex', this.s.dt.settings()[0].iTabIndex ) | ||
.attr( 'aria-controls', this.s.dt.table().node().id ) | ||
.on( 'click.dtb', function (e) { | ||
e.preventDefault(); | ||
if ( ! button.hasClass( buttonDom.disabled ) && config.action ) { | ||
action( e, dt, button, config ); | ||
} | ||
if( clickBlurs ) { | ||
button.trigger('blur'); | ||
} | ||
} ) | ||
.on( 'keyup.dtb', function (e) { | ||
if ( e.keyCode === 13 ) { | ||
if ( ! button.hasClass( buttonDom.disabled ) && config.action ) { | ||
action( e, dt, button, config ); | ||
} | ||
} | ||
} ); | ||
// Make `a` tags act like a link | ||
if ( tag.toLowerCase() === 'a' ) { | ||
button.attr( 'href', '#' ); | ||
} | ||
// Button tags should have `type=button` so they don't have any default behaviour | ||
if ( tag.toLowerCase() === 'button' ) { | ||
button.attr( 'type', 'button' ); | ||
} | ||
if ( linerDom.tag ) { | ||
var liner = $('<'+linerDom.tag+'/>') | ||
.html( text( config.text ) ) | ||
.addClass( linerDom.className ); | ||
if ( linerDom.tag.toLowerCase() === 'a' ) { | ||
liner.attr( 'href', '#' ); | ||
} | ||
} ); | ||
button.append( liner ); | ||
} | ||
else { | ||
button.html( text( config.text ) ); | ||
} | ||
if ( config.enabled === false ) { | ||
button.addClass( buttonDom.disabled ); | ||
} | ||
if ( config.className ) { | ||
button.addClass( config.className ); | ||
} | ||
if ( config.titleAttr ) { | ||
button.attr( 'title', text( config.titleAttr ) ); | ||
} | ||
if ( config.attr ) { | ||
button.attr( config.attr ); | ||
} | ||
if ( ! config.namespace ) { | ||
config.namespace = '.dt-button-'+(_buttonCounter++); | ||
} | ||
// Make `a` tags act like a link | ||
if ( tag.toLowerCase() === 'a' ) { | ||
button.attr( 'href', '#' ); | ||
} | ||
// Button tags should have `type=button` so they don't have any default behaviour | ||
if ( tag.toLowerCase() === 'button' ) { | ||
button.attr( 'type', 'button' ); | ||
} | ||
if ( linerDom.tag ) { | ||
var liner = $('<'+linerDom.tag+'/>') | ||
.html( text( config.text ) ) | ||
.addClass( linerDom.className ); | ||
if ( linerDom.tag.toLowerCase() === 'a' ) { | ||
liner.attr( 'href', '#' ); | ||
if ( config.config !== undefined && config.config.split ) { | ||
config.split = config.config.split; | ||
} | ||
button.append( liner ); | ||
} | ||
else { | ||
button.html( text( config.text ) ); | ||
button = $(config.html) | ||
} | ||
if ( config.enabled === false ) { | ||
button.addClass( buttonDom.disabled ); | ||
} | ||
if ( config.className ) { | ||
button.addClass( config.className ); | ||
} | ||
if ( config.titleAttr ) { | ||
button.attr( 'title', text( config.titleAttr ) ); | ||
} | ||
if ( config.attr ) { | ||
button.attr( config.attr ); | ||
} | ||
if ( ! config.namespace ) { | ||
config.namespace = '.dt-button-'+(_buttonCounter++); | ||
} | ||
var buttonContainer = this.c.dom.buttonContainer; | ||
@@ -700,8 +788,63 @@ var inserter; | ||
var splitDiv; | ||
if(isSplit) { | ||
splitDiv = $('<div/>').addClass(this.c.dom.splitWrapper.className) | ||
splitDiv.append(button); | ||
var dropButtonConfig = $.extend(config, { | ||
text: this.c.dom.splitDropdown.text, | ||
className: this.c.dom.splitDropdown.className, | ||
attr: { | ||
'aria-haspopup': true, | ||
'aria-expanded': false | ||
}, | ||
align: this.c.dom.splitDropdown.align, | ||
splitAlignClass: this.c.dom.splitDropdown.splitAlignClass | ||
}) | ||
this._addKey(dropButtonConfig); | ||
var splitAction = function ( e, dt, button, config ) { | ||
_dtButtons.split.action.call( dt.button($('div.dt-btn-split-wrapper')[0] ), e, dt, button, config ); | ||
$(dt.table().node()).triggerHandler( 'buttons-action.dt', [ | ||
dt.button( button ), dt, button, config | ||
] ); | ||
button.attr('aria-expanded', true) | ||
}; | ||
var dropButton = $('<button class="' + this.c.dom.splitDropdown.className + ' dt-button"><span class="dt-btn-split-drop-arrow">'+this.c.dom.splitDropdown.text+'</span></button>') | ||
.on( 'click.dtb', function (e) { | ||
e.preventDefault(); | ||
if ( ! dropButton.hasClass( buttonDom.disabled ) && dropButtonConfig.action ) { | ||
splitAction( e, dt, dropButton, dropButtonConfig ); | ||
} | ||
if( clickBlurs ) { | ||
dropButton.trigger('blur'); | ||
} | ||
} ) | ||
.on( 'keyup.dtb', function (e) { | ||
if ( e.keyCode === 13 ) { | ||
if ( ! dropButton.hasClass( buttonDom.disabled ) && dropButtonConfig.action ) { | ||
splitAction( e, dt, dropButton, dropButtonConfig ); | ||
} | ||
} | ||
} ); | ||
if(config.split.length === 0) { | ||
dropButton.addClass('dtb-hide-drop'); | ||
} | ||
splitDiv.append(dropButton).attr(dropButtonConfig.attr); | ||
} | ||
return { | ||
conf: config, | ||
node: button.get(0), | ||
inserter: inserter, | ||
node: isSplit ? splitDiv.get(0) : button.get(0), | ||
inserter: isSplit ? splitDiv : inserter, | ||
buttons: [], | ||
inCollection: inCollection, | ||
isSplit: isSplit, | ||
inSplit: inSplit, | ||
collection: null | ||
@@ -882,3 +1025,3 @@ }; | ||
if ( ! _dtButtons[ base ] ) { | ||
throw 'Unknown button type: '+base; | ||
return {html: base} | ||
} | ||
@@ -924,2 +1067,6 @@ | ||
if (conf.config !== undefined && objArray.config !== undefined) { | ||
conf.config = $.extend({}, objArray.config, conf.config) | ||
} | ||
conf = $.extend( {}, objArray, conf ); | ||
@@ -981,3 +1128,3 @@ | ||
var options = $.extend( { | ||
align: 'button-left', // button-right, dt-container | ||
align: 'button-left', // button-right, dt-container, split-left, split-right | ||
autoClose: false, | ||
@@ -991,5 +1138,9 @@ background: true, | ||
fade: 400, | ||
popoverTitle: '', | ||
rightAlignClassName: 'dt-button-right', | ||
splitRightAlignClassName: 'dt-button-split-right', | ||
splitLeftAlignClassName: 'dt-button-split-left', | ||
tag: buttonsSettings.dom.collection.tag | ||
}, inOpts ); | ||
var hostNode = hostButton.node(); | ||
@@ -1030,2 +1181,3 @@ | ||
.addClass(options.collectionLayout) | ||
.addClass(options.splitAlignClass) | ||
.css('display', 'none'); | ||
@@ -1044,3 +1196,6 @@ | ||
if ( options.collectionTitle ) { | ||
if ( options.popoverTitle ) { | ||
display.prepend('<div class="dt-button-collection-title">'+options.popoverTitle+'</div>'); | ||
} | ||
else if ( options.collectionTitle ) { | ||
display.prepend('<div class="dt-button-collection-title">'+options.collectionTitle+'</div>'); | ||
@@ -1067,3 +1222,5 @@ } | ||
display.css( { | ||
top: buttonPosition.top + hostNode.outerHeight(), | ||
top: $($(hostButton[0].node).parent()[0]).hasClass('dt-buttons') | ||
? buttonPosition.top + hostNode.outerHeight() | ||
: hostPosition.top + hostNode.outerHeight(), | ||
left: hostPosition.left | ||
@@ -1096,3 +1253,11 @@ } ); | ||
var popoverLeft = display.offset().left; | ||
var popoverWidth = display.width(); | ||
var popoverWidth = display.outerWidth(); | ||
// Foundations display dom element has a width of 0 - the true width is within the child | ||
if (popoverWidth === 0) { | ||
if (display.children().length > 0) { | ||
popoverWidth = $(display.children()[0]).outerWidth(); | ||
} | ||
} | ||
var popoverRight = popoverLeft + popoverWidth; | ||
@@ -1108,4 +1273,16 @@ | ||
display.hasClass( options.leftAlignClassName ) || | ||
display.hasClass( options.splitAlignClass ) || | ||
options.align === 'dt-container' | ||
){ | ||
// default to the other buttons values | ||
var splitButtonLeft = buttonsLeft; | ||
var splitButtonWidth = buttonsWidth; | ||
var splitButtonRight = buttonsRight; | ||
// If the button is a split button then need to calculate some more values | ||
if (hostNode.hasClass('dt-btn-split-wrapper') && hostNode.children('button.dt-btn-split-drop').length > 0) { | ||
splitButtonLeft = hostNode.children('button.dt-btn-split-drop').offset().left; | ||
splitButtonWidth = hostNode.children('button.dt-btn-split-drop').outerWidth(); | ||
splitButtonRight = splitButtonLeft + splitButtonWidth; | ||
} | ||
// You've then got all the numbers you need to do some calculations and if statements, | ||
@@ -1132,2 +1309,32 @@ // so we can do some quick JS maths and apply it only once | ||
} | ||
else if ( display.hasClass( options.splitRightAlignClassName )) { | ||
popoverShuffle = splitButtonRight - popoverRight; | ||
if(tableLeft > (popoverLeft + popoverShuffle)){ | ||
var leftGap = tableLeft - (popoverLeft + popoverShuffle); | ||
var rightGap = tableRight - (popoverRight + popoverShuffle); | ||
if(leftGap > rightGap){ | ||
popoverShuffle += rightGap; | ||
} | ||
else { | ||
popoverShuffle += leftGap; | ||
} | ||
} | ||
} | ||
else if ( display.hasClass( options.splitLeftAlignClassName )) { | ||
popoverShuffle = splitButtonLeft - popoverLeft; | ||
if(tableRight < (popoverRight + popoverShuffle) || tableLeft > (popoverLeft + popoverShuffle)){ | ||
var leftGap = tableLeft - (popoverLeft + popoverShuffle); | ||
var rightGap = tableRight - (popoverRight + popoverShuffle); | ||
if(leftGap > rightGap ){ | ||
popoverShuffle += rightGap; | ||
} | ||
else { | ||
popoverShuffle += leftGap; | ||
} | ||
} | ||
} | ||
// else attempt to left align the popover to the button. Similar to above, if the popover's right goes past the table container's right, | ||
@@ -1519,2 +1726,25 @@ // then move it back, but not so much that it goes past the left of the table container | ||
className: '' | ||
}, | ||
split: { | ||
tag: 'div', | ||
className: 'dt-button-split', | ||
}, | ||
splitWrapper: { | ||
tag: 'div', | ||
className: 'dt-btn-split-wrapper', | ||
}, | ||
splitDropdown: { | ||
tag: 'button', | ||
text: '▼', | ||
className: 'dt-btn-split-drop', | ||
align: 'split-right', | ||
splitAlignClass: 'dt-button-split-left' | ||
}, | ||
splitDropdownButton: { | ||
tag: 'button', | ||
className: 'dt-btn-split-drop-button dt-button', | ||
}, | ||
splitCollection: { | ||
tag: 'div', | ||
className: 'dt-button-split-collection', | ||
} | ||
@@ -1529,3 +1759,3 @@ } | ||
*/ | ||
Buttons.version = '1.7.1'; | ||
Buttons.version = '2.0.0'; | ||
@@ -1557,2 +1787,19 @@ | ||
}, | ||
split: { | ||
text: function ( dt ) { | ||
return dt.i18n( 'buttons.split', 'Split' ); | ||
}, | ||
className: 'buttons-split', | ||
init: function ( dt, button, config ) { | ||
return button.attr( 'aria-expanded', false ); | ||
}, | ||
action: function ( e, dt, button, config ) { | ||
e.stopPropagation(); | ||
this.popover(config._collection, config); | ||
}, | ||
attr: { | ||
'aria-haspopup': true | ||
} | ||
// Also the popover options, defined in Buttons.popover | ||
}, | ||
copy: function ( dt, conf ) { | ||
@@ -1718,2 +1965,9 @@ if ( _dtButtons.copyHtml5 ) { | ||
// Collection control | ||
DataTable.Api.registerPlural( 'buttons().collectionRebuild()', 'button().collectionRebuild()', function ( buttons ) { | ||
return this.each( function ( set ) { | ||
set.inst.collectionRebuild( set.node, buttons ); | ||
} ); | ||
} ); | ||
// Enable / disable buttons | ||
@@ -1720,0 +1974,0 @@ DataTable.Api.register( ['buttons().enable()', 'button().enable()'], function ( flag ) { |
/*! | ||
Buttons for DataTables 1.7.1 | ||
Buttons for DataTables 2.0.0 | ||
©2016-2021 SpryMedia Ltd - datatables.net/license | ||
*/ | ||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(r){return e(r,window,document)}):"object"===typeof exports?module.exports=function(r,q){r||(r=window);if(!q||!q.fn.dataTable)q=require("datatables.net")(r,q).$;return e(q,r,r.document)}:e(jQuery,window,document)})(function(e,r,q,l){function t(a,b,c){e.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function u(a,b,c){e.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&& | ||
c.call(a))}function w(a,b){var c=new j.Api(a),d=b?b:c.init().buttons||j.defaults.buttons;return(new o(c,d)).container()}var j=e.fn.dataTable,z=0,A=0,p=j.ext.buttons,o=function(a,b){if(!(this instanceof o))return function(b){return(new o(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=e.extend(!0,{},o.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new j.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+z++};this.dom={container:e("<"+ | ||
this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};e.extend(o.prototype,{action:function(a,b){var c=this._nodeToButton(a);if(b===l)return c.conf.action;c.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a),d=this.c.dom.button.active,c=e(c.node);if(b===l)return c.hasClass(d);c.toggleClass(d,b===l?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){for(var d=b.split("-"),e=this.s,c=0,h=d.length-1;c<h;c++)e= | ||
e.buttons[1*d[c]];c=e.buttons;b=1*d[d.length-1]}this._expandButton(c,a,e!==l,b);this._draw();return this},container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);e(a.node).addClass(this.c.dom.button.disabled).attr("disabled",!0);return this},destroy:function(){e("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b,c;b=0;for(c=a.length;b<c;b++)this.remove(a[b].node);this.dom.container.remove();a=this.s.dt.settings()[0];b=0;for(c=a.length;b<c;b++)if(a.inst=== | ||
this){a.splice(b,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);var c=this._nodeToButton(a);e(c.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled");return this},name:function(){return this.c.name},node:function(a){if(!a)return this.dom.container;a=this._nodeToButton(a);return e(a.node)},processing:function(a,b){var c=this.s.dt,d=this._nodeToButton(a);if(b===l)return e(d.node).hasClass("processing");e(d.node).toggleClass("processing",b);e(c.table().node()).triggerHandler("buttons-processing.dt", | ||
[b,c.button(a),c,e(a),d.conf]);return this},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),d=this.s.dt;if(b.buttons.length)for(var f=b.buttons.length-1;0<=f;f--)this.remove(b.buttons[f].node);b.conf.destroy&&b.conf.destroy.call(d.button(a),d,e(a),b.conf);this._removeKey(b.conf);e(b.node).remove();a=e.inArray(b,c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a),d=this.c.dom.collection.buttonLiner,d=c.inCollection&&d&&d.tag?d.tag:this.c.dom.buttonLiner.tag, | ||
f=this.s.dt,h=e(c.node),i=function(a){return"function"===typeof a?a(f,h,c.conf):a};if(b===l)return i(c.conf.text);c.conf.text=b;d?h.children(d).html(i(b)):h.html(i(b));return this},_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],d=this.c.buttons;c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});for(var f=0,h=d.length;f<h;f++)this.add(d[f]);b.on("destroy",function(b,d){d===c&&a.destroy()});e("body").on("keyup."+this.s.namespace,function(b){if(!q.activeElement|| | ||
q.activeElement===q.body){var c=String.fromCharCode(b.keyCode).toLowerCase();a.s.listenKeys.toLowerCase().indexOf(c)!==-1&&a._keypress(c,b)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=e.isPlainObject(a.key)?a.key.key:a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);a.children().detach();for(var c=0,d=b.length;c<d;c++)a.append(b[c].inserter),a.append(" "),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,d){for(var f= | ||
this.s.dt,h=0,b=!Array.isArray(b)?[b]:b,i=0,k=b.length;i<k;i++){var m=this._resolveExtends(b[i]);if(m)if(Array.isArray(m))this._expandButton(a,m,c,d);else{var g=this._buildButton(m,c);g&&(d!==l&&null!==d?(a.splice(d,0,g),d++):a.push(g),g.conf.buttons&&(g.collection=e("<"+this.c.dom.collection.tag+"/>"),g.conf._collection=g.collection,this._expandButton(g.buttons,g.conf.buttons,!0,d)),m.init&&m.init.call(f.button(g.node),f,e(g.node),m),h++)}}},_buildButton:function(a,b){var c=this.c.dom.button,d=this.c.dom.buttonLiner, | ||
f=this.c.dom.collection,h=this.s.dt,i=function(b){return"function"===typeof b?b(h,g,a):b};b&&f.button&&(c=f.button);b&&f.buttonLiner&&(d=f.buttonLiner);if(a.available&&!a.available(h,a))return!1;var k=function(a,b,c,d){d.action.call(b.button(c),a,b,c,d);e(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,d])},f=a.tag||c.tag,m=a.clickBlurs===l?!0:a.clickBlurs,g=e("<"+f+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb", | ||
function(b){b.preventDefault();!g.hasClass(c.disabled)&&a.action&&k(b,h,g,a);m&&g.trigger("blur")}).on("keyup.dtb",function(b){b.keyCode===13&&!g.hasClass(c.disabled)&&a.action&&k(b,h,g,a)});"a"===f.toLowerCase()&&g.attr("href","#");"button"===f.toLowerCase()&&g.attr("type","button");d.tag?(f=e("<"+d.tag+"/>").html(i(a.text)).addClass(d.className),"a"===d.tag.toLowerCase()&&f.attr("href","#"),g.append(f)):g.html(i(a.text));!1===a.enabled&&g.addClass(c.disabled);a.className&&g.addClass(a.className); | ||
a.titleAttr&&g.attr("title",i(a.titleAttr));a.attr&&g.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+A++);d=(d=this.c.dom.buttonContainer)&&d.tag?e("<"+d.tag+"/>").addClass(d.className).append(g):g;this._addKey(a);this.c.buttonCreated&&(d=this.c.buttonCreated(a,d));return{conf:a,node:g.get(0),inserter:d,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var e=this._nodeToButton(a, | ||
b[c].buttons);if(e)return e}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var e=this._nodeToHost(a,b[c].buttons);if(e)return e}}},_keypress:function(a,b){if(!b._buttonsHandled){var c=function(d){for(var f=0,h=d.length;f<h;f++){var i=d[f].conf,k=d[f].node;if(i.key)if(i.key===a)b._buttonsHandled=!0,e(k).click();else if(e.isPlainObject(i.key)&&i.key.key===a&&(!i.key.shiftKey||b.shiftKey))if(!i.key.altKey||b.altKey)if(!i.key.ctrlKey|| | ||
b.ctrlKey)if(!i.key.metaKey||b.metaKey)b._buttonsHandled=!0,e(k).click();d[f].buttons.length&&c(d[f].buttons)}};c(this.s.buttons)}},_removeKey:function(a){if(a.key){var b=e.isPlainObject(a.key)?a.key.key:a.key,a=this.s.listenKeys.split(""),b=e.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){for(var b=this.s.dt,c,d,f=function(c){for(var d=0;!e.isPlainObject(c)&&!Array.isArray(c);){if(c===l)return;if("function"===typeof c){if(c=c(b,a),!c)return!1}else if("string"=== | ||
typeof c){if(!p[c])throw"Unknown button type: "+c;c=p[c]}d++;if(30<d)throw"Buttons: Too many iterations";}return Array.isArray(c)?c:e.extend({},c)},a=f(a);a&&a.extend;){if(!p[a.extend])throw"Cannot extend unknown button type: "+a.extend;var h=f(p[a.extend]);if(Array.isArray(h))return h;if(!h)return!1;c=h.className;a=e.extend({},h,a);c&&a.className!==c&&(a.className=c+" "+a.className);var i=a.postfixButtons;if(i){a.buttons||(a.buttons=[]);c=0;for(d=i.length;c<d;c++)a.buttons.push(i[c]);a.postfixButtons= | ||
null}if(i=a.prefixButtons){a.buttons||(a.buttons=[]);c=0;for(d=i.length;c<d;c++)a.buttons.splice(c,0,i[c]);a.prefixButtons=null}a.extend=h.extend}return a},_popover:function(a,b,c){var d=this.c,f=e.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",contentClassName:d.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,rightAlignClassName:"dt-button-right",tag:d.dom.collection.tag},c),h=b.node(),i=function(){u(e(".dt-button-collection"), | ||
f.fade,function(){e(this).detach()});e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes()).attr("aria-expanded","false");e("div.dt-button-background").off("click.dtb-collection");o.background(!1,f.backgroundClassName,f.fade,h);e("body").off(".dtb-collection");b.off("buttons-action.b-internal")};!1===a&&i();c=e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes());c.length&&(h=c.eq(0),i());c=e("<div/>").addClass("dt-button-collection").addClass(f.collectionLayout).css("display", | ||
"none");a=e(a).addClass(f.contentClassName).attr("role","menu").appendTo(c);h.attr("aria-expanded","true");h.parents("body")[0]!==q.body&&(h=q.body.lastChild);f.collectionTitle&&c.prepend('<div class="dt-button-collection-title">'+f.collectionTitle+"</div>");t(c.insertAfter(h),f.fade);var d=e(b.table().container()),k=c.css("position");"dt-container"===f.align&&(h=h.parent(),c.css("width",d.width()));if("absolute"===k){var m=h.position(),k=e(b.node()).position();c.css({top:k.top+h.outerHeight(),left:m.left}); | ||
var m=c.outerHeight(),g=d.offset().top+d.height(),g=k.top+h.outerHeight()+m-g,j=k.top-m,n=d.offset().top,k=k.top-m-5;(g>n-j||f.dropup)&&-k<n&&c.css("top",k);var k=d.offset().left,d=d.width(),d=k+d,m=c.offset().left,g=c.width(),g=m+g,j=h.offset().left,n=h.outerWidth(),l=j+n;c.hasClass(f.rightAlignClassName)||c.hasClass(f.leftAlignClassName)||"dt-container"===f.align?(n=0,c.hasClass(f.rightAlignClassName)?(n=l-g,k>m+n&&(k-=m+n,d-=g+n,n=k>d?n+d:n+k)):(n=k-m,d<g+n&&(k-=m+n,d-=g+n,n=k>d?n+d:n+k))):(d= | ||
h.offset().top,n=0,n="button-right"===f.align?l-g:j-m);c.css("left",c.position().left+n)}else d=c.height()/2,d>e(r).height()/2&&(d=e(r).height()/2),c.css("marginTop",-1*d);f.background&&o.background(!0,f.backgroundClassName,f.fade,h);e("div.dt-button-background").on("click.dtb-collection",function(){});e("body").on("click.dtb-collection",function(b){var c=e.fn.addBack?"addBack":"andSelf",d=e(b.target).parent()[0];(!e(b.target).parents()[c]().filter(a).length&&!e(d).hasClass("dt-buttons")||e(b.target).hasClass("dt-button-background"))&& | ||
i()}).on("keyup.dtb-collection",function(a){a.keyCode===27&&i()});f.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(a,b,c,d){d[0]!==h[0]&&i()})},0);e(c).trigger("buttons-popover.dt")}});o.background=function(a,b,c,d){c===l&&(c=400);d||(d=q.body);a?t(e("<div/>").addClass(b).css("display","none").insertAfter(d),c):u(e("div."+b),c,function(){e(this).removeClass(b).remove()})};o.instanceSelector=function(a,b){if(a===l||null===a)return e.map(b,function(a){return a.inst});var c= | ||
[],d=e.map(b,function(a){return a.name}),f=function(a){if(Array.isArray(a))for(var i=0,k=a.length;i<k;i++)f(a[i]);else"string"===typeof a?-1!==a.indexOf(",")?f(a.split(",")):(a=e.inArray(a.trim(),d),-1!==a&&c.push(b[a].inst)):"number"===typeof a&&c.push(b[a].inst)};f(a);return c};o.buttonSelector=function(a,b){for(var c=[],d=function(a,b,c){for(var e,f,h=0,i=b.length;h<i;h++)if(e=b[h])f=c!==l?c+h:h+"",a.push({node:e.node,name:e.conf.name,idx:f}),e.buttons&&d(a,e.buttons,f+"-")},f=function(a,b){var g, | ||
h,i=[];d(i,b.s.buttons);g=e.map(i,function(a){return a.node});if(Array.isArray(a)||a instanceof e){g=0;for(h=a.length;g<h;g++)f(a[g],b)}else if(null===a||a===l||"*"===a){g=0;for(h=i.length;g<h;g++)c.push({inst:b,node:i[g].node})}else if("number"===typeof a)c.push({inst:b,node:b.s.buttons[a].node});else if("string"===typeof a)if(-1!==a.indexOf(",")){i=a.split(",");g=0;for(h=i.length;g<h;g++)f(i[g].trim(),b)}else if(a.match(/^\d+(\-\d+)*$/))g=e.map(i,function(a){return a.idx}),c.push({inst:b,node:i[e.inArray(a, | ||
g)].node});else if(-1!==a.indexOf(":name")){var j=a.replace(":name","");g=0;for(h=i.length;g<h;g++)i[g].name===j&&c.push({inst:b,node:i[g].node})}else e(g).filter(a).each(function(){c.push({inst:b,node:this})});else"object"===typeof a&&a.nodeName&&(i=e.inArray(a,g),-1!==i&&c.push({inst:b,node:g[i]}))},h=0,i=a.length;h<i;h++)f(b,a[h]);return c};o.stripData=function(a,b){if("string"!==typeof a)return a;a=a.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a=a.replace(/<!\-\-.*?\-\->/g, | ||
"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b||b.trim)a=a.replace(/^\s+|\s+$/g,"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)x.innerHTML=a,a=x.value;return a};o.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""}}};o.version="1.7.1"; | ||
e.extend(p,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(a,b){b.attr("aria-expanded",!1)},action:function(a,b,c,d){a.stopPropagation();d._collection.parents("body").length?this.popover(!1,d):this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},copy:function(){if(p.copyHtml5)return"copyHtml5"},csv:function(a,b){if(p.csvHtml5&&p.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(p.excelHtml5&&p.excelHtml5.available(a, | ||
b))return"excelHtml5"},pdf:function(a,b){if(p.pdfHtml5&&p.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){var a=a.settings()[0].aLengthMenu,b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1];else for(var d=0;d<a.length;d++){var f=a[d];e.isPlainObject(f)?(b.push(f.value),c.push(f.label)):(b.push(f),c.push(f))}return{extend:"collection",text:function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())},className:"buttons-page-length",autoClose:!0, | ||
buttons:e.map(b,function(a,b){return{text:c[b],className:"button-page-length",action:function(b,c){c.page.len(a).draw()},init:function(b,c,d){var e=this,c=function(){e.active(b.page.len()===a)};b.on("length.dt"+d.namespace,c);c()},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}),init:function(a,b,c){var d=this;a.on("length.dt"+c.namespace,function(){d.text(c.text)})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});j.Api.register("buttons()",function(a,b){b===l&&(b=a,a=l);this.selector.buttonGroup= | ||
a;var c=this.iterator(!0,"table",function(c){if(c._buttons)return o.buttonSelector(o.instanceSelector(a,c._buttons),b)},!0);c._groupSelector=a;return c});j.Api.register("button()",function(a,b){var c=this.buttons(a,b);1<c.length&&c.splice(1,c.length);return c});j.Api.registerPlural("buttons().active()","button().active()",function(a){return a===l?this.map(function(a){return a.inst.active(a.node)}):this.each(function(b){b.inst.active(b.node,a)})});j.Api.registerPlural("buttons().action()","button().action()", | ||
function(a){return a===l?this.map(function(a){return a.inst.action(a.node)}):this.each(function(b){b.inst.action(b.node,a)})});j.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,a)})});j.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});j.Api.registerPlural("buttons().nodes()","button().node()",function(){var a=e();e(this.each(function(b){a=a.add(b.inst.node(b.node))})); | ||
return a});j.Api.registerPlural("buttons().processing()","button().processing()",function(a){return a===l?this.map(function(a){return a.inst.processing(a.node)}):this.each(function(b){b.inst.processing(b.node,a)})});j.Api.registerPlural("buttons().text()","button().text()",function(a){return a===l?this.map(function(a){return a.inst.text(a.node)}):this.each(function(b){b.inst.text(b.node,a)})});j.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})}); | ||
j.Api.register("button().popover()",function(a,b){return this.map(function(c){return c.inst._popover(a,this.button(this[0].node),b)})});j.Api.register("buttons().containers()",function(){var a=e(),b=this._groupSelector;this.iterator(!0,"table",function(c){if(c._buttons)for(var c=o.instanceSelector(b,c._buttons),d=0,e=c.length;d<e;d++)a=a.add(c[d].container())});return a});j.Api.register("buttons().container()",function(){return this.containers().eq(0)});j.Api.register("button().add()",function(a, | ||
b){var c=this.context;c.length&&(c=o.instanceSelector(this._groupSelector,c[0]._buttons),c.length&&c[0].add(b,a));return this.button(this._groupSelector,a)});j.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});j.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});var s;j.Api.register("buttons.info()",function(a,b,c){var d=this;if(!1===a)return this.off("destroy.btn-info"), | ||
u(e("#datatables_buttons_info"),400,function(){e(this).remove()}),clearTimeout(s),s=null,this;s&&clearTimeout(s);e("#datatables_buttons_info").length&&e("#datatables_buttons_info").remove();t(e('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a?"<h2>"+a+"</h2>":"").append(e("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==l&&0!==c&&(s=setTimeout(function(){d.buttons.info(!1)},c));this.on("destroy.btn-info",function(){d.buttons.info(!1)}); | ||
return this});j.Api.register("buttons.exportData()",function(a){if(this.context.length){var b=new j.Api(this.context[0]),c=e.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return o.stripData(a,c)},footer:function(a){return o.stripData(a,c)},body:function(a){return o.stripData(a,c)}},customizeData:null},a),a=b.columns(c.columns).indexes().map(function(a){var d=b.column(a).header(); | ||
return c.format.header(d.innerHTML,a,d)}).toArray(),d=b.table().footer()?b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a,d)}).toArray():null,f=e.extend({},c.modifier);b.select&&"function"===typeof b.select.info&&f.selected===l&&b.rows(c.rows,e.extend({selected:!0},f)).any()&&e.extend(f,{selected:!0});for(var f=b.rows(c.rows,f).indexes().toArray(),h=b.cells(f,c.columns),f=h.render(c.orthogonal).toArray(),h=h.nodes().toArray(),i=a.length, | ||
k=[],m=0,g=0,q=0<i?f.length/i:0;g<q;g++){for(var n=[i],p=0;p<i;p++)n[p]=c.format.body(f[m],g,p,h[m]),m++;k[g]=n}a={header:a,footer:d,body:k};c.customizeData&&c.customizeData(a);return a}});j.Api.register("buttons.exportInfo()",function(a){a||(a={});var b;var c=a;b="*"===c.filename&&"*"!==c.title&&c.title!==l&&null!==c.title&&""!==c.title?c.title:c.filename;"function"===typeof b&&(b=b());b===l||null===b?b=null:(-1!==b.indexOf("*")&&(b=b.replace("*",e("head > title").text()).trim()),b=b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g, | ||
""),(c=v(c.extension))||(c=""),b+=c);c=v(a.title);c=null===c?null:-1!==c.indexOf("*")?c.replace("*",e("head > title").text()||"Exported data"):c;return{filename:b,title:c,messageTop:y(this,a.message||a.messageTop,"top"),messageBottom:y(this,a.messageBottom,"bottom")}});var v=function(a){return null===a||a===l?null:"function"===typeof a?a():a},y=function(a,b,c){b=v(b);if(null===b)return null;a=e("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"": | ||
b},x=e("<textarea/>")[0];e.fn.dataTable.Buttons=o;e.fn.DataTable.Buttons=o;e(q).on("init.dt plugin-init.dt",function(a,b){if("dt"===a.namespace){var c=b.oInit.buttons||j.defaults.buttons;c&&!b._buttons&&(new o(b,c)).container()}});j.ext.feature.push({fnInit:w,cFeature:"B"});j.ext.features&&j.ext.features.register("buttons",w);return o}); | ||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(B){return e(B,window,document)}):"object"===typeof exports?module.exports=function(B,y){B||(B=window);y&&y.fn.dataTable||(y=require("datatables.net")(B,y).$);return e(y,B,B.document)}:e(jQuery,window,document)})(function(e,B,y,q){function I(a,b,c){e.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function J(a,b,c){e.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))} | ||
function L(a,b){a=new t.Api(a);b=b?b:a.init().buttons||t.defaults.buttons;return(new v(a,b)).container()}var t=e.fn.dataTable,O=0,P=0,z=t.ext.buttons,v=function(a,b){if(!(this instanceof v))return function(c){return(new v(c,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=e.extend(!0,{},v.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new t.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+O++};this.dom={container:e("<"+this.c.dom.container.tag+ | ||
"/>").addClass(this.c.dom.container.className)};this._constructor()};e.extend(v.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===q)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=e(c.node);if(b===q)return c.hasClass(a);c.toggleClass(a,b===q?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){b=b.split("-");var d=this.s;c=0;for(var h=b.length-1;c<h;c++)d=d.buttons[1*b[c]];c=d.buttons; | ||
b=1*b[b.length-1]}this._expandButton(c,a,a!==q?a.split:q,(a===q||a.split===q||0===a.split.length)&&d!==q,!1,b);this._draw();return this},collectionRebuild:function(a,b){a=this._nodeToButton(a);var c;for(c=a.buttons.length-1;0<=c;c--)this.remove(a.buttons[c].node);for(c=0;c<b.length;c++)this._expandButton(a.buttons,b[c],!0,c);this._draw(a.collection,a.buttons)},container:function(){return this.dom.container},disable:function(a){a=this._nodeToButton(a);e(a.node).addClass(this.c.dom.button.disabled).attr("disabled", | ||
!0);return this},destroy:function(){e("body").off("keyup."+this.s.namespace);var a=this.s.buttons.slice(),b;var c=0;for(b=a.length;c<b;c++)this.remove(a[c].node);this.dom.container.remove();a=this.s.dt.settings()[0];c=0;for(b=a.length;c<b;c++)if(a.inst===this){a.splice(c,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);a=this._nodeToButton(a);e(a.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled");return this},name:function(){return this.c.name},node:function(a){if(!a)return this.dom.container; | ||
a=this._nodeToButton(a);return e(a.node)},processing:function(a,b){var c=this.s.dt,d=this._nodeToButton(a);if(b===q)return e(d.node).hasClass("processing");e(d.node).toggleClass("processing",b);e(c.table().node()).triggerHandler("buttons-processing.dt",[b,c.button(a),c,e(a),d.conf]);return this},remove:function(a){var b=this._nodeToButton(a),c=this._nodeToHost(a),d=this.s.dt;if(b.buttons.length)for(var h=b.buttons.length-1;0<=h;h--)this.remove(b.buttons[h].node);b.conf.destroying=!0;b.conf.destroy&& | ||
b.conf.destroy.call(d.button(a),d,e(a),b.conf);this._removeKey(b.conf);e(b.node).remove();a=e.inArray(b,c);c.splice(a,1);return this},text:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.collection.buttonLiner;a=c.inCollection&&a&&a.tag?a.tag:this.c.dom.buttonLiner.tag;var d=this.s.dt,h=e(c.node),g=function(l){return"function"===typeof l?l(d,h,c.conf):l};if(b===q)return g(c.conf.text);c.conf.text=b;a?h.children(a).html(g(b)):h.html(g(b));return this},_constructor:function(){var a=this,b=this.s.dt, | ||
c=b.settings()[0],d=this.c.buttons;c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});for(var h=0,g=d.length;h<g;h++)this.add(d[h]);b.on("destroy",function(l,k){k===c&&a.destroy()});e("body").on("keyup."+this.s.namespace,function(l){if(!y.activeElement||y.activeElement===y.body){var k=String.fromCharCode(l.keyCode).toLowerCase();-1!==a.s.listenKeys.toLowerCase().indexOf(k)&&a._keypress(k,l)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=e.isPlainObject(a.key)?a.key.key: | ||
a.key)},_draw:function(a,b){a||(a=this.dom.container,b=this.s.buttons);a.children().detach();for(var c=0,d=b.length;c<d;c++)a.append(b[c].inserter),a.append(" "),b[c].buttons&&b[c].buttons.length&&this._draw(b[c].collection,b[c].buttons)},_expandButton:function(a,b,c,d,h,g,l){var k=this.s.dt,n=0,p=Array.isArray(b)?b:[b];b===q&&(p=Array.isArray(c)?c:[c]);c=0;for(var r=p.length;c<r;c++){var f=this._resolveExtends(p[c]);if(f)if(b=f.config!==q&&f.config.split?!0:!1,Array.isArray(f))this._expandButton(a, | ||
f,m!==q&&m.conf!==q?m.conf.split:q,d,l!==q&&l.split!==q,g,l);else{var m=this._buildButton(f,d,f.split!==q||f.config!==q&&f.config.split!==q,h);if(m){g!==q&&null!==g?(a.splice(g,0,m),g++):a.push(m);if(m.conf.buttons||m.conf.split){m.collection=e("<"+(b?this.c.dom.splitCollection.tag:this.c.dom.collection.tag)+"/>");m.conf._collection=m.collection;if(m.conf.split)for(var u=0;u<m.conf.split.length;u++)"object"===typeof m.conf.split[u]&&(m.conf.split[c].parent=l,m.conf.split[u].collectionLayout===q&& | ||
(m.conf.split[u].collectionLayout=m.conf.collectionLayout),m.conf.split[u].dropup===q&&(m.conf.split[u].dropup=m.conf.dropup),m.conf.split[u].fade===q&&(m.conf.split[u].fade=m.conf.fade));else e(m.node).append(e('<span class="dt-down-arrow">'+this.c.dom.splitDropdown.text+"</span>"));this._expandButton(m.buttons,m.conf.buttons,m.conf.split,!b,b,g,m.conf)}m.conf.parent=l;f.init&&f.init.call(k.button(m.node),k,e(m.node),f);n++}}}},_buildButton:function(a,b,c,d){var h=this.c.dom.button,g=this.c.dom.buttonLiner, | ||
l=this.c.dom.collection,k=this.c.dom.splitCollection,n=this.c.dom.splitDropdownButton,p=this.s.dt,r=function(w){return"function"===typeof w?w(p,f,a):w};!c&&d&&k?h=n:!c&&b&&l.button&&(h=l.button);!c&&d&&k.buttonLiner?g=k.buttonLiner:!c&&b&&l.buttonLiner&&(g=l.buttonLiner);if(a.available&&!a.available(p,a)&&!a.hasOwnProperty("html"))return!1;if(a.hasOwnProperty("html"))var f=e(a.html);else{var m=function(w,A,C,F){F.action.call(A.button(C),w,A,C,F);e(A.table().node()).triggerHandler("buttons-action.dt", | ||
[A.button(C),A,C,F])};l=a.tag||h.tag;var u=a.clickBlurs===q?!0:a.clickBlurs;f=e("<"+l+"/>").addClass(h.className).addClass(d?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(w){w.preventDefault();!f.hasClass(h.disabled)&&a.action&&m(w,p,f,a);u&&f.trigger("blur")}).on("keyup.dtb",function(w){13===w.keyCode&&!f.hasClass(h.disabled)&&a.action&&m(w,p,f,a)});"a"===l.toLowerCase()&&f.attr("href", | ||
"#");"button"===l.toLowerCase()&&f.attr("type","button");g.tag?(l=e("<"+g.tag+"/>").html(r(a.text)).addClass(g.className),"a"===g.tag.toLowerCase()&&l.attr("href","#"),f.append(l)):f.html(r(a.text));!1===a.enabled&&f.addClass(h.disabled);a.className&&f.addClass(a.className);a.titleAttr&&f.attr("title",r(a.titleAttr));a.attr&&f.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+P++);a.config!==q&&a.config.split&&(a.split=a.config.split)}g=(g=this.c.dom.buttonContainer)&&g.tag?e("<"+g.tag+"/>").addClass(g.className).append(f): | ||
f;this._addKey(a);this.c.buttonCreated&&(g=this.c.buttonCreated(a,g));if(c){var x=e("<div/>").addClass(this.c.dom.splitWrapper.className);x.append(f);var D=e.extend(a,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,attr:{"aria-haspopup":!0,"aria-expanded":!1},align:this.c.dom.splitDropdown.align,splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(D);var G=function(w,A,C,F){z.split.action.call(A.button(e("div.dt-btn-split-wrapper")[0]),w,A,C,F); | ||
e(A.table().node()).triggerHandler("buttons-action.dt",[A.button(C),A,C,F]);C.attr("aria-expanded",!0)},E=e('<button class="'+this.c.dom.splitDropdown.className+' dt-button"><span class="dt-btn-split-drop-arrow">'+this.c.dom.splitDropdown.text+"</span></button>").on("click.dtb",function(w){w.preventDefault();!E.hasClass(h.disabled)&&D.action&&G(w,p,E,D);u&&E.trigger("blur")}).on("keyup.dtb",function(w){13===w.keyCode&&!E.hasClass(h.disabled)&&D.action&&G(w,p,E,D)});0===a.split.length&&E.addClass("dtb-hide-drop"); | ||
x.append(E).attr(D.attr)}return{conf:a,node:c?x.get(0):f.get(0),inserter:c?x:g,buttons:[],inCollection:b,isSplit:c,inSplit:d,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b[c];if(b[c].buttons.length){var h=this._nodeToButton(a,b[c].buttons);if(h)return h}}},_nodeToHost:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c<d;c++){if(b[c].node===a)return b;if(b[c].buttons.length){var h=this._nodeToHost(a,b[c].buttons); | ||
if(h)return h}}},_keypress:function(a,b){if(!b._buttonsHandled){var c=function(d){for(var h=0,g=d.length;h<g;h++){var l=d[h].conf,k=d[h].node;l.key&&(l.key===a?(b._buttonsHandled=!0,e(k).click()):!e.isPlainObject(l.key)||l.key.key!==a||l.key.shiftKey&&!b.shiftKey||l.key.altKey&&!b.altKey||l.key.ctrlKey&&!b.ctrlKey||l.key.metaKey&&!b.metaKey||(b._buttonsHandled=!0,e(k).click()));d[h].buttons.length&&c(d[h].buttons)}};c(this.s.buttons)}},_removeKey:function(a){if(a.key){var b=e.isPlainObject(a.key)? | ||
a.key.key:a.key;a=this.s.listenKeys.split("");b=e.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){var b=this.s.dt,c,d=function(k){for(var n=0;!e.isPlainObject(k)&&!Array.isArray(k);){if(k===q)return;if("function"===typeof k){if(k=k(b,a),!k)return!1}else if("string"===typeof k){if(!z[k])return{html:k};k=z[k]}n++;if(30<n)throw"Buttons: Too many iterations";}return Array.isArray(k)?k:e.extend({},k)};for(a=d(a);a&&a.extend;){if(!z[a.extend])throw"Cannot extend unknown button type: "+ | ||
a.extend;var h=d(z[a.extend]);if(Array.isArray(h))return h;if(!h)return!1;var g=h.className;a.config!==q&&h.config!==q&&(a.config=e.extend({},h.config,a.config));a=e.extend({},h,a);g&&a.className!==g&&(a.className=g+" "+a.className);var l=a.postfixButtons;if(l){a.buttons||(a.buttons=[]);g=0;for(c=l.length;g<c;g++)a.buttons.push(l[g]);a.postfixButtons=null}if(l=a.prefixButtons){a.buttons||(a.buttons=[]);g=0;for(c=l.length;g<c;g++)a.buttons.splice(g,0,l[g]);a.prefixButtons=null}a.extend=h.extend}return a}, | ||
_popover:function(a,b,c){var d=this.c,h=e.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",contentClassName:d.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,popoverTitle:"",rightAlignClassName:"dt-button-right",splitRightAlignClassName:"dt-button-split-right",splitLeftAlignClassName:"dt-button-split-left",tag:d.dom.collection.tag},c),g=b.node(),l=function(){J(e(".dt-button-collection"),h.fade,function(){e(this).detach()}); | ||
e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes()).attr("aria-expanded","false");e("div.dt-button-background").off("click.dtb-collection");v.background(!1,h.backgroundClassName,h.fade,g);e("body").off(".dtb-collection");b.off("buttons-action.b-internal")};!1===a&&l();c=e(b.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes());c.length&&(g=c.eq(0),l());c=e("<div/>").addClass("dt-button-collection").addClass(h.collectionLayout).addClass(h.splitAlignClass).css("display", | ||
"none");a=e(a).addClass(h.contentClassName).attr("role","menu").appendTo(c);g.attr("aria-expanded","true");g.parents("body")[0]!==y.body&&(g=y.body.lastChild);h.popoverTitle?c.prepend('<div class="dt-button-collection-title">'+h.popoverTitle+"</div>"):h.collectionTitle&&c.prepend('<div class="dt-button-collection-title">'+h.collectionTitle+"</div>");I(c.insertAfter(g),h.fade);var k=e(b.table().container());d=c.css("position");"dt-container"===h.align&&(g=g.parent(),c.css("width",k.width()));if("absolute"=== | ||
d){var n=g.position();d=e(b.node()).position();c.css({top:e(e(b[0].node).parent()[0]).hasClass("dt-buttons")?d.top+g.outerHeight():n.top+g.outerHeight(),left:n.left});n=c.outerHeight();var p=k.offset().top+k.height();p=d.top+g.outerHeight()+n-p;var r=d.top-n,f=k.offset().top;d=d.top-n-5;(p>f-r||h.dropup)&&-d<f&&c.css("top",d);d=k.offset().left;k=k.width();k=d+k;n=c.offset().left;p=c.outerWidth();0===p&&0<c.children().length&&(p=e(c.children()[0]).outerWidth());p=n+p;var m=g.offset().left;f=g.outerWidth(); | ||
r=m+f;if(c.hasClass(h.rightAlignClassName)||c.hasClass(h.leftAlignClassName)||c.hasClass(h.splitAlignClass)||"dt-container"===h.align){var u=r;g.hasClass("dt-btn-split-wrapper")&&0<g.children("button.dt-btn-split-drop").length&&(m=g.children("button.dt-btn-split-drop").offset().left,f=g.children("button.dt-btn-split-drop").outerWidth(),u=m+f);f=0;if(c.hasClass(h.rightAlignClassName))f=r-p,d>n+f&&(d-=n+f,k-=p+f,f=d>k?f+k:f+d);else if(c.hasClass(h.splitRightAlignClassName))f=u-p,d>n+f&&(d-=n+f,k-=p+ | ||
f,f=d>k?f+k:f+d);else if(c.hasClass(h.splitLeftAlignClassName)){if(f=m-n,k<p+f||d>n+f)d-=n+f,k-=p+f,f=d>k?f+k:f+d}else f=d-n,k<p+f&&(d-=n+f,k-=p+f,f=d>k?f+k:f+d)}else d=g.offset().top,f=0,f="button-right"===h.align?r-p:m-n;c.css("left",c.position().left+f)}else d=c.height()/2,d>e(B).height()/2&&(d=e(B).height()/2),c.css("marginTop",-1*d);h.background&&v.background(!0,h.backgroundClassName,h.fade,g);e("div.dt-button-background").on("click.dtb-collection",function(){});e("body").on("click.dtb-collection", | ||
function(x){var D=e.fn.addBack?"addBack":"andSelf",G=e(x.target).parent()[0];(!e(x.target).parents()[D]().filter(a).length&&!e(G).hasClass("dt-buttons")||e(x.target).hasClass("dt-button-background"))&&l()}).on("keyup.dtb-collection",function(x){27===x.keyCode&&l()});h.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(x,D,G,E){E[0]!==g[0]&&l()})},0);e(c).trigger("buttons-popover.dt")}});v.background=function(a,b,c,d){c===q&&(c=400);d||(d=y.body);a?I(e("<div/>").addClass(b).css("display", | ||
"none").insertAfter(d),c):J(e("div."+b),c,function(){e(this).removeClass(b).remove()})};v.instanceSelector=function(a,b){if(a===q||null===a)return e.map(b,function(g){return g.inst});var c=[],d=e.map(b,function(g){return g.name}),h=function(g){if(Array.isArray(g))for(var l=0,k=g.length;l<k;l++)h(g[l]);else"string"===typeof g?-1!==g.indexOf(",")?h(g.split(",")):(g=e.inArray(g.trim(),d),-1!==g&&c.push(b[g].inst)):"number"===typeof g&&c.push(b[g].inst)};h(a);return c};v.buttonSelector=function(a,b){for(var c= | ||
[],d=function(k,n,p){for(var r,f,m=0,u=n.length;m<u;m++)if(r=n[m])f=p!==q?p+m:m+"",k.push({node:r.node,name:r.conf.name,idx:f}),r.buttons&&d(k,r.buttons,f+"-")},h=function(k,n){var p,r=[];d(r,n.s.buttons);var f=e.map(r,function(m){return m.node});if(Array.isArray(k)||k instanceof e)for(f=0,p=k.length;f<p;f++)h(k[f],n);else if(null===k||k===q||"*"===k)for(f=0,p=r.length;f<p;f++)c.push({inst:n,node:r[f].node});else if("number"===typeof k)c.push({inst:n,node:n.s.buttons[k].node});else if("string"=== | ||
typeof k)if(-1!==k.indexOf(","))for(r=k.split(","),f=0,p=r.length;f<p;f++)h(r[f].trim(),n);else if(k.match(/^\d+(\-\d+)*$/))f=e.map(r,function(m){return m.idx}),c.push({inst:n,node:r[e.inArray(k,f)].node});else if(-1!==k.indexOf(":name"))for(k=k.replace(":name",""),f=0,p=r.length;f<p;f++)r[f].name===k&&c.push({inst:n,node:r[f].node});else e(f).filter(k).each(function(){c.push({inst:n,node:this})});else"object"===typeof k&&k.nodeName&&(r=e.inArray(k,f),-1!==r&&c.push({inst:n,node:f[r]}))},g=0,l=a.length;g< | ||
l;g++)h(b,a[g]);return c};v.stripData=function(a,b){if("string"!==typeof a)return a;a=a.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");a=a.replace(/<!\-\-.*?\-\->/g,"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b||b.trim)a=a.replace(/^\s+|\s+$/g,"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)M.innerHTML=a,a=M.value;return a};v.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"}, | ||
collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper"},splitDropdown:{tag:"button",text:"▼",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div", | ||
className:"dt-button-split-collection"}}};v.version="2.0.0";e.extend(z,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(a,b,c){b.attr("aria-expanded",!1)},action:function(a,b,c,d){a.stopPropagation();d._collection.parents("body").length?this.popover(!1,d):this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},split:{text:function(a){return a.i18n("buttons.split","Split")},className:"buttons-split",init:function(a,b,c){return b.attr("aria-expanded", | ||
!1)},action:function(a,b,c,d){a.stopPropagation();this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},copy:function(a,b){if(z.copyHtml5)return"copyHtml5"},csv:function(a,b){if(z.csvHtml5&&z.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(z.excelHtml5&&z.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(z.pdfHtml5&&z.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){a=a.settings()[0].aLengthMenu;var b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1]; | ||
else for(var d=0;d<a.length;d++){var h=a[d];e.isPlainObject(h)?(b.push(h.value),c.push(h.label)):(b.push(h),c.push(h))}return{extend:"collection",text:function(g){return g.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},g.page.len())},className:"buttons-page-length",autoClose:!0,buttons:e.map(b,function(g,l){return{text:c[l],className:"button-page-length",action:function(k,n){n.page.len(g).draw()},init:function(k,n,p){var r=this;n=function(){r.active(k.page.len()===g)};k.on("length.dt"+ | ||
p.namespace,n);n()},destroy:function(k,n,p){k.off("length.dt"+p.namespace)}}}),init:function(g,l,k){var n=this;g.on("length.dt"+k.namespace,function(){n.text(k.text)})},destroy:function(g,l,k){g.off("length.dt"+k.namespace)}}}});t.Api.register("buttons()",function(a,b){b===q&&(b=a,a=q);this.selector.buttonGroup=a;var c=this.iterator(!0,"table",function(d){if(d._buttons)return v.buttonSelector(v.instanceSelector(a,d._buttons),b)},!0);c._groupSelector=a;return c});t.Api.register("button()",function(a, | ||
b){a=this.buttons(a,b);1<a.length&&a.splice(1,a.length);return a});t.Api.registerPlural("buttons().active()","button().active()",function(a){return a===q?this.map(function(b){return b.inst.active(b.node)}):this.each(function(b){b.inst.active(b.node,a)})});t.Api.registerPlural("buttons().action()","button().action()",function(a){return a===q?this.map(function(b){return b.inst.action(b.node)}):this.each(function(b){b.inst.action(b.node,a)})});t.Api.registerPlural("buttons().collectionRebuild()","button().collectionRebuild()", | ||
function(a){return this.each(function(b){b.inst.collectionRebuild(b.node,a)})});t.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.node,a)})});t.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.node)})});t.Api.registerPlural("buttons().nodes()","button().node()",function(){var a=e();e(this.each(function(b){a=a.add(b.inst.node(b.node))}));return a});t.Api.registerPlural("buttons().processing()", | ||
"button().processing()",function(a){return a===q?this.map(function(b){return b.inst.processing(b.node)}):this.each(function(b){b.inst.processing(b.node,a)})});t.Api.registerPlural("buttons().text()","button().text()",function(a){return a===q?this.map(function(b){return b.inst.text(b.node)}):this.each(function(b){b.inst.text(b.node,a)})});t.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.node).trigger("click")})});t.Api.register("button().popover()", | ||
function(a,b){return this.map(function(c){return c.inst._popover(a,this.button(this[0].node),b)})});t.Api.register("buttons().containers()",function(){var a=e(),b=this._groupSelector;this.iterator(!0,"table",function(c){if(c._buttons){c=v.instanceSelector(b,c._buttons);for(var d=0,h=c.length;d<h;d++)a=a.add(c[d].container())}});return a});t.Api.register("buttons().container()",function(){return this.containers().eq(0)});t.Api.register("button().add()",function(a,b){var c=this.context;c.length&&(c= | ||
v.instanceSelector(this._groupSelector,c[0]._buttons),c.length&&c[0].add(b,a));return this.button(this._groupSelector,a)});t.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});t.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.remove(a.node)});return this});var H;t.Api.register("buttons.info()",function(a,b,c){var d=this;if(!1===a)return this.off("destroy.btn-info"),J(e("#datatables_buttons_info"), | ||
400,function(){e(this).remove()}),clearTimeout(H),H=null,this;H&&clearTimeout(H);e("#datatables_buttons_info").length&&e("#datatables_buttons_info").remove();a=a?"<h2>"+a+"</h2>":"";I(e('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a).append(e("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==q&&0!==c&&(H=setTimeout(function(){d.buttons.info(!1)},c));this.on("destroy.btn-info",function(){d.buttons.info(!1)});return this});t.Api.register("buttons.exportData()", | ||
function(a){if(this.context.length)return Q(new t.Api(this.context[0]),a)});t.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==q&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===q||null===c?c=null:(-1!==c.indexOf("*")&&(c=c.replace("*",e("head > title").text()).trim()),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=K(b.extension))||(b=""),c+=b);b=K(a.title);b=null===b?null:-1!==b.indexOf("*")? | ||
b.replace("*",e("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:N(this,a.message||a.messageTop,"top"),messageBottom:N(this,a.messageBottom,"bottom")}});var K=function(a){return null===a||a===q?null:"function"===typeof a?a():a},N=function(a,b,c){b=K(b);if(null===b)return null;a=e("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},M=e("<textarea/>")[0],Q=function(a,b){var c=e.extend(!0,{},{rows:null,columns:"", | ||
modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(u){return v.stripData(u,c)},footer:function(u){return v.stripData(u,c)},body:function(u){return v.stripData(u,c)}},customizeData:null},b);b=a.columns(c.columns).indexes().map(function(u){var x=a.column(u).header();return c.format.header(x.innerHTML,u,x)}).toArray();var d=a.table().footer()?a.columns(c.columns).indexes().map(function(u){var x=a.column(u).footer(); | ||
return c.format.footer(x?x.innerHTML:"",u,x)}).toArray():null,h=e.extend({},c.modifier);a.select&&"function"===typeof a.select.info&&h.selected===q&&a.rows(c.rows,e.extend({selected:!0},h)).any()&&e.extend(h,{selected:!0});h=a.rows(c.rows,h).indexes().toArray();var g=a.cells(h,c.columns);h=g.render(c.orthogonal).toArray();g=g.nodes().toArray();for(var l=b.length,k=[],n=0,p=0,r=0<l?h.length/l:0;p<r;p++){for(var f=[l],m=0;m<l;m++)f[m]=c.format.body(h[n],p,m,g[n]),n++;k[p]=f}b={header:b,footer:d,body:k}; | ||
c.customizeData&&c.customizeData(b);return b};e.fn.dataTable.Buttons=v;e.fn.DataTable.Buttons=v;e(y).on("init.dt plugin-init.dt",function(a,b){"dt"===a.namespace&&(a=b.oInit.buttons||t.defaults.buttons)&&!b._buttons&&(new v(b,a)).container()});t.ext.feature.push({fnInit:L,cFeature:"B"});t.ext.features&&t.ext.features.register("buttons",L);return v}); |
@@ -6,3 +6,3 @@ { | ||
"types": "./types/types.d.ts", | ||
"version": "1.7.1", | ||
"version": "2.0.0", | ||
"files": [ | ||
@@ -25,4 +25,4 @@ "js/**/*.js" | ||
"dependencies": { | ||
"jquery": ">=1.7", | ||
"datatables.net": "^1.10.15" | ||
"datatables.net": ">=1.10.25", | ||
"jquery": ">=1.7" | ||
}, | ||
@@ -29,0 +29,0 @@ "moduleType": [ |
# Buttons for DataTables | ||
This package contains distribution files for the [Buttons extension](https://datatables.net/extensions/Buttons) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for Buttons must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/). | ||
This package contains distribution files for the [Buttons extension](https://datatables.net/extensions/buttons) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for Buttons must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/). | ||
@@ -5,0 +5,0 @@ The Buttons extension for DataTables provides a common set of options, API methods and styling to display buttons on a page that will interact with a DataTable. It also provides plug-ins for file export (HTML5 and Flash), print view and column visibility. Other libraries, such as Editor and Select also provide buttons specific to their use cases. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248051
5245
+ Addeddatatables.net@2.1.8(transitive)
- Removeddatatables.net@1.13.11(transitive)
Updateddatatables.net@>=1.10.25