Merge pull request #3681 from jlmitch5/fixManProjectSelect

fixed manual project select2 population
This commit is contained in:
jlmitch5 2016-10-13 12:40:47 -04:00 committed by GitHub
commit 237e91bcb2
2 changed files with 12 additions and 5 deletions

View File

@ -596,6 +596,16 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
});
});
if ($scope.pathsReadyRemove) {
$scope.pathsReadyRemove();
}
$scope.pathsReadyRemove = $scope.$on('pathsReady', function () {
CreateSelect2({
element: '#local-path-select',
multiple: false
});
});
// After the project is loaded, retrieve each related set
if ($scope.projectLoadedRemove) {
$scope.projectLoadedRemove();
@ -623,6 +633,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
$scope.project_local_paths = opts;
$scope.local_path = $scope.project_local_paths[0];
$scope.base_dir = 'You do not have access to view this property';
$scope.$emit('pathsReady');
}
LookUpInit({
@ -718,11 +729,6 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
multiple: false
});
CreateSelect2({
element: '#local-path-select',
multiple: false
});
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
// Initialize related search functions. Doing it here to make sure relatedSets object is populated.

View File

@ -78,6 +78,7 @@ export default
// trigger display of alert block when scm_type == manual
scope.showMissingPlaybooksAlert = true;
}
scope.$emit('pathsReady');
})
.error(function (data, status) {
ProcessErrors(scope, data, status, null, { hdr: 'Error!',