mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 02:30:01 -03:30
Merge pull request #3681 from jlmitch5/fixManProjectSelect
fixed manual project select2 population
This commit is contained in:
@@ -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
|
// After the project is loaded, retrieve each related set
|
||||||
if ($scope.projectLoadedRemove) {
|
if ($scope.projectLoadedRemove) {
|
||||||
$scope.projectLoadedRemove();
|
$scope.projectLoadedRemove();
|
||||||
@@ -623,6 +633,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
$scope.project_local_paths = opts;
|
$scope.project_local_paths = opts;
|
||||||
$scope.local_path = $scope.project_local_paths[0];
|
$scope.local_path = $scope.project_local_paths[0];
|
||||||
$scope.base_dir = 'You do not have access to view this property';
|
$scope.base_dir = 'You do not have access to view this property';
|
||||||
|
$scope.$emit('pathsReady');
|
||||||
}
|
}
|
||||||
|
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
@@ -718,11 +729,6 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
multiple: false
|
multiple: false
|
||||||
});
|
});
|
||||||
|
|
||||||
CreateSelect2({
|
|
||||||
element: '#local-path-select',
|
|
||||||
multiple: false
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
||||||
|
|
||||||
// Initialize related search functions. Doing it here to make sure relatedSets object is populated.
|
// Initialize related search functions. Doing it here to make sure relatedSets object is populated.
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export default
|
|||||||
// trigger display of alert block when scm_type == manual
|
// trigger display of alert block when scm_type == manual
|
||||||
scope.showMissingPlaybooksAlert = true;
|
scope.showMissingPlaybooksAlert = true;
|
||||||
}
|
}
|
||||||
|
scope.$emit('pathsReady');
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
||||||
|
|||||||
Reference in New Issue
Block a user