Fixed admin submenus not working correctly when more than one registered

The relevant code in `submenu.js` is now able to first close already active submenus when another one is being clicked. This solves issue #851.

This PR replaces #852, because I reorganized my repository.