mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-24 08:51:48 -05:00
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
/*************************************************
|
|
* Copyright (c) 2015 Ansible, Inc.
|
|
*
|
|
* All Rights Reserved
|
|
*************************************************/
|
|
|
|
/* jshint unused: vars */
|
|
|
|
import controller from './breadcrumbs.controller';
|
|
import 'tower/shared/generator-helpers';
|
|
|
|
export default
|
|
[ 'templateUrl',
|
|
function(templateUrl) {
|
|
|
|
return {
|
|
restrict: 'E',
|
|
controller: controller,
|
|
transclude: true,
|
|
templateUrl: templateUrl('shared/breadcrumbs/breadcrumbs'),
|
|
scope: {
|
|
},
|
|
link: function(scope, element, attrs, controller) {
|
|
// make breadcrumbs hidden until the current
|
|
// breadcrumb has a title; this avoids
|
|
// ugly rendering when an object's title
|
|
// is fetched via ajax
|
|
//
|
|
controller.setHidden();
|
|
|
|
scope.$watch('isHidden', function(value) {
|
|
if (value) {
|
|
element.hide();
|
|
} else {
|
|
element.show();
|
|
}
|
|
});
|
|
}
|
|
};
|
|
}
|
|
];
|