Merge pull request #4434 from MaximilianKrambach/stopProopagation
fix click events in user + mediafile views
This commit is contained in:
commit
8c68e93596
@ -107,6 +107,7 @@
|
|||||||
<div
|
<div
|
||||||
*ngIf="getFileSettings(file).length > 0"
|
*ngIf="getFileSettings(file).length > 0"
|
||||||
[matMenuTriggerFor]="singleFileMenu"
|
[matMenuTriggerFor]="singleFileMenu"
|
||||||
|
(click)="$event.stopPropagation()"
|
||||||
[matMenuTriggerData]="{ file: file }"
|
[matMenuTriggerData]="{ file: file }"
|
||||||
[matTooltip]="formatIndicatorTooltip(file)"
|
[matTooltip]="formatIndicatorTooltip(file)"
|
||||||
>
|
>
|
||||||
@ -123,6 +124,7 @@
|
|||||||
<button
|
<button
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
[matMenuTriggerFor]="singleFileMenu"
|
[matMenuTriggerFor]="singleFileMenu"
|
||||||
|
(click)="$event.stopPropagation()"
|
||||||
[matMenuTriggerData]="{ file: file }"
|
[matMenuTriggerData]="{ file: file }"
|
||||||
[disabled]="isMultiSelect"
|
[disabled]="isMultiSelect"
|
||||||
>
|
>
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
<div *ngIf="user.is_active">
|
<div *ngIf="user.is_active">
|
||||||
<mat-checkbox
|
<mat-checkbox
|
||||||
class="checkboxPresent"
|
class="checkboxPresent"
|
||||||
(click)="setPresent(user)"
|
(click)="setPresent(user, $event)"
|
||||||
[checked]="user.is_present"
|
[checked]="user.is_present"
|
||||||
[disabled]="isMultiSelect"
|
[disabled]="isMultiSelect"
|
||||||
>
|
>
|
||||||
|
@ -394,8 +394,10 @@ export class UserListComponent extends ListViewBaseComponent<ViewUser, User> imp
|
|||||||
* Sets the user present
|
* Sets the user present
|
||||||
*
|
*
|
||||||
* @param viewUser the viewUser Object
|
* @param viewUser the viewUser Object
|
||||||
|
* @param event the mouse event (to prevent propagaton to row triggers)
|
||||||
*/
|
*/
|
||||||
public async setPresent(viewUser: ViewUser): Promise<void> {
|
public async setPresent(viewUser: ViewUser, event: MouseEvent): Promise<void> {
|
||||||
|
event.stopPropagation();
|
||||||
viewUser.user.is_present = !viewUser.user.is_present;
|
viewUser.user.is_present = !viewUser.user.is_present;
|
||||||
await this.repo.update(viewUser.user, viewUser);
|
await this.repo.update(viewUser.user, viewUser);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user