mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 21:51:26 -03:30
fixed breadcrumb reload problem
This commit is contained in:
parent
3cee94c1e9
commit
5a47da60e1
@ -559,7 +559,10 @@ var tower = angular.module('Tower', [
|
||||
templateUrl: urlPrefix + 'partials/organizations.html',
|
||||
controller: OrganizationsList,
|
||||
ncyBreadcrumb: {
|
||||
parent: "setup",
|
||||
parent: function($scope) {
|
||||
$scope.$parent.$emit("ReloadOrgListView");
|
||||
return "setup";
|
||||
},
|
||||
label: "ORGANIZATIONS"
|
||||
},
|
||||
resolve: {
|
||||
@ -569,11 +572,6 @@ var tower = angular.module('Tower', [
|
||||
}
|
||||
}).
|
||||
|
||||
state('organizations.cards', {
|
||||
url: '/foo',
|
||||
templateUrl: urlPrefix + 'organizations/cards.partial.html',
|
||||
}).
|
||||
|
||||
state('organizations.add', {
|
||||
url: '/add',
|
||||
templateUrl: urlPrefix + 'partials/organizations.crud.html',
|
||||
|
||||
@ -47,6 +47,19 @@ export function OrganizationsList($stateParams, $scope, $rootScope, $location,
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("ReloadOrgListView", function() {
|
||||
if ($state.$current.self.name === "organizations") {
|
||||
delete $scope.activeCard;
|
||||
if ($scope.orgCards) {
|
||||
$scope.orgCards = $scope.orgCards.map(function (card) {
|
||||
delete card.isActiveCard;
|
||||
return card;
|
||||
});
|
||||
}
|
||||
$scope.hideListHeader = false;
|
||||
}
|
||||
});
|
||||
|
||||
$scope.$on("ReloadOrganzationCards", function(e, id) {
|
||||
$scope.activeCard = id;
|
||||
getOrganization(id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user