From fc34bf1afd9b023c0c684d2481c865ca36b75738 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 9 Mar 2021 20:30:12 +0100 Subject: [PATCH] wip #4253 @1 --- js/libs/fluidbook/cart/fluidbook.cart.puma.js | 17 +++-------------- style/cart/puma.less | 6 ++++++ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/js/libs/fluidbook/cart/fluidbook.cart.puma.js b/js/libs/fluidbook/cart/fluidbook.cart.puma.js index e9a3b0a2..adb173ba 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.puma.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.puma.js @@ -14,6 +14,7 @@ FluidbookCartPuma.prototype = { $this.exportPDF(); return false; }); + $(document).on('click', '.exportCartXLS', function () { try { $this.exportXLS(); @@ -209,7 +210,7 @@ FluidbookCartPuma.prototype = { header: v, key: v, numFmt: fmt[v], - style: {numFmt: fmt[v], alignment: {vertical: 'top', horizontal: 'left'}}, + style: {numFmt: fmt[v], alignment: {vertical: 'middle', horizontal: 'left'}}, width: widths[v] * 4, height: 4, @@ -305,16 +306,4 @@ FluidbookCartPuma.prototype = { s = s.replace(/\s/g, ''); return parseInt(s); }, -}; - -async function readFileAsDataURL(file) { - let result_base64 = await new Promise((resolve) => { - let fileReader = new FileReader(); - fileReader.onload = (e) => resolve(fileReader.result); - fileReader.readAsDataURL(file); - }); - - console.log(result_base64); // aGV5IHRoZXJl... - - return result_base64; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/style/cart/puma.less b/style/cart/puma.less index b86ee4bc..063b3444 100644 --- a/style/cart/puma.less +++ b/style/cart/puma.less @@ -3,6 +3,12 @@ margin-top: 10px; text-transform: uppercase; } + + .exportCartXLS { + .msie & { + display: none; + } + } } [data-type="7"] { -- 2.39.5