Turn buttons into toggles

Make Legend, Detail and Editor Buttons act like toggles to hide/show
the panel.
Fixed bug with initial display
Merge remote-tracking branch 'origin/master' into nps-identity