// Manual merge PS 1.5.6.0
This commit is contained in:
-26
@@ -477,32 +477,6 @@ function validateImportation(mandatory)
|
||||
}
|
||||
}
|
||||
|
||||
function askFeatureName(selected, selector)
|
||||
{
|
||||
var elem;
|
||||
|
||||
if (selected.value == 'features')
|
||||
{
|
||||
$('#features_' + selector).show();
|
||||
$('#feature_name_' + selector).attr('name', selected.name);
|
||||
}
|
||||
}
|
||||
|
||||
function replaceFeature(toReplace, selector)
|
||||
{
|
||||
var elem;
|
||||
|
||||
if ($('#feature_name_' + selector).val() == '')
|
||||
return false;
|
||||
|
||||
elem = getE(toReplace);
|
||||
elem.options[elem.selectedIndex].text = $('#feature_name_' + selector).val();
|
||||
elem.options[elem.selectedIndex].value = '#F_' + $('#feature_name_' + selector).val();
|
||||
$('#features_' + selector).toggle();
|
||||
$('#feature_name_' + selector).val('');
|
||||
$('#feature_name_' + selector).attr('name', '');
|
||||
}
|
||||
|
||||
function chooseTypeTranslation(id_lang)
|
||||
{
|
||||
getE('translation_lang').value = id_lang;
|
||||
|
||||
@@ -368,7 +368,6 @@ function bind_inputs()
|
||||
function is_freeClick(elt)
|
||||
{
|
||||
var is_free = $(elt);
|
||||
|
||||
if (parseInt(is_free.val()))
|
||||
hideFees();
|
||||
else
|
||||
@@ -389,7 +388,7 @@ function hideFees()
|
||||
function showFees()
|
||||
{
|
||||
$('tr.range_inf td, tr.range_sup td, tr.fees_all td, tr.fees td').each( function () {
|
||||
if ($(this).index() > 2)
|
||||
if ($(this).index() >= 2)
|
||||
{
|
||||
//enable only if zone is active
|
||||
tr = $(this).parent('tr');
|
||||
@@ -474,7 +473,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 +492,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 +642,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