GUAC-1126: Add client-specific disconnect action to menu. Style with danger.

This commit is contained in:
Michael Jumper
2015-04-07 22:49:41 -07:00
parent 69374f0818
commit e460fde6ed
9 changed files with 50 additions and 34 deletions

View File

@@ -544,6 +544,19 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
};
/**
* Action which immediately disconnects the currently-connected client, if
* any.
*/
var DISCONNECT_MENU_ACTION = {
name : 'CLIENT.ACTION_DISCONNECT',
className : 'danger disconnect',
callback : $scope.disconnect
};
// Set client-specific menu actions
$scope.clientMenuActions = [ DISCONNECT_MENU_ACTION ];
// Clean up when view destroyed
$scope.$on('$destroy', function clientViewDestroyed() {