Input with action fixes
This commit is contained in:
parent
d7960c2964
commit
6120a9687e
@ -1,30 +1,29 @@
|
||||
<form (submit)="executeCurrentAction()">
|
||||
<iqser-input-with-action
|
||||
(click)="openMenuIfValue()"
|
||||
(valueChange)="valueChanges$.next($event)"
|
||||
[placeholder]="placeholder"
|
||||
></iqser-input-with-action>
|
||||
<iqser-input-with-action
|
||||
(action)="executeCurrentAction()"
|
||||
(click)="openMenuIfValue()"
|
||||
(valueChange)="valueChanges$.next($event)"
|
||||
[placeholder]="placeholder"
|
||||
></iqser-input-with-action>
|
||||
|
||||
<mat-menu #menu="matMenu" class="search-menu" xPosition="after">
|
||||
<ng-template matMenuContent>
|
||||
<div class="wrapper">
|
||||
<button
|
||||
(click)="item.action(valueChanges$.getValue())"
|
||||
*ngFor="let item of shownActions; let index = index"
|
||||
[class.highlight]="(currentActionIdx$ | async) === index"
|
||||
class="spotlight-row pointer"
|
||||
>
|
||||
<mat-icon [svgIcon]="item.icon"></mat-icon>
|
||||
<span>{{ item.text }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-menu>
|
||||
<mat-menu #menu="matMenu" class="search-menu" xPosition="after">
|
||||
<ng-template matMenuContent>
|
||||
<div class="wrapper">
|
||||
<button
|
||||
(click)="item.action(valueChanges$.getValue())"
|
||||
*ngFor="let item of shownActions; let index = index"
|
||||
[class.highlight]="(currentActionIdx$ | async) === index"
|
||||
class="spotlight-row pointer"
|
||||
>
|
||||
<mat-icon [svgIcon]="item.icon"></mat-icon>
|
||||
<span>{{ item.text }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-menu>
|
||||
|
||||
<!-- https://material.angular.io/components/menu/overview#toggling-the-menu-programmatically -->
|
||||
<!-- To toggle menu programmatically a matMenuTriggerFor directive is needed -->
|
||||
<div [matMenuTriggerFor]="menu"></div>
|
||||
<!-- https://material.angular.io/components/menu/overview#toggling-the-menu-programmatically -->
|
||||
<!-- To toggle menu programmatically a matMenuTriggerFor directive is needed -->
|
||||
<div [matMenuTriggerFor]="menu"></div>
|
||||
|
||||
<!-- A hack to avoid subscribing in component -->
|
||||
<ng-container *ngIf="showActions$ | async"></ng-container>
|
||||
</form>
|
||||
<!-- A hack to avoid subscribing in component -->
|
||||
<ng-container *ngIf="showActions$ | async"></ng-container>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
<div class="comment-actions">
|
||||
<iqser-circle-button
|
||||
(action)="deleteComment(comment)"
|
||||
(action)="deleteComment($event, comment)"
|
||||
*ngIf="permissionsService.canDeleteComment(comment, file)"
|
||||
[iconSize]="10"
|
||||
[size]="20"
|
||||
|
||||
@ -77,7 +77,8 @@ export class CommentsComponent extends AutoUnsubscribe implements OnChanges {
|
||||
this._commentingService.toggle(this.annotation.id);
|
||||
}
|
||||
|
||||
async deleteComment(comment: IComment): Promise<void> {
|
||||
async deleteComment($event: MouseEvent, comment: IComment): Promise<void> {
|
||||
$event.stopPropagation();
|
||||
this._loadingService.start();
|
||||
await this._manualAnnotationService.deleteComment(comment.id, this.annotation.id, this._dossierId, this._fileId).toPromise();
|
||||
this.annotation.comments.splice(this.annotation.comments.indexOf(comment), 1);
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 795a273c9cde2a47c8a53e81a1b1efeb3ad81ddb
|
||||
Subproject commit ff9dad3ce73c2485a64e3418f24334f4c44f7c6a
|
||||
Loading…
x
Reference in New Issue
Block a user