From d24800bf5fdba8ec1bcb7a8314bb2ab9def537e2 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Wed, 23 Jul 2014 14:20:01 -0400 Subject: [PATCH] Missing breadcrumbs Added breadcrumbs back in for nested lists (i.e. adding users to an organization or a project to a team). --- awx/ui/static/js/controllers/Admins.js | 2 +- awx/ui/static/js/controllers/Credentials.js | 2 +- awx/ui/static/js/controllers/Permissions.js | 2 +- awx/ui/static/js/controllers/Projects.js | 2 +- awx/ui/static/js/controllers/Schedules.js | 8 ++++---- awx/ui/static/js/controllers/Users.js | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/awx/ui/static/js/controllers/Admins.js b/awx/ui/static/js/controllers/Admins.js index df573a20b5..b550de1a56 100644 --- a/awx/ui/static/js/controllers/Admins.js +++ b/awx/ui/static/js/controllers/Admins.js @@ -19,7 +19,7 @@ function AdminsList($scope, $rootScope, $location, $log, $routeParams, Rest, Ale mode = 'select', url = GetBasePath('organizations') + $routeParams.organization_id + '/admins/'; - generator.inject(AdminList, { mode: mode, scope: $scope }); + generator.inject(AdminList, { mode: mode, scope: $scope, breadCrumbs: true }); SelectionInit({ scope: $scope, list: list, url: url, returnToCaller: 1 }); diff --git a/awx/ui/static/js/controllers/Credentials.js b/awx/ui/static/js/controllers/Credentials.js index 8e880f14eb..12fe028c17 100644 --- a/awx/ui/static/js/controllers/Credentials.js +++ b/awx/ui/static/js/controllers/Credentials.js @@ -24,7 +24,7 @@ function CredentialsList($scope, $rootScope, $location, $log, $routeParams, Rest mode = (base === 'credentials') ? 'edit' : 'select', url; - view.inject(list, { mode: mode, scope: $scope }); + view.inject(list, { mode: mode, scope: $scope, breadCrumbs:(($routeParams.user_id || $routeParams.team_id) ? true : false) }); $scope.selected = []; $scope.credentialLoading = true; diff --git a/awx/ui/static/js/controllers/Permissions.js b/awx/ui/static/js/controllers/Permissions.js index 7521216870..cf674ec0cb 100644 --- a/awx/ui/static/js/controllers/Permissions.js +++ b/awx/ui/static/js/controllers/Permissions.js @@ -21,7 +21,7 @@ function PermissionsList($scope, $rootScope, $location, $log, $routeParams, Rest defaultUrl = GetBasePath(base), generator = GenerateList; - generator.inject(list, { mode: 'edit', scope: $scope }); + generator.inject(list, { mode: 'edit', scope: $scope, breadCrumbs: true }); defaultUrl += ($routeParams.user_id !== undefined) ? $routeParams.user_id : $routeParams.team_id; defaultUrl += '/permissions/'; diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index b1619b515a..5f7e1ba0c3 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -26,7 +26,7 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, url = (base === 'teams') ? GetBasePath('teams') + $routeParams.team_id + '/projects/' : defaultUrl, choiceCount = 0; - view.inject(list, { mode: mode, scope: $scope }); + view.inject(list, { mode: mode, scope: $scope, breadCrumbs:(($routeParams.team_id) ? true : false)}); $rootScope.flashMessage = null; $scope.projectLoading = true; diff --git a/awx/ui/static/js/controllers/Schedules.js b/awx/ui/static/js/controllers/Schedules.js index 2549d67ef9..8d3ad71c6c 100644 --- a/awx/ui/static/js/controllers/Schedules.js +++ b/awx/ui/static/js/controllers/Schedules.js @@ -12,7 +12,7 @@ function ScheduleEditController($scope, $compile, $location, $routeParams, SchedulesList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, GetChoices, Stream) { - + ClearScope(); var base, e, id, url, parentObject; @@ -28,7 +28,7 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get list[idx].play_tip = (element.enabled) ? 'Schedule is Active. Click to temporarily stop.' : 'Schedule is temporarily stopped. Click to activate.'; }); }); - + if ($scope.removeParentLoaded) { $scope.removeParentLoaded(); } @@ -54,7 +54,7 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get }); }); - + if ($scope.removeChoicesReady) { $scope.removeChocesReady(); } @@ -83,7 +83,7 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get }; Wait('start'); - + GetChoices({ scope: $scope, url: GetBasePath('unified_jobs'), //'/static/sample/data/types/data.json' diff --git a/awx/ui/static/js/controllers/Users.js b/awx/ui/static/js/controllers/Users.js index eff9977f10..444f507b48 100644 --- a/awx/ui/static/js/controllers/Users.js +++ b/awx/ui/static/js/controllers/Users.js @@ -22,7 +22,7 @@ function UsersList($scope, $rootScope, $location, $log, $routeParams, Rest, Aler url = (base === 'organizations') ? GetBasePath('organizations') + $routeParams.organization_id + '/users/' : GetBasePath('teams') + $routeParams.team_id + '/users/'; - generator.inject(UserList, { mode: mode, scope: $scope }); + generator.inject(UserList, { mode: mode, scope: $scope, breadCrumbs:(($routeParams.organization_id || $routeParams.team_id) ? true : false) }); $scope.selected = [];