GUAC-1120: Toggle visibility of user menu upon click.

This commit is contained in:
Michael Jumper
2015-03-11 23:25:32 -07:00
parent ddbfacdf2f
commit 1c75e9792d
2 changed files with 15 additions and 1 deletions

View File

@@ -105,6 +105,13 @@ angular.module('userMenu').directive('guacUserMenu', [function guacUserMenu() {
*/ */
$scope.newPasswordMatch = null; $scope.newPasswordMatch = null;
/**
* Whether the contents of the user menu are currently shown.
*
* @type Boolean
*/
$scope.menuShown = false;
/** /**
* The username of the current user. * The username of the current user.
* *
@@ -159,6 +166,13 @@ angular.module('userMenu').directive('guacUserMenu', [function guacUserMenu() {
}); });
/**
* Toggles visibility of the user menu.
*/
$scope.toggleMenu = function toggleMenu() {
$scope.menuShown = !$scope.menuShown;
};
/** /**
* Show the password update dialog. * Show the password update dialog.
*/ */

View File

@@ -21,7 +21,7 @@
THE SOFTWARE. THE SOFTWARE.
--> -->
<div class="user-menu-dropdown" ng-class="{open: menuShown}"> <div class="user-menu-dropdown" ng-class="{open: menuShown}" ng-click="toggleMenu()">
<div class="username">{{username}}</div> <div class="username">{{username}}</div>
<!-- Menu options --> <!-- Menu options -->