diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index 6387d18162..20fc7069bd 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -338,7 +338,7 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList, CredentialList, ProjectList, LookUpInit, GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate, Wait, Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit, JobsControllerInit, JobsListUpdate, - GetChoices) { + GetChoices, SchedulesListInit, SchedulesList) { ClearScope(); @@ -444,6 +444,17 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP } }; + if ($scope.removerelatedschedules) { + $scope.removerelatedschedules(); + } + $scope.removerelatedschedules = $scope.$on('relatedschedules', function() { + SchedulesListInit({ + scope: $scope, + list: SchedulesList, + choices: null, + related: true + }); + }); // Register a watcher on project_name. Refresh the playbook list on change. if ($scope.watchProjectUnregister) { @@ -790,5 +801,6 @@ JobTemplatesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$l 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit', 'GetBasePath', 'md5Setup', 'ParseTypeChange', 'JobStatusToolTip', 'FormatDate', 'Wait', 'Stream', 'Empty', 'Prompt', - 'ParseVariableString', 'ToJSON', 'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate', 'GetChoices' + 'ParseVariableString', 'ToJSON', 'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate', 'GetChoices', + 'SchedulesListInit', 'SchedulesList' ]; \ No newline at end of file diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index 275eed2545..404e3fed3b 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -485,7 +485,7 @@ ProjectsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, Authorization, CredentialList, LookUpInit, GetChoices, - Empty, DebugForm, Wait, Stream, SchedulesControllerInit) { + Empty, DebugForm, Wait, Stream, SchedulesControllerInit, SchedulesListInit, SchedulesList) { ClearScope('htmlTemplate'); @@ -504,6 +504,18 @@ function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $routeParam $scope.project_local_paths = []; $scope.base_dir = ''; + if ($scope.removerelatedschedules) { + $scope.removerelatedschedules(); + } + $scope.removerelatedschedules = $scope.$on('relatedschedules', function() { + SchedulesListInit({ + scope: $scope, + list: SchedulesList, + choices: null, + related: true + }); + }); + // After the project is loaded, retrieve each related set if ($scope.projectLoadedRemove) { $scope.projectLoadedRemove(); @@ -729,5 +741,5 @@ function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $routeParam ProjectsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'ProjectsForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'GetProjectPath', 'Authorization', 'CredentialList', 'LookUpInit', 'GetChoices', 'Empty', - 'DebugForm', 'Wait', 'Stream', 'SchedulesControllerInit' + 'DebugForm', 'Wait', 'Stream', 'SchedulesControllerInit', 'SchedulesListInit', 'SchedulesList' ]; \ No newline at end of file diff --git a/awx/ui/static/js/controllers/Schedules.js b/awx/ui/static/js/controllers/Schedules.js index e018ae4d5a..cce9473e15 100644 --- a/awx/ui/static/js/controllers/Schedules.js +++ b/awx/ui/static/js/controllers/Schedules.js @@ -32,7 +32,7 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get if ($scope.removeParentLoaded) { $scope.removeParentLoaded(); } - $scope.removeScheduledLoaded = $scope.$on('ParentLoaded', function() { + $scope.removeParentLoaded = $scope.$on('ParentLoaded', function() { // Add breadcrumbs LoadBreadCrumbs({ path: $location.path().replace(/\/schedules$/,''), diff --git a/awx/ui/static/js/forms/JobTemplates.js b/awx/ui/static/js/forms/JobTemplates.js index 93bf5d2a58..b4b13070d2 100644 --- a/awx/ui/static/js/forms/JobTemplates.js +++ b/awx/ui/static/js/forms/JobTemplates.js @@ -23,7 +23,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet collapse: true, collapseTitle: "Properties", collapseMode: 'edit', - collapseOpenFirst: false, //Always open first panel + collapseOpen: true, //Always open first panel actions: { stream: {