fixes #4204 - assign multiple config groups to a host or hostgroup
refactored JS