[prototype->jQuery] Remove usage of prototype in toggle_link

This is a refactoring to gradually remove the usage of prototype from our codebase.

see:https://www.openproject.org/work_packages/7066