GUAC-932: Move connection editor to own page.

This commit is contained in:
Michael Jumper
2014-12-21 23:11:14 -08:00
parent 60f249aa6f
commit 07a2a2da54
14 changed files with 246 additions and 200 deletions

View File

@@ -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;
});
}]
};