From b12229108048c2029b07205e1ae2ad1a05391426 Mon Sep 17 00:00:00 2001 From: TMMeilleur Date: Fri, 29 Nov 2013 17:13:27 +0200 Subject: [PATCH] fixes 29.11.2013 --- .../views/templates/admin/items.tpl | 2 +- themes/default-bootstrap/css/global.css | 65 +++++++++++++++++ themes/default-bootstrap/css/product.css | 9 ++- .../js/modules/blockcart/ajax-cart.js | 9 ++- themes/default-bootstrap/js/product.js | 4 +- themes/default-bootstrap/sass/global.scss | 71 +++++++++++++++++++ themes/default-bootstrap/sass/product.scss | 13 +++- .../shopping-cart-product-line.tpl | 8 +-- 8 files changed, 170 insertions(+), 11 deletions(-) diff --git a/modules/themeconfigurator/views/templates/admin/items.tpl b/modules/themeconfigurator/views/templates/admin/items.tpl index 8cd6e246f..a6a997ddf 100644 --- a/modules/themeconfigurator/views/templates/admin/items.tpl +++ b/modules/themeconfigurator/views/templates/admin/items.tpl @@ -15,7 +15,7 @@ {foreach name=items from=$hookItems item=hItem}
  • {if $hItem.item_order le 9}0{/if}{$hItem.item_order} - + {if $hItem.image}{/if} {$hItem.title} {l s='Edit' mod='themeconfigurator'} {l s='Close' mod='themeconfigurator'} diff --git a/themes/default-bootstrap/css/global.css b/themes/default-bootstrap/css/global.css index 09df5efba..14dfa0ca2 100644 --- a/themes/default-bootstrap/css/global.css +++ b/themes/default-bootstrap/css/global.css @@ -2405,6 +2405,64 @@ a.price_discount_delete:hover { background: white; } +@media (max-width: 767px) { + #order-detail-content #cart_summary table, #order-detail-content #cart_summary thead, #order-detail-content #cart_summary tbody, #order-detail-content #cart_summary th, #order-detail-content #cart_summary td, #order-detail-content #cart_summary tr { + display: block; + } + #order-detail-content #cart_summary thead tr { + position: absolute; + top: -9999px; + left: -9999px; + } + #order-detail-content #cart_summary tr { + border-bottom: 1px solid #ccc; + overflow: hidden; + } + #order-detail-content #cart_summary td { + border: none; + position: relative; + width: 50%; + float: left; + white-space: normal; + } + #order-detail-content #cart_summary td.cart_avail { + clear: both; + } + #order-detail-content #cart_summary td.cart_quantity { + clear: both; + padding: 9px 8px 11px 18px; + } + #order-detail-content #cart_summary td.cart_delete { + width: 100%; + clear: both; + text-align: right; + } + #order-detail-content #cart_summary td.cart_delete:before { + display: inline-block; + padding-right: 0.5em; + position: relative; + top: -3px; + } + #order-detail-content #cart_summary td.cart_delete div { + display: inline; + } + #order-detail-content #cart_summary td:before { + content: attr(data-title); + display: block; + } + #order-detail-content #cart_summary tfoot td { + float: none; + width: 100%; + } + #order-detail-content #cart_summary tfoot td:before { + display: inline; + } + #order-detail-content #cart_summary tfoot tr .text-right, #order-detail-content #cart_summary tfoot tr .price { + display: block; + float: left; + width: 50%; + } +} .cart_voucher { vertical-align: top !important; } @@ -3451,3 +3509,10 @@ div.star.star_hover:after { .ie8 #facebook_block, .ie8 #cmsinfo_block { height: 344px; } + +/************************* Zoom ******************************/ +@media (max-width: 1199px) { + .zoomdiv { + display: none !important; + } +} diff --git a/themes/default-bootstrap/css/product.css b/themes/default-bootstrap/css/product.css index e3b5d8e73..dc496628b 100644 --- a/themes/default-bootstrap/css/product.css +++ b/themes/default-bootstrap/css/product.css @@ -569,8 +569,15 @@ span.view_scroll_spacer { display: none; } } -.box-info-product .exclusive.disabled:before { +.box-info-product .exclusive.added:before { + content: ""; +} +.box-info-product .exclusive.added.disabled:before, .box-info-product .exclusive.disabled:before { content: ""; + animation: 2s linear 0s normal none infinite spin; + -webkit-animation: 2s linear 0s normal none infinite spin; + -moz-animation: 2s linear 0s normal none infinite spin; + border: none; } .box-info-product .exclusive:after { background: url(../img/border-1.gif) repeat-y 0 0; diff --git a/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js b/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js index dfbceb697..63e198425 100644 --- a/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js +++ b/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js @@ -176,8 +176,15 @@ var ajaxCart = { ajaxCart.updateCart(jsonData); //reactive the button when adding has finished - if (addedFromProductPage) + if (addedFromProductPage) { $('#add_to_cart button').removeAttr('disabled').removeClass('disabled'); + if (!jsonData.hasError || jsonData.hasError==false) { + $('#add_to_cart button').addClass('added'); + } + else { + $('#add_to_cart button').removeClass('added'); + } + } else $('.ajax_add_to_cart_button').removeAttr('disabled'); }, diff --git a/themes/default-bootstrap/js/product.js b/themes/default-bootstrap/js/product.js index 2f32a252f..8f17aa111 100644 --- a/themes/default-bootstrap/js/product.js +++ b/themes/default-bootstrap/js/product.js @@ -545,8 +545,8 @@ $(document).ready(function() { $('#bigpic').attr('rel', $('#bigpic').attr('src').replace('large', 'thickbox')); $('img.jqzoom').jqueryzoom({ - xzoom: 200, //zooming div default width(default width value is 200) - yzoom: 200, //zooming div default width(default height value is 200) + xzoom: 600, //zooming div default width(default width value is 200) + yzoom: 600, //zooming div default width(default height value is 200) offset: 21 //zooming div default offset(default offset value is 10) //position: "right" //zooming div position(default position value is "right") }); diff --git a/themes/default-bootstrap/sass/global.scss b/themes/default-bootstrap/sass/global.scss index 0c9dec188..9cd98c8e8 100644 --- a/themes/default-bootstrap/sass/global.scss +++ b/themes/default-bootstrap/sass/global.scss @@ -2230,6 +2230,70 @@ a.price_discount_delete { } } } +@media (max-width: 767px) { + #order-detail-content{ + #cart_summary{ + table, thead, tbody, th, td, tr{display: block;} + thead tr{ + position: absolute; + top: -9999px; + left: -9999px; + } + tr{ + border-bottom: 1px solid #ccc; + overflow: hidden; + } + td{ + border: none; + position: relative; + width: 50%; + float: left; + white-space: normal; + &.cart_product{} + &.cart_description{} + &.cart_avail{clear: both;} + &.cart_unit{} + &.cart_quantity{ + clear: both; + padding: 9px 8px 11px 18px; + } + &.cart_total{} + &.cart_delete{ + width: 100%; + clear: both; + text-align: right; + &:before{ + display: inline-block; + padding-right: 0.5em; + position: relative; + top: -3px; + } + div{display: inline;} + } + } + td:before { + content: attr(data-title); + display: block; + } + tfoot{ + td{ + float: none; + width: 100%; + &:before{ + display: inline; + } + } + tr{ + .text-right, .price{ + display: block; + float: left; + width: 50%; + } + } + } + } + } +} .cart_voucher { vertical-align:top !important; h4 { @@ -3201,4 +3265,11 @@ div.star.star_hover { #facebook_block, #cmsinfo_block { height:344px; } +} + +/************************* Zoom ******************************/ +@media (max-width: $screen-md-max) { // max 1199px + .zoomdiv { + display:none !important; + } } \ No newline at end of file diff --git a/themes/default-bootstrap/sass/product.scss b/themes/default-bootstrap/sass/product.scss index 060888ef1..6f1638592 100644 --- a/themes/default-bootstrap/sass/product.scss +++ b/themes/default-bootstrap/sass/product.scss @@ -555,9 +555,18 @@ padding:18px 19px 12px; } } - &.disabled { + &.added { &:before { - content:""; + content:""; + } + } + &.added.disabled, &.disabled { + &:before { + content:""; + animation:2s linear 0s normal none infinite spin; + -webkit-animation:2s linear 0s normal none infinite spin; + -moz-animation:2s linear 0s normal none infinite spin; + border:none; } } diff --git a/themes/default-bootstrap/shopping-cart-product-line.tpl b/themes/default-bootstrap/shopping-cart-product-line.tpl index f082731bc..15da9bf83 100644 --- a/themes/default-bootstrap/shopping-cart-product-line.tpl +++ b/themes/default-bootstrap/shopping-cart-product-line.tpl @@ -31,8 +31,8 @@ {l s='SKU'} : {if $product.reference}{$product.reference|escape:'html':'UTF-8'}{else}--{/if} {if isset($product.attributes) && $product.attributes}{$product.attributes|escape:'html':'UTF-8'}{/if} - {if $product.quantity_available > 0}{l s='In Stock'}{else}{l s='Out of Stock'}{/if} - + {if $product.quantity_available > 0}{l s='In Stock'}{else}{l s='Out of Stock'}{/if} + {if !empty($product.gift)} {l s='Gift!'} @@ -85,7 +85,7 @@ {/if} {/if} - + {if !empty($product.gift)} {l s='Gift!'} @@ -99,7 +99,7 @@ {if !isset($noDeleteButton) || !$noDeleteButton} - + {if (!isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0) && empty($product.gift)}