From d1c9ec8e0929b16803cbf077dc35392ec5525f3b Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Mon, 25 Nov 2013 11:02:40 +0100 Subject: [PATCH] // Changing Typo preserving backward compatibility --- modules/blocklayered/blocklayered.js | 14 ++++++++++++-- .../js/jquery/jquery.uniform-modify.js | 2 ++ .../js/modules/blocklayered/blocklayered.js | 12 +++++++++++- .../mobile/category-product-sort.tpl | 4 ++-- themes/default-bootstrap/product-sort.tpl | 4 ++-- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/modules/blocklayered/blocklayered.js b/modules/blocklayered/blocklayered.js index e1ec5b2de..0a2301555 100644 --- a/modules/blocklayered/blocklayered.js +++ b/modules/blocklayered/blocklayered.js @@ -123,7 +123,7 @@ $(document).ready(function() hideFilterValueAction(this); }); - // To be sure there is no other events attached to the selectPrductSort, change the ID + // To be sure there is no other events attached to the selectProductSort, change the ID var id = 1; while ($('#selectPrductSort').length) { // Because ids are duplicated // Unbind event change on #selectPrductSort @@ -134,8 +134,18 @@ $(document).ready(function() $('label[for=selectPrductSort]').attr('for', 'selectPrductSort'+id); id++; } + + while ($('#selectProductSort').length) { // Because ids are duplicated + // Unbind event change on #selectProductSort + $('#selectProductSort').unbind('change'); + $('#selectProductSort').attr('onchange', ''); + $('#selectProductSort').addClass('selectProductSort'); + $('#selectProductSort').attr('id', 'selectProductSort'+id); + $('label[for=selectProductSort]').attr('for', 'selectProductSort'+id); + id++; + } - // Since 1.5, event is add to .selectProductSort and not to #selectPrductSort + // Since 1.5, event is add to .selectProductSort and not to #selectProductSort setTimeout(function() { $('.selectProductSort').unbind('change'); }, 100); diff --git a/themes/default-bootstrap/js/jquery/jquery.uniform-modify.js b/themes/default-bootstrap/js/jquery/jquery.uniform-modify.js index 301991aa8..1344cf021 100644 --- a/themes/default-bootstrap/js/jquery/jquery.uniform-modify.js +++ b/themes/default-bootstrap/js/jquery/jquery.uniform-modify.js @@ -1073,6 +1073,8 @@ $(window).load(function () { $("select.form-control,input[type='checkbox']:not(.comparator), input[type='radio'],input#id_carrier2, input[type='file']").uniform(); $("#uniform-selectPrductSort1").innerWidth(0); $("#uniform-selectPrductSort1 span").innerWidth(0); + $("#uniform-selectProductSort1").innerWidth(0); + $("#uniform-selectProductSort1 span").innerWidth(0); }); diff --git a/themes/default-bootstrap/js/modules/blocklayered/blocklayered.js b/themes/default-bootstrap/js/modules/blocklayered/blocklayered.js index 8c43c4c55..c79358722 100644 --- a/themes/default-bootstrap/js/modules/blocklayered/blocklayered.js +++ b/themes/default-bootstrap/js/modules/blocklayered/blocklayered.js @@ -123,7 +123,7 @@ $(document).ready(function() hideFilterValueAction(this); }); - // To be sure there is no other events attached to the selectPrductSort, change the ID + // To be sure there is no other events attached to the selectProductSort, change the ID var id = 1; while ($('#selectPrductSort').length) { // Because ids are duplicated // Unbind event change on #selectPrductSort @@ -134,6 +134,16 @@ $(document).ready(function() $('label[for=selectPrductSort]').attr('for', 'selectPrductSort'+id); id++; } + + while ($('#selectProductSort').length) { // Because ids are duplicated + // Unbind event change on #selectProductSort + $('#selectProductSort').unbind('change'); + $('#selectProductSort').attr('onchange', ''); + $('#selectProductSort').addClass('selectProductSort'); + $('#selectProductSort').attr('id', 'selectProductSort'+id); + $('label[for=selectProductSort]').attr('for', 'selectProductSort'+id); + id++; + } // Since 1.5, event is add to .selectProductSort and not to #selectPrductSort setTimeout(function() { diff --git a/themes/default-bootstrap/mobile/category-product-sort.tpl b/themes/default-bootstrap/mobile/category-product-sort.tpl index 0b94a2f8e..81c6ca23d 100644 --- a/themes/default-bootstrap/mobile/category-product-sort.tpl +++ b/themes/default-bootstrap/mobile/category-product-sort.tpl @@ -40,7 +40,7 @@ //
- {if !$PS_CATALOG_MODE} diff --git a/themes/default-bootstrap/product-sort.tpl b/themes/default-bootstrap/product-sort.tpl index 18a75b361..2f1a9fb01 100644 --- a/themes/default-bootstrap/product-sort.tpl +++ b/themes/default-bootstrap/product-sort.tpl @@ -60,8 +60,8 @@ $(document).ready(function(){ {/if}
- - {if !$PS_CATALOG_MODE}