mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1904: Add new events to allow children to open/close the client menu.
This commit is contained in:
@@ -468,8 +468,21 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
else if (menuShownPreviousState)
|
else if (menuShownPreviousState)
|
||||||
$scope.applyParameterChanges($scope.focusedClient);
|
$scope.applyParameterChanges($scope.focusedClient);
|
||||||
|
|
||||||
|
/* Broadcast changes to the menu display state */
|
||||||
|
$scope.$broadcast('guacMenuShown', menuShown);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Toggle the menu when the guacClientToggleMenu event is received
|
||||||
|
$scope.$on('guacToggleMenu',
|
||||||
|
() => $scope.menu.shown = !$scope.menu.shown);
|
||||||
|
|
||||||
|
// Show the menu when the guacClientShowMenu event is received
|
||||||
|
$scope.$on('guacShowMenu', () => $scope.menu.shown = true);
|
||||||
|
|
||||||
|
// Hide the menu when the guacClientHideMenu event is received
|
||||||
|
$scope.$on('guacHideMenu', () => $scope.menu.shown = false);
|
||||||
|
|
||||||
// Automatically track and cache the currently-focused client
|
// Automatically track and cache the currently-focused client
|
||||||
$scope.$on('guacClientFocused', function focusedClientChanged(event, newFocusedClient) {
|
$scope.$on('guacClientFocused', function focusedClientChanged(event, newFocusedClient) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user