[-] FO : Fix bug #PSCFV-8202 special chars for checkCustomizations js function

This commit is contained in:
gRoussac
2013-03-21 15:09:02 +01:00
parent dfd2b8f604
commit e00d7e736f
3 changed files with 11 additions and 10 deletions

View File

@@ -93,7 +93,7 @@ function ps_round(value, precision)
return Math.round(value * precisionFactor) / precisionFactor;
}
function autoUrl(name, dest)
function autoUrl(name, dest)
{
var loc;
var id_list;
@@ -105,7 +105,7 @@ function autoUrl(name, dest)
return ;
}
function autoUrlNoList(name, dest)
function autoUrlNoList(name, dest)
{
var loc;
@@ -207,9 +207,11 @@ function checkCustomizations()
if (typeof customizationFields != 'undefined')
for (var i = 0; i < customizationFields.length; i++)
{
/* If the field is required and empty then we abort */
if (parseInt(customizationFields[i][1]) == 1 && ($('#' + customizationFields[i][0]).html() == '' || $('#' + customizationFields[i][0]).html() != $('#' + customizationFields[i][0]).val()) && !pattern.test($('#' + customizationFields[i][0]).attr('class')))
if (parseInt(customizationFields[i][1]) == 1 && ($('#' + customizationFields[i][0]).html() == '' || $('#' + customizationFields[i][0]).text() != $('#' + customizationFields[i][0]).val()) && !pattern.test($('#' + customizationFields[i][0]).attr('class')))
return false;
}
return true;
}

View File

@@ -4,7 +4,6 @@
clear:both;
float: right;
margin-top:8px;
width: 535px;
}
#header_user #header_nav {

View File

@@ -3,10 +3,10 @@
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
@@ -19,13 +19,13 @@
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{*************************************************************************************************************************************}
{* IMPORTANT : If you change some data here, you have to report these changes in the ./blockcart-json.js (to let ajaxCart available) *}
{*************************************************************************************************************************************}
{if $ajax_allowed}
<script type="text/javascript">
var CUSTOMIZE_TEXTFIELD = {$CUSTOMIZE_TEXTFIELD};
@@ -115,7 +115,7 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
{/foreach}
</dl>
{/if}
<p {if $products}class="hidden"{/if} id="cart_block_no_products">{l s='No products' mod='blockcart'}</p>
<p class="cart_block_no_products{if $products} hidden{/if}" id="cart_block_no_products">{l s='No products' mod='blockcart'}</p>
{if $discounts|@count > 0}
<table id="vouchers">
<tbody>