From 8dd2974d96e5e797e822b4e7d37bd5ad003c0222 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 12 Nov 2020 21:01:53 +0100 Subject: [PATCH] wip #4047 @3 --- js/libs/fluidbook/cart/fluidbook.cart.puma.js | 1 - js/libs/fluidbook/fluidbook.cart.js | 2 + .../fluidbook/links/fluidbook.links.zoom.js | 2 +- style/cart.less | 2 +- style/cart/mif.less | 121 ++++++++++++++++++ style/cart/none.less | 0 6 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 style/cart/mif.less create mode 100644 style/cart/none.less diff --git a/js/libs/fluidbook/cart/fluidbook.cart.puma.js b/js/libs/fluidbook/cart/fluidbook.cart.puma.js index a565021d..6f0df7ca 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.puma.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.puma.js @@ -184,7 +184,6 @@ FluidbookCartPuma.prototype = { } columns.push({header: v, key: v, numFmt: fmt[v], style: {numFmt: fmt[v]}, width: widths[v] * 4}); }); - console.log(columns); sheet.columns = columns; $.each(this.items, function (i, ref) { diff --git a/js/libs/fluidbook/fluidbook.cart.js b/js/libs/fluidbook/fluidbook.cart.js index 4011afc0..c513e164 100644 --- a/js/libs/fluidbook/fluidbook.cart.js +++ b/js/libs/fluidbook/fluidbook.cart.js @@ -80,6 +80,8 @@ FluidbookCart.prototype = { return new FluidbookCartMopec(this); case 'Puma': return new FluidbookCartPuma(this); + case 'MIF': + return new FluidbookCartMIF(this); default: return null; } diff --git a/js/libs/fluidbook/links/fluidbook.links.zoom.js b/js/libs/fluidbook/links/fluidbook.links.zoom.js index 2754f935..c75b94ff 100644 --- a/js/libs/fluidbook/links/fluidbook.links.zoom.js +++ b/js/libs/fluidbook/links/fluidbook.links.zoom.js @@ -178,7 +178,7 @@ FluidbookLinksZoom.prototype = { if (!action) { action = 'link'; } - if (data !== undefined || action === 'addtocart') { + if (action !== 'disabled' && (data !== undefined || action === 'addtocart')) { var label = $this.fluidbook.settings['product_zoom_label_' + j]; var icon = getSpriteIcon($this.fluidbook.settings['product_zoom_icon_' + j]) !== 'none' ? getSpriteIcon($this.fluidbook.settings['product_zoom_icon_' + j]) : ''; var linkClass = ""; diff --git a/style/cart.less b/style/cart.less index 0c5113d6..4dd39b50 100644 --- a/style/cart.less +++ b/style/cart.less @@ -1 +1 @@ -@import "cart/puma"; \ No newline at end of file +@import "cart/@{import-cart-styles}"; \ No newline at end of file diff --git a/style/cart/mif.less b/style/cart/mif.less new file mode 100644 index 00000000..de114bac --- /dev/null +++ b/style/cart/mif.less @@ -0,0 +1,121 @@ +#mifcart { + .caption { + margin-top: 10px; + text-transform: uppercase; + } +} + +[data-type="7"] { + svg { + pointer-events: none; + + + } + + .on { + visibility: hidden; + } + + .off { + visibility: visible; + } + + &.active { + .off { + visibility: hidden; + } + + .on { + visibility: visible; + } + } +} + + +#mifcarttable { + [data-cart-delete] { + color: #fff; + background-color: @menu-button-background; + padding: 5px 6px 7px 6px; + width: 23px; + height: 23px; + display: block; + position: relative; + left: 20px; + } + + + padding: 0; + border-collapse: collapse; + margin: 20px 30px 40px; + width: ~"calc(100% - 60px)"; + max-width: none; + + &.xls { + [data-label="Image"] { + display: none; + } + } + + &.print { + margin: 0; + font-size: 8px; + width: 100%; + + td, th { + vertical-align: top; + padding: 5px; + + &:last-child { + display: none; + } + } + + [data-cart-delete] { + display: none; + } + } + + td, th { + padding: 20px 0 20px 30px; + font-size: 11px; + text-align: center; + + span { + display: block; + max-width: 120px; + white-space: normal; + margin: 0 auto; + } + + img { + max-width: 80px; + } + + &:last-child { + padding-right: 30px; + padding-left: 0px; + } + } + + thead { + th { + text-transform: uppercase; + color: #fff; + background-color: @menu-button-background; + font-weight: normal; + } + } + + tbody { + td { + border-top: 1px solid #000; + } + + tr { + background-color: #fff; + color: #000 + } + + } +} \ No newline at end of file diff --git a/style/cart/none.less b/style/cart/none.less new file mode 100644 index 00000000..e69de29b -- 2.39.5