]> _ Git - fluidbook-html5.git/commitdiff
wip #4047 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Nov 2020 20:01:53 +0000 (21:01 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Nov 2020 20:01:53 +0000 (21:01 +0100)
js/libs/fluidbook/cart/fluidbook.cart.puma.js
js/libs/fluidbook/fluidbook.cart.js
js/libs/fluidbook/links/fluidbook.links.zoom.js
style/cart.less
style/cart/mif.less [new file with mode: 0644]
style/cart/none.less [new file with mode: 0644]

index a565021da6fd47aaf9ee66fe5662bedd8daa44a6..6f0df7ca85667f1e767213c07ff7697a33058a69 100644 (file)
@@ -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) {
index 4011afc069b88c806af25f9e68844424463a97dd..c513e164d79f8e5bb158b2f2c977789d90663d7e 100644 (file)
@@ -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;
         }
index 2754f935c5bfa607849801bbc3068b289c8ff64e..c75b94ffd996a6888cc8d324d1ea20ba58a7ce75 100644 (file)
@@ -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 = "";
index 0c5113d6786a22394c3b8c941213aecfc7cc9d66..4dd39b508178477f8d602754a9e0e2c8c9c6c2a0 100644 (file)
@@ -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 (file)
index 0000000..de114ba
--- /dev/null
@@ -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 (file)
index 0000000..e69de29