From fa5bb1c8c73137e696b589029acd9b6821e2caae Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 27 Mar 2012 09:03:52 +0000 Subject: [PATCH] // Fix attributes values form page for multishop #PSTEST-780 --- .../template/controllers/attributes/helpers/form/form.tpl | 3 +++ admin-dev/themes/default/template/helpers/form/assoshop.tpl | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl index e4fe5e241..d65e244b6 100644 --- a/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/attributes/helpers/form/form.tpl @@ -75,7 +75,10 @@ if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_group_shop, shop_associations[id_attribute_group]) > -1) $(item).attr('disabled', false); else + { $(item).attr('disabled', true); + $(item).attr('checked', false); + } }); }; $('#id_attribute_group').change(changeAssociationGroup); diff --git a/admin-dev/themes/default/template/helpers/form/assoshop.tpl b/admin-dev/themes/default/template/helpers/form/assoshop.tpl index 26d251581..01688e99d 100644 --- a/admin-dev/themes/default/template/helpers/form/assoshop.tpl +++ b/admin-dev/themes/default/template/helpers/form/assoshop.tpl @@ -29,8 +29,8 @@ $().ready(function() { // Click on "all shop" $('.input_all_shop').live('click', function() { var checked = $(this).attr('checked'); - $('.input_group_shop').attr('checked', checked); - $('.input_shop').attr('checked', checked); + $('.input_group_shop:not(:disabled)').attr('checked', checked); + $('.input_shop:not(:disabled)').attr('checked', checked); }); // Click on a group shop @@ -67,7 +67,7 @@ function check_group_shop_status(id_group) { function check_all_shop() { var allChecked = true; - $('.input_group_shop').each(function(k, v) { + $('.input_group_shop:not(:disabled)').each(function(k, v) { if (!$(v).attr('checked')) allChecked = false; });