mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 11:27:36 -02:30
fixed breadcrumb reload problem
This commit is contained in:
@@ -559,7 +559,10 @@ var tower = angular.module('Tower', [
|
|||||||
templateUrl: urlPrefix + 'partials/organizations.html',
|
templateUrl: urlPrefix + 'partials/organizations.html',
|
||||||
controller: OrganizationsList,
|
controller: OrganizationsList,
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: "setup",
|
parent: function($scope) {
|
||||||
|
$scope.$parent.$emit("ReloadOrgListView");
|
||||||
|
return "setup";
|
||||||
|
},
|
||||||
label: "ORGANIZATIONS"
|
label: "ORGANIZATIONS"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -569,11 +572,6 @@ var tower = angular.module('Tower', [
|
|||||||
}
|
}
|
||||||
}).
|
}).
|
||||||
|
|
||||||
state('organizations.cards', {
|
|
||||||
url: '/foo',
|
|
||||||
templateUrl: urlPrefix + 'organizations/cards.partial.html',
|
|
||||||
}).
|
|
||||||
|
|
||||||
state('organizations.add', {
|
state('organizations.add', {
|
||||||
url: '/add',
|
url: '/add',
|
||||||
templateUrl: urlPrefix + 'partials/organizations.crud.html',
|
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.$on("ReloadOrganzationCards", function(e, id) {
|
||||||
$scope.activeCard = id;
|
$scope.activeCard = id;
|
||||||
getOrganization(id);
|
getOrganization(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user