dialog toggle js for activity