Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release
This commit is contained in:
@@ -107,8 +107,8 @@ class CategoryCore extends ObjectModel
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
|
||||
// Lang fields
|
||||
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64),
|
||||
'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 64),
|
||||
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128),
|
||||
'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 128),
|
||||
'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'),
|
||||
'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128),
|
||||
'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
||||
|
||||
@@ -474,7 +474,8 @@ function validateRange(index)
|
||||
function enableZone(index)
|
||||
{
|
||||
$('tr.fees').each( function () {
|
||||
$(this).find('td:eq('+index+')').children('input').removeAttr('disabled');
|
||||
if ($(this).find('td:eq(1)').children('input[type=checkbox]:checked').length)
|
||||
$(this).find('td:eq('+index+')').children('input').removeAttr('disabled');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -492,12 +493,18 @@ function enableRange(index)
|
||||
if ($(this).children('td').children('input:checkbox').attr('checked') == 'checked')
|
||||
enableZone(index);
|
||||
});
|
||||
$('tr.fees_all td:eq('+index+')').addClass('validated').removeClass('not_validated');
|
||||
if ($('.zone input[type=checkbox]:checked').length)
|
||||
enableGlobalFees(index);
|
||||
bind_inputs();
|
||||
}
|
||||
|
||||
function enableGlobalFees(index)
|
||||
{
|
||||
$('span.fees_all').show();
|
||||
$('tr.fees_all td:eq('+index+')').children('input').show().removeAttr('disabled');
|
||||
$('tr.fees_all td:eq('+index+')').children('.currency_sign').show();
|
||||
$('tr.fees_all td:eq('+index+')').addClass('validated').removeClass('not_validated');
|
||||
$('tr.fees_all td:eq('+index+')').children('button').remove();
|
||||
bind_inputs();
|
||||
|
||||
}
|
||||
|
||||
function disableRange(index)
|
||||
@@ -636,7 +643,8 @@ function checkAllZones(elt)
|
||||
{
|
||||
$('.input_zone').attr('checked', 'checked');
|
||||
$('.fees input:text').each( function () {
|
||||
index = $(this).parent().index();
|
||||
index = $(this).closest('td').index();
|
||||
enableGlobalFees(index);
|
||||
if ($('tr.fees_all td:eq('+index+')').hasClass('validated'))
|
||||
{
|
||||
$(this).removeAttr('disabled');
|
||||
|
||||
Reference in New Issue
Block a user