Fix Delete title button

pull/1169/merge
Chocobozzz 2018-10-03 10:02:55 +02:00
parent 38d937002a
commit 60709df536
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<span class="action-button action-button-delete" [title]="label" role="button">
<span class="action-button action-button-delete" [title]="getTitle()" role="button">
<span class="icon icon-delete-grey"></span>
<span class="button-label" *ngIf="label">{{ label }}</span>

View File

@ -1,4 +1,5 @@
import { Component, Input } from '@angular/core'
import { I18n } from '@ngx-translate/i18n-polyfill'
@Component({
selector: 'my-delete-button',
@ -8,4 +9,10 @@ import { Component, Input } from '@angular/core'
export class DeleteButtonComponent {
@Input() label: string
constructor (private i18n: I18n) { }
getTitle () {
return this.label || this.i18n('Delete')
}
}

View File

@ -1,4 +1,4 @@
<a class="action-button action-button-edit" [routerLink]="routerLink" title="Edit">
<a class="action-button action-button-edit" [routerLink]="routerLink" i18n-title title="Edit">
<span class="icon icon-edit"></span>
<span class="button-label" *ngIf="label">{{ label }}</span>