fix click events in user + mediafile views

stopped propagation on soome buttons and menus
This commit is contained in:
Maximilian Krambach 2019-02-28 16:05:28 +01:00
parent 9e2d42f9f4
commit feca9e4a18
3 changed files with 6 additions and 2 deletions

View File

@ -107,6 +107,7 @@
<div
*ngIf="getFileSettings(file).length > 0"
[matMenuTriggerFor]="singleFileMenu"
(click)="$event.stopPropagation()"
[matMenuTriggerData]="{ file: file }"
[matTooltip]="formatIndicatorTooltip(file)"
>
@ -123,6 +124,7 @@
<button
mat-icon-button
[matMenuTriggerFor]="singleFileMenu"
(click)="$event.stopPropagation()"
[matMenuTriggerData]="{ file: file }"
[disabled]="isMultiSelect"
>

View File

@ -81,7 +81,7 @@
<div *ngIf="user.is_active">
<mat-checkbox
class="checkboxPresent"
(click)="setPresent(user)"
(click)="setPresent(user, $event)"
[checked]="user.is_present"
[disabled]="isMultiSelect"
>

View File

@ -394,8 +394,10 @@ export class UserListComponent extends ListViewBaseComponent<ViewUser, User> imp
* Sets the user present
*
* @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;
await this.repo.update(viewUser.user, viewUser);
}