// Changing Typo preserving backward compatibility

This commit is contained in:
Jerome Nadaud
2013-11-25 11:02:40 +01:00
parent f588a2c0c3
commit d1c9ec8e09
5 changed files with 29 additions and 7 deletions
+12 -2
View File
@@ -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);
@@ -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);
});
@@ -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() {
@@ -40,7 +40,7 @@
//<![CDATA[
$(document).ready(function()
{
$('.selectPrductSort').change(function()
$('.selectProductSort').change(function()
{
var requestSortProducts = '{$request}';
var splitData = $(this).val().split(':');
@@ -53,7 +53,7 @@
<div class="{$container_class}">
<form id="productsSortForm" action="{$request|escape:'html':'UTF-8'}">
<select class="selectPrductSort">
<select class="selectProductSort">
<option value="{$orderbydefault|escape:'html':'UTF-8'}:{$orderwaydefault|escape:'html':'UTF-8'}" {if $orderby eq $orderbydefault}selected="selected"{/if}>{l s='Sort by'}</option>
{if !$PS_CATALOG_MODE}
<option value="price:asc" {if $orderby eq 'price' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Price: Lowest first'}</option>
+2 -2
View File
@@ -60,8 +60,8 @@ $(document).ready(function(){
{/if}
<form id="productsSortForm{if isset($paginationId)}_{$paginationId}{/if}" action="{$request|escape:'html':'UTF-8'}" class="productsSortForm">
<div class="select selector1">
<label for="selectPrductSort{if isset($paginationId)}_{$paginationId}{/if}">{l s='Sort by'}</label>
<select id="selectPrductSort{if isset($paginationId)}_{$paginationId}{/if}" class="selectProductSort form-control">
<label for="selectProductSort{if isset($paginationId)}_{$paginationId}{/if}">{l s='Sort by'}</label>
<select id="selectProductSort{if isset($paginationId)}_{$paginationId}{/if}" class="selectProductSort form-control">
<option value="{$orderbydefault|escape:'html':'UTF-8'}:{$orderwaydefault|escape:'html':'UTF-8'}" {if $orderby eq $orderbydefault}selected="selected"{/if}>{l s='--'}</option>
{if !$PS_CATALOG_MODE}
<option value="price:asc" {if $orderby eq 'price' AND $orderway eq 'asc'}selected="selected"{/if}>{l s='Price: Lowest first'}</option>