Skip to content

Commit

Permalink
Fix bug with using title attribute in breadcrumbs directive. (#10178)
Browse files Browse the repository at this point in the history
Backports PR #10171

**Commit 1:**
Fix bug with using title attribute in breadcrumbs directive.

* Original sha: f961548
* Authored by CJ Cenizal <cj@cenizal.com> on 2017-02-03T02:03:34Z
  • Loading branch information
elastic-jasper authored and cjcenizal committed Feb 3, 2017
1 parent cac75cb commit 3ce17de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/core_plugins/kibana/public/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
data-transclude-slot="topLeftCorner"
>
<!-- Breadcrumbs. -->
<bread-crumbs title="getDashTitle()" use-links="true" omit-current-page="true"></bread-crumbs>
<bread-crumbs
page-title="getDashTitle()"
use-links="true"
omit-current-page="true"
></bread-crumbs>
</div>

<!-- Search. -->
Expand Down
6 changes: 3 additions & 3 deletions src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<a class=kuiLocalBreadcrumb__link" href="{{breadCrumbUrl.url}}">{{breadCrumbUrl.breadcrumb}}</a>
</div>
<div class="kuiLocalBreadcrumb" ng-if="!useLinks" ng-repeat="breadcrumb in breadcrumbs">
{{breadcrumb}}
{{ breadcrumb }}
</div>
<div class="kuiLocalBreadcrumb" ng-if="title">
{{title}}
<div class="kuiLocalBreadcrumb" ng-if="pageTitle">
{{ pageTitle }}
</div>
</div>
6 changes: 4 additions & 2 deletions src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ let module = uiModules.get('kibana');
module.directive('breadCrumbs', function ($location) {
return {
restrict: 'E',
replace: true,
scope: {
omitCurrentPage: '=',
/**
* Optional title to append at the end of the breadcrumbs
* Optional title to append at the end of the breadcrumbs. Note that this can't just be
* 'title', because that will be interpreted by browsers as an actual 'title' HTML attribute.
* @type {String}
*/
title: '=',
pageTitle: '=',
/**
* If true, makes each breadcrumb a clickable link.
* @type {String}
Expand Down

0 comments on commit 3ce17de

Please sign in to comment.