Add "indetermined" state for the "select all" checkbox in the Share Inventory modal

This commit is contained in:
aignatov-bio 2020-02-12 10:37:29 +01:00
parent a472eda699
commit 4e4a2cf5ad

View file

@ -124,6 +124,8 @@
});
sharedCBs.change(function() {
var selectedTeams = form.find('.teams-list .sci-checkbox:checked').length;
form.find('#select_all_teams').prop('indeterminate', selectedTeams > 0);
$('#editable_' + this.value).toggleClass('hidden', !this.checked)
.attr('disabled', !this.checked);
});