diff --git a/admin-dev/ajaxfilemanager/jscripts/ajaximageeditor.js b/admin-dev/ajaxfilemanager/jscripts/ajaximageeditor.js index a4c7149b6..cdec4dc4f 100755 --- a/admin-dev/ajaxfilemanager/jscripts/ajaximageeditor.js +++ b/admin-dev/ajaxfilemanager/jscripts/ajaximageeditor.js @@ -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'; diff --git a/admin-dev/themes/default/template/controllers/cart_rules/form.js b/admin-dev/themes/default/template/controllers/cart_rules/form.js index 76ed0084d..523939095 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/form.js +++ b/admin-dev/themes/default/template/controllers/cart_rules/form.js @@ -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); }); }); diff --git a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl index cc3b0ab6c..81edc0ab7 100644 --- a/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/customers/helpers/view/view.tpl @@ -43,7 +43,7 @@ if (r == 'ok') { $('#note_feedback').html("{l s='Your note has been saved'}").fadeIn(400); - $('#submitCustomerNote').attr('disabled', 'disabled'); + $('#submitCustomerNote').attr('disabled', true); } else if (r == 'error:validation') $('#note_feedback').html("({l s='Error: your note is not valid'}").fadeIn(400); diff --git a/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl index 02a8693d3..69d483cd3 100644 --- a/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/employees/helpers/form/form.tpl @@ -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); diff --git a/admin-dev/themes/default/template/controllers/groups/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/groups/helpers/form/form.tpl index 5058ea579..8e8c9910e 100644 --- a/admin-dev/themes/default/template/controllers/groups/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/groups/helpers/form/form.tpl @@ -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'}'); } } diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl index 96658c876..0cb3aa924 100755 --- a/admin-dev/themes/default/template/controllers/orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/form.tpl @@ -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); diff --git a/admin-dev/themes/default/template/controllers/products/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/products/helpers/list/list_header.tpl index 42717ce69..90f6b39b0 100644 --- a/admin-dev/themes/default/template/controllers/products/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/controllers/products/helpers/list/list_header.tpl @@ -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'); diff --git a/admin-dev/themes/default/template/controllers/shop_group/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/shop_group/helpers/form/form.tpl index 0b315f33c..c4c0d3e77 100644 --- a/admin-dev/themes/default/template/controllers/shop_group/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/shop_group/helpers/form/form.tpl @@ -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); } } diff --git a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl index fca904df8..5934e76cd 100755 --- a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl @@ -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} diff --git a/js/admin-categories-tree.js b/js/admin-categories-tree.js index a0041515a..d145a517c 100755 --- a/js/admin-categories-tree.js +++ b/js/admin-categories-tree.js @@ -203,7 +203,7 @@ function checkAllCategories() else { $('input[name="categoryBox[]"]').not(':checked').each(function () { - $(this).attr('checked', 'checked'); + $(this).attr('checked', true); clickOnCategoryBox($(this)); }); } @@ -352,7 +352,7 @@ function checkCategory() } else { - $('li#'+category_to_check+' > input').attr('checked', 'checked'); + $('li#'+category_to_check+' > input').attr('checked', true); updateNbSubCategorySelected($('li#'+category_to_check+' > input[type=checkbox]'), true); } } diff --git a/js/admin-products.js b/js/admin-products.js index d8e4cbc75..f597d8578 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -740,12 +740,12 @@ product_tabs['Informations'] = new function(){ $("#available_for_order").click(function(){ if ($(this).is(':checked') || !$('input[name=\'multishop_check[show_price]\']').prop('checked')) { - $('#show_price').attr('checked', 'checked'); - $('#show_price').attr('disabled', 'disabled'); + $('#show_price').attr('checked', true); + $('#show_price').attr('disabled', true); } else { - $('#show_price').attr('disabled', ''); + $('#show_price').attr('disabled', false); } }); }; @@ -782,17 +782,17 @@ product_tabs['Informations'] = new function(){ this.switchProductType = function(){ if (product_type == product_type_pack) { - $('#pack_product').attr('checked', 'checked'); + $('#pack_product').attr('checked', true); } else if (product_type == product_type_virtual) { - $('#virtual_product').attr('checked', 'checked'); - $('#condition').attr('disabled', 'disabled'); - $('#condition option[value=new]').attr('selected', 'selected'); + $('#virtual_product').attr('checked', true); + $('#condition').attr('disabled', true); + $('#condition option[value=new]').attr('selected', true); } else { - $('#simple_product').attr('checked', 'checked'); + $('#simple_product').attr('checked', true); } $('input[name="type_product"]').live('click', function() @@ -813,11 +813,11 @@ product_tabs['Informations'] = new function(){ { //when you change the type of the product, directly go to the pack tab $('li.tab-row a[id*="Pack"]').show().click(); - $('#ppack').val(1).attr('checked', true).attr('disabled', 'disabled'); + $('#ppack').val(1).attr('checked', true).attr('disabled', true); $('#ppackdiv').show(); // If the pack tab has not finished loaded the changes will be made when the loading event is triggered $("#product-tab-content-Pack").bind('loaded', function(){ - $('#ppack').val(1).attr('checked', true).attr('disabled', 'disabled'); + $('#ppack').val(1).attr('checked', true).attr('disabled', true); $('#ppackdiv').show(); }); $("#product-tab-content-Quantities").bind('loaded', function(){ @@ -834,7 +834,7 @@ product_tabs['Informations'] = new function(){ { if (has_combinations) { - $('#simple_product').attr('checked', 'checked'); + $('#simple_product').attr('checked', true); $('#warn_virtual_combinations').show(); } else @@ -854,7 +854,7 @@ product_tabs['Informations'] = new function(){ $('li.tab-row a[id*="Shipping"]').hide(); tabs_manager.onLoad('Informations', function(){ - $('#condition').attr('disabled', 'disabled'); + $('#condition').attr('disabled', true); $('#condition option[value=refurbished]').removeAttr('selected'); $('#condition option[value=used]').removeAttr('selected'); }); @@ -905,7 +905,7 @@ product_tabs['Pack'] = new function(){ this.bindPackEvents = function (){ if ($('#ppack').prop('checked')) { - $('#ppack').attr('disabled', 'disabled'); + $('#ppack').attr('disabled', true); $('#ppackdiv').show(); } diff --git a/js/admin_order.js b/js/admin_order.js index 20448f579..2195c1675 100644 --- a/js/admin_order.js +++ b/js/admin_order.js @@ -344,7 +344,7 @@ function init() { $('tr#new_product input, tr#new_product select').each(function() { if ($(this).attr('id') != 'add_product_product_name') - $('tr#new_product input, tr#new_product select').attr('disabled', 'disabled'); + $('tr#new_product input, tr#new_product select').attr('disabled', true); }); } else diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index c62eff528..5f19ffa5e 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -184,11 +184,11 @@ var ajaxCart = { //disabled the button when adding to do not double add if user double click if (addedFromProductPage) { - $('body#product p#add_to_cart input').attr('disabled', 'disabled').removeClass('exclusive').addClass('exclusive_disabled'); + $('body#product p#add_to_cart input').attr('disabled', true).removeClass('exclusive').addClass('exclusive_disabled'); $('.filled').removeClass('filled'); } else - $(callerElement).attr('disabled', 'disabled'); + $(callerElement).attr('disabled', true); if ($('#cart_block #cart_block_list').hasClass('collapsed')) this.expand(); diff --git a/modules/blocklayered/blocklayered.js b/modules/blocklayered/blocklayered.js index 57d68f3c3..62686ab59 100644 --- a/modules/blocklayered/blocklayered.js +++ b/modules/blocklayered/blocklayered.js @@ -412,7 +412,7 @@ function reloadContent(params_plus) val = $('#pagination #nb_item').val(); $('#pagination #nb_item').children().each(function(it, option) { if (option.value == val) - $(option).attr('selected', 'selected'); + $(option).attr('selected', true); else $(option).removeAttr('selected'); }); diff --git a/themes/default/address.tpl b/themes/default/address.tpl index 588cf5741..034b140c6 100644 --- a/themes/default/address.tpl +++ b/themes/default/address.tpl @@ -45,7 +45,7 @@ countriesNeedZipCode = new Array(); {/if} {/foreach} $(function(){ldelim} - $('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address->id_state)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected'); + $('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address->id_state)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', true); {rdelim}); {if $vat_management} {literal} diff --git a/themes/default/authentication.tpl b/themes/default/authentication.tpl index 3856462bb..bc6dc8232 100644 --- a/themes/default/authentication.tpl +++ b/themes/default/authentication.tpl @@ -50,7 +50,7 @@ countriesNeedZipCode = new Array(); {/foreach} {/if} $(function(){ldelim} - $('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected'); + $('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', true); {rdelim}); //]]> {if $vat_management} diff --git a/themes/default/js/product.js b/themes/default/js/product.js index df27d62fc..adec36f50 100644 --- a/themes/default/js/product.js +++ b/themes/default/js/product.js @@ -703,7 +703,7 @@ function checkUrl() count++; // add class 'selected' to the selected color $('#color_'+attributesCombinations[a]['id_attribute']).addClass('selected'); - $('input:radio[value='+attributesCombinations[a]['id_attribute']+']').attr('checked', 'checked'); + $('input:radio[value='+attributesCombinations[a]['id_attribute']+']').attr('checked', true); $('input:hidden[name=group_'+attributesCombinations[a]['id_attribute_group']+']').val(attributesCombinations[a]['id_attribute']); $('select[name=group_'+attributesCombinations[a]['id_attribute_group']+']').val(attributesCombinations[a]['id_attribute']); }