From 91c3bf48b1e7bf9c101fcfdbf78c3bc0529bcbac Mon Sep 17 00:00:00 2001 From: Kevin Granger Date: Mon, 9 Dec 2013 14:26:17 +0100 Subject: [PATCH 1/5] // w3C product --- themes/default-bootstrap/js/product.js | 4 ++-- themes/default-bootstrap/product.tpl | 28 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/themes/default-bootstrap/js/product.js b/themes/default-bootstrap/js/product.js index 25019f03d..726f55127 100644 --- a/themes/default-bootstrap/js/product.js +++ b/themes/default-bootstrap/js/product.js @@ -750,7 +750,7 @@ $(document).ready(function(){ // The button to increment the product value $('.product_quantity_up').click(function(e){ e.preventDefault(); - fieldName = $(this).attr('rel'); + fieldName = $(this).data('field-qty'); var currentVal = parseInt($('input[name='+fieldName+']').val()); if (quantityAvailable > 0) { quantityAvailableT = quantityAvailable; @@ -767,7 +767,7 @@ $(document).ready(function(){ // The button to decrement the product value $(".product_quantity_down").click(function(e) { e.preventDefault(); - fieldName = $(this).attr('rel'); + fieldName = $(this).data('field-qty'); var currentVal = parseInt($('input[name='+fieldName+']').val()); if (!isNaN(currentVal) && currentVal > 1) { $('input[name='+fieldName+']').val(currentVal - 1).trigger('keyup'); diff --git a/themes/default-bootstrap/product.tpl b/themes/default-bootstrap/product.tpl index 9b0785e04..fb144625f 100644 --- a/themes/default-bootstrap/product.tpl +++ b/themes/default-bootstrap/product.tpl @@ -265,7 +265,7 @@ rel="{literal}{{/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}'{literal}}{/literal}" {else} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}" - rel="other-views" + data-fancybox-group="other-views" class="thickbox{if $smarty.foreach.thumbnails.first} shown{/if}" {/if} title="{$imageTitlte}"> @@ -482,10 +482,10 @@ value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> - + - + @@ -507,7 +507,7 @@ {foreach from=$groups key=id_attribute_group item=group} {if $group.attributes|@count}
- + {assign var="groupName" value="group_$id_attribute_group"}
{if ($group.group_type == 'select')} @@ -520,16 +520,16 @@ From 8700f15c61298011c12bf775a15b4992088d1bee Mon Sep 17 00:00:00 2001 From: Kevin Granger Date: Mon, 9 Dec 2013 16:39:33 +0100 Subject: [PATCH 2/5] // closed an attribute left behind --- themes/default-bootstrap/modules/blocknewproducts/tab.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default-bootstrap/modules/blocknewproducts/tab.tpl b/themes/default-bootstrap/modules/blocknewproducts/tab.tpl index 203ffcc97..df140624b 100644 --- a/themes/default-bootstrap/modules/blocknewproducts/tab.tpl +++ b/themes/default-bootstrap/modules/blocknewproducts/tab.tpl @@ -22,4 +22,4 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -
  • {l s='New arrivals' mod='blocknewproducts'}
  • \ No newline at end of file +
  • {l s='New arrivals' mod='blocknewproducts'}
  • \ No newline at end of file From 0e3545186d4f03999154787e5171ab5ce5f88a49 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Mon, 9 Dec 2013 16:39:43 +0100 Subject: [PATCH 3/5] // change behavior of displaywarning on backoffice --- admin-dev/themes/default/template/layout.tpl | 24 ++++++-------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/admin-dev/themes/default/template/layout.tpl b/admin-dev/themes/default/template/layout.tpl index 11adc6614..ecc27b4a7 100644 --- a/admin-dev/themes/default/template/layout.tpl +++ b/admin-dev/themes/default/template/layout.tpl @@ -70,24 +70,14 @@
    {if count($warnings) > 1} - {l s='There are %d warnings.' sprintf=count($warnings)} - - {l s='Click here to see more'} - - -
      1}style="display:none;"{/if} id="seeMore" class="list-unstyled"> - {foreach $warnings as $warning} -
    • {$warning}
    • - {/foreach} -
    - {else} -
      - {foreach $warnings as $warning} -
    • {$warning}
    • - {/foreach} -
    + {l s='There are %d warnings:' sprintf=count($warnings)} {/if} +
      + {foreach $warnings as $warning} +
    • {$warning}
    • + {/foreach} +
    {/if} {$page} -{$footer} \ No newline at end of file +{$footer} From 79652b170406abac40e87a5660d9561765fcd41b Mon Sep 17 00:00:00 2001 From: Kevin Granger Date: Mon, 9 Dec 2013 16:48:37 +0100 Subject: [PATCH 4/5] =?UTF-8?q?//=20removed=20=C2=AB=C2=A0add=20to=20compa?= =?UTF-8?q?re=C2=BB=20from=20the=20homepage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/default-bootstrap/product-list.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/default-bootstrap/product-list.tpl b/themes/default-bootstrap/product-list.tpl index 5ff63a2bc..ecab1f3c1 100644 --- a/themes/default-bootstrap/product-list.tpl +++ b/themes/default-bootstrap/product-list.tpl @@ -206,14 +206,14 @@ {/if} {/if}
    -
    +
    {/foreach} From e7ef71f32e00fecc1dbae51b4f0c2162b4036ea8 Mon Sep 17 00:00:00 2001 From: Guillaume Lafarge Date: Mon, 9 Dec 2013 17:17:48 +0100 Subject: [PATCH 5/5] [-] FO : Fix versatile jQuery selector `:hidden` selects form elements with `type="hidden"` but also : elements with `display:none`, elements with their width/height equal to zero and which the ancestor element is hidden. `input[type=hidden]` is more appropriate for those reasons. --- themes/default-bootstrap/js/product.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default-bootstrap/js/product.js b/themes/default-bootstrap/js/product.js index 726f55127..4d4628cc5 100644 --- a/themes/default-bootstrap/js/product.js +++ b/themes/default-bootstrap/js/product.js @@ -730,7 +730,7 @@ function checkUrl() $('#color_' + attributesCombinations[a]['id_attribute']).addClass('selected'); $('#color_' + attributesCombinations[a]['id_attribute']).parent().addClass('selected'); $('input:radio[value=' + attributesCombinations[a]['id_attribute'] + ']').attr('checked', true); - $('input:hidden[name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); + $('input[type=hidden][name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); $('select[name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); } // find combination