Fixed bug where breadcrumb was not being shown when refreshing edit group/edit host pages

This commit is contained in:
Michael Abashian 2016-06-29 15:11:26 -04:00
parent 9bd05abcf3
commit 8fd209c1e7
3 changed files with 10 additions and 1 deletions

View File

@ -17,7 +17,6 @@
<a href ng-click="goToGroup($index+1)">{{group.name}}</a>
</li>
<li class="BreadCrumb-item" ng-if="currentState !== 'inventoryManage'"></li>
</span>
<div class="InventoryManageBreadCrumb-ncy" ng-if="!licenseMissing" ncy-breadcrumb></div>
</ol>
<div class="BreadCrumb-menuLink"

View File

@ -12,6 +12,11 @@
view = generateList,
pageSize = 20;
$scope.inventory_id = $stateParams.inventory_id;
// The ncy breadcrumb directive will look at this attribute when attempting to bind to the correct scope.
// In this case, we don't want to incidentally bind to this scope when editing a host or a group. See:
// https://github.com/ncuillery/angular-breadcrumb/issues/42 for a little more information on the
// problem that this solves.
$scope.ncyBreadcrumbIgnore = true;
if($state.current.name === "inventoryManage.editGroup") {
$scope.rowBeingEdited = $state.params.group_id;
$scope.listBeingEdited = "groups";

View File

@ -11,6 +11,11 @@
var list = InventoryHosts,
view = generateList,
pageSize = 20;
// The ncy breadcrumb directive will look at this attribute when attempting to bind to the correct scope.
// In this case, we don't want to incidentally bind to this scope when editing a host or a group. See:
// https://github.com/ncuillery/angular-breadcrumb/issues/42 for a little more information on the
// problem that this solves.
$scope.ncyBreadcrumbIgnore = true;
if($state.current.name === "inventoryManage.editHost") {
$scope.rowBeingEdited = $state.params.host_id;
$scope.listBeingEdited = "hosts";