Added more unified dropdown handling for share and versions

Now using showMenu/hideMenu for the share and versions dropdown.
This makes them exclude each other and the clicking outside is handled
in a single location.