fixed playbooks from not displaying on type-completed project

This commit is contained in:
John Mitchell 2015-08-26 20:00:51 -04:00
parent efa306d1f3
commit f44cc5f729

View File

@ -478,13 +478,24 @@ export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location
}
};
// $scope.selectPlaybookUnregister = $scope.$watch('project_name', function (newval, oldval) {
// selectPlaybook(oldval, newval);
// checkSCMStatus(oldval, newval);
// });
// Register a watcher on project_name
if ($scope.selectPlaybookUnregister) {
$scope.selectPlaybookUnregister();
}
$scope.selectPlaybookUnregister = $scope.$watch('project_name', function (newval, oldval) {
selectPlaybook(oldval, newval);
checkSCMStatus(oldval, newval);
$scope.selectPlaybookUnregister = $scope.$watch('project', function (newValue, oldValue) {
if (newValue !== oldValue) {
if (!Empty(oldValue)) {
$scope.playbook = null;
}
selectPlaybook(oldValue, newValue);
checkSCMStatus();
}
});
LookUpInit({