* added more js functions to handle permission panel