fix #835 Collecton selection bug in multiselect menu

This commit is contained in:
Nicolas Le Goff
2012-07-19 18:15:34 +02:00
parent b3ac109d71
commit 650945c642

View File

@@ -294,7 +294,7 @@
},
'toggleChecked': function(e, flag, group){
var $inputs = (group && group.length) ? group : $labels.find('input');
$inputs.not(':disabled').attr('checked', (flag ? 'checked' : ''));
$inputs.not(':disabled').attr('checked', flag);
updateSelected();
}
})
@@ -312,7 +312,7 @@
var $checkboxes = $(this).parent().nextUntil('li.ui-multiselect-optgroup-label').find('input');
$options.trigger('toggleChecked', [ ($checkboxes.filter(':checked').length === $checkboxes.length) ? false : true, $checkboxes]);Y
$options.trigger('toggleChecked', [ ($checkboxes.filter(':checked').length === $checkboxes.length) ? false : true, $checkboxes]);
o.onOptgroupToggle.call(this, $checkboxes.get());
e.preventDefault();
});