From 32d027ae054ee7abd18f5bd8286aeff8b74f06ae Mon Sep 17 00:00:00 2001 From: dtbuild Date: Tue, 30 Jul 2024 11:25:18 +0000 Subject: [PATCH] db912ef1d4b5945cbacd7d13cd74e80a715db646 Fix: Excel button was calling `customizeData` twice if present Sync to source repo @db912ef1d4b5945cbacd7d13cd74e80a715db646 --- datatables.json | 2 +- js/buttons.html5.js | 4 ---- js/buttons.html5.min.js | 2 +- js/buttons.html5.min.mjs | 2 +- js/buttons.html5.mjs | 4 ---- 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/datatables.json b/datatables.json index b99e022..b0b244c 100644 --- a/datatables.json +++ b/datatables.json @@ -25,5 +25,5 @@ ], "src-repo": "http://github.com/DataTables/Buttons", "last-tag": "3.1.0", - "last-sync": "0695dd5c3fb64810edd88aa13107452695a82a8e" + "last-sync": "db912ef1d4b5945cbacd7d13cd74e80a715db646" } \ No newline at end of file diff --git a/js/buttons.html5.js b/js/buttons.html5.js index a59fcbc..6063cca 100644 --- a/js/buttons.html5.js +++ b/js/buttons.html5.js @@ -1309,10 +1309,6 @@ DataTable.ext.buttons.excelHtml5 = { }); }; - if (config.customizeData) { - config.customizeData(data); - } - // Title and top messages var exportInfo = dt.buttons.exportInfo(config); if (exportInfo.title) { diff --git a/js/buttons.html5.min.js b/js/buttons.html5.min.js index 0b798cb..f2bf45e 100644 --- a/js/buttons.html5.min.js +++ b/js/buttons.html5.min.js @@ -5,4 +5,4 @@ * FileSaver.js (1.3.3) - MIT license * Copyright © 2016 Eli Grey - http://eligrey.com */ -!function(o){var l,n;"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(t){return o(t,window,document)}):"object"==typeof exports?(l=require("jquery"),n=function(t,e){e.fn.dataTable||require("datatables.net")(t,e),e.fn.dataTable.Buttons||require("datatables.net-buttons")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||l(t),n(t,e),o(e,t,t.document)}:(n(window,l),module.exports=o(l,window,window.document))):o(jQuery,window,document)}(function(S,C,u){"use strict";var e,o,t=S.fn.dataTable;function T(){return e||C.JSZip}function m(){return o||C.pdfMake}t.Buttons.pdfMake=function(t){if(!t)return m();o=t},t.Buttons.jszip=function(t){if(!t)return T();e=t};function k(t){var e="Sheet1";return e=t.sheetName?t.sheetName.replace(/[\[\]\*\/\\\?\:]/g,""):e}function c(t,e){function o(t){for(var e="",o=0,l=t.length;o',"xl/_rels/workbook.xml.rels":'',"[Content_Types].xml":'',"xl/workbook.xml":'',"xl/worksheets/sheet1.xml":'',"xl/styles.xml":''},_=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(t){return t/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(t){return t/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(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64},{match:/^(19\d\d|[2-9]\d\d\d)\-(0\d|1[012])\-[0123][\d]$/,style:67,fmt:function(t){return Math.round(25569+Date.parse(t)/864e5)}}];return t.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(t){return t.i18n("buttons.copy","Copy")},action:function(t,e,o,l,n){var r=c(e,l),a=e.buttons.exportInfo(l),d=y(l),p=r.str,i=S("
").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0}),d=(a.title&&(p=a.title+d+d+p),a.messageTop&&(p=a.messageTop+d+d+p),a.messageBottom&&(p=p+d+d+a.messageBottom),l.customize&&(p=l.customize(p,l,e)),S("