mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
WIP: Allow the extension to do its own rendering of fields outside the menu if needed.
This commit is contained in:
@@ -498,17 +498,34 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
$scope.menu.connectionParameters = newFocusedClient ?
|
$scope.menu.connectionParameters = newFocusedClient ?
|
||||||
ManagedClient.getArgumentModel(newFocusedClient) : {};
|
ManagedClient.getArgumentModel(newFocusedClient) : {};
|
||||||
|
|
||||||
|
// Re-broadcast the updated client
|
||||||
|
$scope.$broadcast('guacClientChanged', newFocusedClient);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Track when the protocol changes for the current client - generally
|
||||||
|
// this will be when the protocol is first set for the client
|
||||||
|
$scope.$on('guacClientProtocolUpdated', function protocolChanged(event, focusedClient) {
|
||||||
|
|
||||||
|
// Ignore any updated protocol not for the current focused client
|
||||||
|
if ($scope.focusedClient && $scope.focusedClient === focusedClient)
|
||||||
|
|
||||||
|
// Re-broadcast the updated protocol
|
||||||
|
$scope.$broadcast('guacClientProtocolChanged', focusedClient);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Automatically update connection parameters that have been modified
|
// Automatically update connection parameters that have been modified
|
||||||
// for the current focused client
|
// for the current focused client
|
||||||
$scope.$on('guacClientArgumentsUpdated', function focusedClientChanged(event, focusedClient) {
|
$scope.$on('guacClientArgumentsUpdated', function argumentsChanged(event, focusedClient) {
|
||||||
|
|
||||||
// Update available connection parameters, if the updated arguments are
|
// Ignore any updated arguments not for the current focused client
|
||||||
// for the current focused client - otherwise ignore them
|
if ($scope.focusedClient && $scope.focusedClient === focusedClient) {
|
||||||
if ($scope.focusedClient && $scope.focusedClient === focusedClient)
|
|
||||||
$scope.menu.connectionParameters = ManagedClient.getArgumentModel(focusedClient);
|
$scope.menu.connectionParameters = ManagedClient.getArgumentModel(focusedClient);
|
||||||
|
|
||||||
|
// Re-broadcast the updated arguments
|
||||||
|
$scope.$broadcast('guacClientArgumentsChanged', focusedClient);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update page icon when thumbnail changes
|
// Update page icon when thumbnail changes
|
||||||
|
@@ -97,6 +97,11 @@ angular.module('client').directive('guacTiledClients', [function guacTiledClient
|
|||||||
$scope.$emit('guacClientArgumentsUpdated', $scope.getFocusedClient());
|
$scope.$emit('guacClientArgumentsUpdated', $scope.getFocusedClient());
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
// Notify whenever protocol of currently-focused client changes
|
||||||
|
$scope.$watch('getFocusedClient().protocol', function focusedClientParametersChanged() {
|
||||||
|
$scope.$emit('guacClientProtocolUpdated', $scope.getFocusedClient());
|
||||||
|
}, true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a callback for guacClick that assigns or updates keyboard
|
* Returns a callback for guacClick that assigns or updates keyboard
|
||||||
* focus to the given client, allowing that client to receive and
|
* focus to the given client, allowing that client to receive and
|
||||||
|
@@ -27,11 +27,11 @@
|
|||||||
background: #EEE;
|
background: #EEE;
|
||||||
box-shadow: inset -1px 0 2px white, 1px 0 2px black;
|
box-shadow: inset -1px 0 2px white, 1px 0 2px black;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
-webkit-transition: left 0.125s;
|
-webkit-transition: left 0.125s, opacity 0.125s;
|
||||||
-moz-transition: left 0.125s;
|
-moz-transition: left 0.125s, opacity 0.125s;
|
||||||
-ms-transition: left 0.125s;
|
-ms-transition: left 0.125s, opacity 0.125s;
|
||||||
-o-transition: left 0.125s;
|
-o-transition: left 0.125s, opacity 0.125s;
|
||||||
transition: left 0.125s;
|
transition: left 0.125s, opacity 0.125s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-content {
|
.menu-content {
|
||||||
@@ -137,10 +137,10 @@
|
|||||||
.menu,
|
.menu,
|
||||||
.menu.closed {
|
.menu.closed {
|
||||||
left: -480px;
|
left: -480px;
|
||||||
visibility: hidden;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu.open {
|
.menu.open {
|
||||||
left: 0px;
|
left: 0px;
|
||||||
visibility: visible;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<!-- Menu -->
|
<!-- Menu -->
|
||||||
<div class="menu" ng-class="{open: menu.shown}" id="guac-menu">
|
<div class="menu" ng-class="{open: menu.shown}" id="guac-menu">
|
||||||
<div class="menu-content" guac-touch-drag="menuDrag">
|
<div class="menu-content" ng-if="menu.shown" guac-touch-drag="menuDrag">
|
||||||
|
|
||||||
<!-- Stationary header -->
|
<!-- Stationary header -->
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
Reference in New Issue
Block a user