mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Rename Side Nav Link title and href attributes to label and url.
This commit is contained in:
parent
cbe26ea726
commit
651a015fba
5 changed files with 13 additions and 13 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
<global-nav-link
|
||||
ng-repeat="link in switcher.links"
|
||||
ng-if="!link.hidden"
|
||||
|
@ -6,7 +5,7 @@
|
|||
is-disabled="link.disabled"
|
||||
tooltip-content="switcher.getTooltip(link)"
|
||||
on-click="switcher.ensureNavigation($event, link)"
|
||||
href="link.active ? link.url : (link.lastSubUrl || link.url)"
|
||||
url="link.active ? link.url : (link.lastSubUrl || link.url)"
|
||||
icon="link.icon"
|
||||
title="link.title"
|
||||
label="link.title"
|
||||
></global-nav-link>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
tooltip-content="globalNavToggleButton.tooltipContent"
|
||||
on-click="toggleGlobalNav($event)"
|
||||
icon="'plugins/kibana/assets/play-circle.svg'"
|
||||
title="globalNavToggleButton.title"
|
||||
label="globalNavToggleButton.title"
|
||||
></global-nav-link>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -24,10 +24,10 @@ describe('globalNavLink directive', () => {
|
|||
is-disabled="isDisabled"
|
||||
tooltip-content="tooltipContent"
|
||||
on-click="onClick()"
|
||||
href="href"
|
||||
url="href"
|
||||
kbn-route="kbnRoute"
|
||||
icon="icon"
|
||||
title="title"
|
||||
label="title"
|
||||
/>
|
||||
`;
|
||||
|
||||
|
|
|
@ -11,13 +11,14 @@
|
|||
href="{{ getHref() }}"
|
||||
ng-click="onClick({ $event: $event })"
|
||||
data-test-subj="appLink"
|
||||
title="{{ title }}"
|
||||
>
|
||||
<div class="global-nav-link__icon">
|
||||
<!-- Empty alt attribute is for accessibility -->
|
||||
<img
|
||||
ng-if="icon"
|
||||
class="global-nav-link__icon-image"
|
||||
kbn-src="{{ '/' + icon }}"
|
||||
alt=""
|
||||
>
|
||||
|
||||
<span
|
||||
|
@ -25,12 +26,12 @@
|
|||
class="global-nav-link__icon-placeholder"
|
||||
data-test-subj="appLinkIconPlaceholder"
|
||||
>
|
||||
{{ title[0] }}
|
||||
{{ label[0] }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="global-nav-link__title">
|
||||
{{ title }}
|
||||
{{ label }}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -14,16 +14,16 @@ module.directive('globalNavLink', chrome => {
|
|||
isDisabled: '=',
|
||||
tooltipContent: '=',
|
||||
onClick: '&',
|
||||
href: '=',
|
||||
url: '=',
|
||||
kbnRoute: '=',
|
||||
icon: '=',
|
||||
title: '=',
|
||||
label: '=',
|
||||
},
|
||||
template: globalNavLinkTemplate,
|
||||
link: scope => {
|
||||
scope.getHref = () => {
|
||||
if (scope.href) {
|
||||
return scope.href;
|
||||
if (scope.url) {
|
||||
return scope.url;
|
||||
}
|
||||
|
||||
if (scope.kbnRoute) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue