Created the selectall directive for handling indeterminate checkboxes and the select all toggling.