mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
97732 Fixed bug where ContextHelpWrapperComponent subscriptions would not properly be initialized if the application launches with help icons hidden by default
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
<a href="javascript:void(0);"
|
||||
role="button"
|
||||
(click)="onClick()"
|
||||
[attr.aria-label]="'nav.context-help-toggle' | translate"
|
||||
[title]="'nav.context-help-toggle' | translate"
|
||||
>
|
||||
<i class="fas fa-question-circle ds-context-help-toggle"></i>
|
||||
<i class="fas fa-lg fa-fw fa-question-circle ds-context-help-toggle"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
.ds-context-help-toggle {
|
||||
color: var(--ds-header-icon-color);
|
||||
background-color: var(--ds-header-bg);
|
||||
}
|
||||
|
||||
.ds-context-help-toggle:hover {
|
||||
color: var(--ds-header-icon-color-hover);
|
||||
&:hover, &focus {
|
||||
color: var(--ds-header-icon-color-hover);
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ContextHelpService } from '../../shared/context-help.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-context-help-toggle',
|
||||
@@ -9,14 +10,14 @@ import { ContextHelpService } from '../../shared/context-help.service';
|
||||
export class ContextHelpToggleComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
private contextHelpService: ContextHelpService
|
||||
private contextHelpService: ContextHelpService,
|
||||
private translateService: TranslateService
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
onClick() {
|
||||
console.log('toggling icons');
|
||||
this.contextHelpService.toggleIcons();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user