// Fix attr('checked'), attr('disabled') and attr('selected') with jquery update #PSCFV-2142
This commit is contained in:
@@ -394,7 +394,7 @@
|
||||
|
||||
function disableConstraint()
|
||||
{
|
||||
$('#constraint').attr('disabled', 'disabled');
|
||||
$('#constraint').attr('disabled', true);
|
||||
};
|
||||
function ShowHandlers()
|
||||
{
|
||||
@@ -496,7 +496,7 @@
|
||||
*/
|
||||
function cancelChangeMode()
|
||||
{
|
||||
$('#formAction input[@value=' + $('#image_mode').val() + ']').attr('checked', 'checked');
|
||||
$('#formAction input[@value=' + $('#image_mode').val() + ']').attr('checked', true);
|
||||
};
|
||||
/**
|
||||
* get the image element which is going to be modified
|
||||
@@ -669,7 +669,7 @@ function toggleDisabledButton(buttonId, forceDisable)
|
||||
if(forceDisable && currentClass == 'button')
|
||||
{
|
||||
newClass = 'disabledButton';
|
||||
$(disabledButton).attr('disabled', 'disabled');
|
||||
$(disabledButton).attr('disabled', true);
|
||||
}else if(!forceDisable && currentClass == 'disabledButton')
|
||||
{
|
||||
newClass = 'button';
|
||||
@@ -684,7 +684,7 @@ function toggleDisabledButton(buttonId, forceDisable)
|
||||
else if(currentClass == 'button')
|
||||
{
|
||||
newClass = 'disabledButton';
|
||||
$(disabledButton).attr('disabled', 'disabled');
|
||||
$(disabledButton).attr('disabled', true);
|
||||
}else
|
||||
{
|
||||
newClass = 'button';
|
||||
|
||||
@@ -223,13 +223,13 @@ $('#cart_rule_form').submit(function() {
|
||||
else
|
||||
{
|
||||
$('#' + restrictions[i] + '_select_2 option').each(function(i) {
|
||||
$(this).attr('selected', 'selected');
|
||||
$(this).attr('selected', true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('.product_rule_toselect option').each(function(i) {
|
||||
$(this).attr('selected', 'selected');
|
||||
$(this).attr('selected', true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
if (r == 'ok')
|
||||
{
|
||||
$('#note_feedback').html("<b style='color:green'>{l s='Your note has been saved'}</b>").fadeIn(400);
|
||||
$('#submitCustomerNote').attr('disabled', 'disabled');
|
||||
$('#submitCustomerNote').attr('disabled', true);
|
||||
}
|
||||
else if (r == 'error:validation')
|
||||
$('#note_feedback').html("<b style='color:red'>({l s='Error: your note is not valid'}</b>").fadeIn(400);
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
if (!val || val == {$smarty.const._PS_ADMIN_PROFILE_})
|
||||
{
|
||||
$('.assoShop input[type=checkbox]').attr('disabled', true);
|
||||
$('.assoShop input[type=checkbox]').attr('checked', 'checked');
|
||||
$('.assoShop input[type=checkbox]').attr('checked', true);
|
||||
}
|
||||
else
|
||||
$('.assoShop input[type=checkbox]').attr('disabled', false);
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
else
|
||||
{
|
||||
$(elt).addClass('select_all').removeClass('unselect_all');
|
||||
$('ul#sortable_module_'+$(elt).attr('id')).find('input[type="checkbox"]').attr('checked', 'checked');
|
||||
$('ul#sortable_module_'+$(elt).attr('id')).find('input[type="checkbox"]').attr('checked', true);
|
||||
$(elt).html('{l s='Unselect all'}');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,11 +625,11 @@
|
||||
updateDeliveryOptionList(jsonSummary.delivery_option_list);
|
||||
|
||||
if (jsonSummary.cart.gift == 1)
|
||||
$('#order_gift').attr('checked', 'checked');
|
||||
$('#order_gift').attr('checked', true);
|
||||
else
|
||||
$('#carrier_gift').removeAttr('checked');
|
||||
if (jsonSummary.cart.recyclable == 1)
|
||||
$('#carrier_recycled_package').attr('checked', 'checked');
|
||||
$('#carrier_recycled_package').attr('checked', true);
|
||||
else
|
||||
$('#carrier_recycled_package').removeAttr('checked');
|
||||
$('#gift_message').html(jsonSummary.cart.gift_message);
|
||||
@@ -645,11 +645,11 @@
|
||||
$('#total_products').html(jsonSummary.summary.total_products);
|
||||
id_currency = jsonSummary.cart.id_currency;
|
||||
$('#id_currency option').removeAttr('selected');
|
||||
$('#id_currency option[value="'+id_currency+'"]').attr('selected', 'selected');
|
||||
$('#id_currency option[value="'+id_currency+'"]').attr('selected', true);
|
||||
updateCurrencySign();
|
||||
id_lang = jsonSummary.cart.id_lang;
|
||||
$('#id_lang option').removeAttr('selected');
|
||||
$('#id_lang option[value="'+id_lang+'"]').attr('selected', 'selected');
|
||||
$('#id_lang option[value="'+id_lang+'"]').attr('selected', true);
|
||||
$('#send_email_to_customer').attr('rel', jsonSummary.link_order);
|
||||
$('#go_order_process').attr('href', jsonSummary.link_order);
|
||||
$('#order_message').val(jsonSummary.order_message);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
event.preventDefault();
|
||||
$('#block_category_tree').toggle();
|
||||
if ($('#block_category_tree').is(':visible'))
|
||||
$(this).find('input').attr('checked', 'checked');
|
||||
$(this).find('input').attr('checked', true);
|
||||
else
|
||||
{
|
||||
$(this).find('input').removeAttr('checked');
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
if (disabled_customer || disabled_stock)
|
||||
{
|
||||
$("input[name=share_order]").each(function(i) {
|
||||
$(this).attr('disabled', 'disabled');
|
||||
$(this).attr('disabled', true);
|
||||
});
|
||||
|
||||
$('#share_order_off').attr('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('input[name=share_order]').attr('disabled', '');
|
||||
$('input[name=share_order]').attr('disabled', false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -223,13 +223,13 @@ $(document).ready(function() {
|
||||
new_condition_group();
|
||||
{foreach from=$condition_group item='condition'}
|
||||
{if $condition.type == 'attribute'}
|
||||
$('#id_attribute_group option[value="{$condition.id_attribute_group}"]').attr('selected', 'selected');
|
||||
$('#id_attribute_{$condition.id_attribute_group} option[value="{$condition.value}"]').attr('selected', 'selected');
|
||||
$('#id_attribute_group option[value="{$condition.id_attribute_group}"]').attr('selected', true);
|
||||
$('#id_attribute_{$condition.id_attribute_group} option[value="{$condition.value}"]').attr('selected', true);
|
||||
{elseif $condition.type == 'feature'}
|
||||
$('#id_feature[value="{$condition.id_feature}"]').attr('selected', 'selected');
|
||||
$('#id_feature_{$condition.id_feature} option[value="{$condition.value}"]').attr('selected', 'selected');
|
||||
$('#id_feature[value="{$condition.id_feature}"]').attr('selected', true);
|
||||
$('#id_feature_{$condition.id_feature} option[value="{$condition.value}"]').attr('selected', true);
|
||||
{else}
|
||||
$('#id_{$condition.type} option[value="{$condition.value}"]').attr('selected', 'selected');
|
||||
$('#id_{$condition.type} option[value="{$condition.value}"]').attr('selected', true);
|
||||
{/if}
|
||||
$('#add_condition_{$condition.type}').click();
|
||||
{/foreach}
|
||||
|
||||
Reference in New Issue
Block a user