// Fix attributes values form page for multishop #PSTEST-780

This commit is contained in:
rMalie
2012-03-27 09:03:52 +00:00
parent 82e5c0f4fc
commit e717ac2bcb
2 changed files with 6 additions and 3 deletions
@@ -75,7 +75,10 @@
if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_group_shop, shop_associations[id_attribute_group]) > -1) if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_group_shop, shop_associations[id_attribute_group]) > -1)
$(item).attr('disabled', false); $(item).attr('disabled', false);
else else
{
$(item).attr('disabled', true); $(item).attr('disabled', true);
$(item).attr('checked', false);
}
}); });
}; };
$('#id_attribute_group').change(changeAssociationGroup); $('#id_attribute_group').change(changeAssociationGroup);
@@ -29,8 +29,8 @@ $().ready(function() {
// Click on "all shop" // Click on "all shop"
$('.input_all_shop').live('click', function() { $('.input_all_shop').live('click', function() {
var checked = $(this).attr('checked'); var checked = $(this).attr('checked');
$('.input_group_shop').attr('checked', checked); $('.input_group_shop:not(:disabled)').attr('checked', checked);
$('.input_shop').attr('checked', checked); $('.input_shop:not(:disabled)').attr('checked', checked);
}); });
// Click on a group shop // Click on a group shop
@@ -67,7 +67,7 @@ function check_group_shop_status(id_group) {
function check_all_shop() { function check_all_shop() {
var allChecked = true; var allChecked = true;
$('.input_group_shop').each(function(k, v) { $('.input_group_shop:not(:disabled)').each(function(k, v) {
if (!$(v).attr('checked')) if (!$(v).attr('checked'))
allChecked = false; allChecked = false;
}); });