mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-10 15:11:22 +00:00
GUAC-932: Move connection editor to own page.
This commit is contained in:
@@ -72,13 +72,6 @@ angular.module('manage').directive('locationChooser', [function locationChooser(
|
||||
|
||||
};
|
||||
|
||||
// Map all known groups
|
||||
mapConnectionGroups($scope.rootGroup);
|
||||
|
||||
// If no value is specified, default to the root identifier
|
||||
if (!$scope.value || !($scope.value in connectionGroups))
|
||||
$scope.value = $scope.rootGroup.identifier;
|
||||
|
||||
/**
|
||||
* Whether the group list menu is currently open.
|
||||
*
|
||||
@@ -92,7 +85,7 @@ angular.module('manage').directive('locationChooser', [function locationChooser(
|
||||
*
|
||||
* @type String
|
||||
*/
|
||||
$scope.chosenConnectionGroupName = connectionGroups[$scope.value].name;
|
||||
$scope.chosenConnectionGroupName = null;
|
||||
|
||||
/**
|
||||
* Toggle the current state of the menu listing connection groups.
|
||||
@@ -125,6 +118,24 @@ angular.module('manage').directive('locationChooser', [function locationChooser(
|
||||
|
||||
};
|
||||
|
||||
$scope.$watch('rootGroup', function setRootGroup(rootGroup) {
|
||||
|
||||
connectionGroups = {};
|
||||
|
||||
if (!rootGroup)
|
||||
return;
|
||||
|
||||
// Map all known groups
|
||||
mapConnectionGroups(rootGroup);
|
||||
|
||||
// If no value is specified, default to the root identifier
|
||||
if (!$scope.value || !($scope.value in connectionGroups))
|
||||
$scope.value = rootGroup.identifier;
|
||||
|
||||
$scope.chosenConnectionGroupName = connectionGroups[$scope.value].name;
|
||||
|
||||
});
|
||||
|
||||
}]
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user