diff options
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r-- | client/src/app/shared/misc/help.component.html | 4 | ||||
-rw-r--r-- | client/src/app/shared/misc/help.component.ts | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/client/src/app/shared/misc/help.component.html b/client/src/app/shared/misc/help.component.html index f2b6eca33..1c3863e52 100644 --- a/client/src/app/shared/misc/help.component.html +++ b/client/src/app/shared/misc/help.component.html | |||
@@ -13,10 +13,14 @@ | |||
13 | </ng-template> | 13 | </ng-template> |
14 | 14 | ||
15 | <span | 15 | <span |
16 | role="button" | ||
16 | class="help-tooltip-button" | 17 | class="help-tooltip-button" |
17 | title="Get help" | 18 | title="Get help" |
18 | i18n-title | 19 | i18n-title |
20 | [attr.aria-pressed]="isPopoverOpened" | ||
19 | [popover]="tooltipTemplate" | 21 | [popover]="tooltipTemplate" |
20 | [placement]="tooltipPlacement" | 22 | [placement]="tooltipPlacement" |
21 | [outsideClick]="true" | 23 | [outsideClick]="true" |
24 | (onHidden)="onPopoverHidden()" | ||
25 | (onShown)="onPopoverShown()" | ||
22 | ></span> | 26 | ></span> |
diff --git a/client/src/app/shared/misc/help.component.ts b/client/src/app/shared/misc/help.component.ts index e7af61b4a..ba0452e77 100644 --- a/client/src/app/shared/misc/help.component.ts +++ b/client/src/app/shared/misc/help.component.ts | |||
@@ -15,6 +15,7 @@ export class HelpComponent implements OnInit, OnChanges { | |||
15 | @Input() helpType: 'custom' | 'markdownText' | 'markdownEnhanced' = 'custom' | 15 | @Input() helpType: 'custom' | 'markdownText' | 'markdownEnhanced' = 'custom' |
16 | @Input() tooltipPlacement = 'right' | 16 | @Input() tooltipPlacement = 'right' |
17 | 17 | ||
18 | isPopoverOpened = false | ||
18 | mainHtml = '' | 19 | mainHtml = '' |
19 | 20 | ||
20 | constructor (private i18n: I18n) { } | 21 | constructor (private i18n: I18n) { } |
@@ -27,6 +28,14 @@ export class HelpComponent implements OnInit, OnChanges { | |||
27 | this.init() | 28 | this.init() |
28 | } | 29 | } |
29 | 30 | ||
31 | onPopoverHidden () { | ||
32 | this.isPopoverOpened = false | ||
33 | } | ||
34 | |||
35 | onPopoverShown () { | ||
36 | this.isPopoverOpened = true | ||
37 | } | ||
38 | |||
30 | private init () { | 39 | private init () { |
31 | if (this.helpType === 'custom') { | 40 | if (this.helpType === 'custom') { |
32 | this.mainHtml = this.customHtml | 41 | this.mainHtml = this.customHtml |