mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-30 20:53:41 -05:00
42 lines
900 B
JavaScript
42 lines
900 B
JavaScript
/*************************************************
|
|
* Copyright (c) 2015 Ansible, Inc.
|
|
*
|
|
* All Rights Reserved
|
|
*************************************************/
|
|
|
|
export default
|
|
[ '$scope',
|
|
'$rootScope',
|
|
function($scope, $rootScope) {
|
|
|
|
$scope.breadcrumbs = [];
|
|
|
|
this.addBreadcrumb = function(title, path, isCurrent) {
|
|
var breadcrumb =
|
|
{ title: title,
|
|
path: path,
|
|
isCurrent: isCurrent
|
|
};
|
|
|
|
if ($rootScope.enteredPath === path) {
|
|
breadcrumb.isCurrent = true;
|
|
}
|
|
|
|
$scope.breadcrumbs =
|
|
$scope.breadcrumbs.concat(breadcrumb);
|
|
|
|
return breadcrumb;
|
|
};
|
|
|
|
this.setHidden = function(hidden) {
|
|
|
|
if (angular.isUndefined(hidden)) {
|
|
$scope.isHidden = true;
|
|
} else {
|
|
$scope.isHidden = hidden;
|
|
}
|
|
|
|
};
|
|
|
|
}];
|