context menu is modified
This commit is contained in:
parent
48088d71d7
commit
fc770168c7
|
@ -1,11 +1,23 @@
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<ucap-organization-tenant-search [companyList]="companyList$ | async" [companyCode]="companyCode"
|
<ucap-organization-tenant-search
|
||||||
(keyDownEnter)="onKeyDownEnterOrganizationTenantSearch($event)"></ucap-organization-tenant-search>
|
[companyList]="companyList$ | async"
|
||||||
<button mat-icon-button [matMenuTriggerFor]="groupMenu" aria-label="group menu">
|
[companyCode]="companyCode"
|
||||||
|
(keyDownEnter)="onKeyDownEnterOrganizationTenantSearch($event)"
|
||||||
|
></ucap-organization-tenant-search>
|
||||||
|
<button
|
||||||
|
mat-icon-button
|
||||||
|
[matMenuTriggerFor]="groupMenu"
|
||||||
|
aria-label="group menu"
|
||||||
|
>
|
||||||
<mat-icon>more_vert</mat-icon>
|
<mat-icon>more_vert</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<mat-menu #groupMenu="matMenu" xPosition="after" yPosition="below" [overlapTrigger]="false">
|
<mat-menu
|
||||||
|
#groupMenu="matMenu"
|
||||||
|
xPosition="after"
|
||||||
|
yPosition="below"
|
||||||
|
[overlapTrigger]="false"
|
||||||
|
>
|
||||||
<button mat-menu-item (click)="onClickGroupMenu('GROUP_NEW')">
|
<button mat-menu-item (click)="onClickGroupMenu('GROUP_NEW')">
|
||||||
<mat-icon>group_add</mat-icon>
|
<mat-icon>group_add</mat-icon>
|
||||||
<span>새 그룹 추가</span>
|
<span>새 그룹 추가</span>
|
||||||
|
@ -29,18 +41,31 @@
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ucap-group-expansion-panel #groupExpansionPanel [groupBuddyList]="groupBuddyList$ | async"
|
<ucap-group-expansion-panel
|
||||||
[favoritBuddyList]="favoritBuddyList$ | async" (more)="onMoreGroup($event)">
|
#groupExpansionPanel
|
||||||
<ucap-profile-user-list-item *ucapGroupExpansionPanelItem="let userInfo" [userInfo]="userInfo"
|
[groupBuddyList]="groupBuddyList$ | async"
|
||||||
[presence]="getStatusBulkInfo(userInfo) | async" [sessionVerinfo]="sessionVerinfo"
|
[favoritBuddyList]="favoritBuddyList$ | async"
|
||||||
(click)="onSelectBuddy(userInfo)" (contextMenu)="onContextMenuProfile($event)">
|
(more)="onMoreGroup($event)"
|
||||||
|
>
|
||||||
|
<ucap-profile-user-list-item
|
||||||
|
*ucapGroupExpansionPanelItem="let userInfo"
|
||||||
|
[userInfo]="userInfo"
|
||||||
|
[presence]="getStatusBulkInfo(userInfo) | async"
|
||||||
|
[sessionVerinfo]="sessionVerinfo"
|
||||||
|
(click)="onSelectBuddy(userInfo)"
|
||||||
|
(contextmenu)="onContextMenuProfile($event, userInfo)"
|
||||||
|
>
|
||||||
</ucap-profile-user-list-item>
|
</ucap-profile-user-list-item>
|
||||||
</ucap-group-expansion-panel>
|
</ucap-group-expansion-panel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="visibility: hidden; position: fixed" [style.left]="profileContextMenuPosition.x"
|
<div
|
||||||
[style.top]="profileContextMenuPosition.y" [matMenuTriggerFor]="profileContextMenu"></div>
|
style="visibility: hidden; position: fixed"
|
||||||
|
[style.left]="profileContextMenuPosition.x"
|
||||||
|
[style.top]="profileContextMenuPosition.y"
|
||||||
|
[matMenuTriggerFor]="profileContextMenu"
|
||||||
|
></div>
|
||||||
<mat-menu #profileContextMenu="matMenu" [overlapTrigger]="false">
|
<mat-menu #profileContextMenu="matMenu" [overlapTrigger]="false">
|
||||||
<ng-template matMenuContent let-item="userInfo">
|
<ng-template matMenuContent let-item="userInfo">
|
||||||
<button mat-menu-item>Action 1</button>
|
<button mat-menu-item>Action 1</button>
|
||||||
|
@ -48,8 +73,12 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<div style="visibility: hidden; position: fixed" [style.left]="groupContextMenuPosition.x"
|
<div
|
||||||
[style.top]="groupContextMenuPosition.y" [matMenuTriggerFor]="groupContextMenu"></div>
|
style="visibility: hidden; position: fixed"
|
||||||
|
[style.left]="groupContextMenuPosition.x"
|
||||||
|
[style.top]="groupContextMenuPosition.y"
|
||||||
|
[matMenuTriggerFor]="groupContextMenu"
|
||||||
|
></div>
|
||||||
<mat-menu #groupContextMenu="matMenu" [overlapTrigger]="false">
|
<mat-menu #groupContextMenu="matMenu" [overlapTrigger]="false">
|
||||||
<ng-template matMenuContent let-item="group">
|
<ng-template matMenuContent let-item="group">
|
||||||
<button mat-menu-item>그룹 대화하기</button>
|
<button mat-menu-item>그룹 대화하기</button>
|
||||||
|
|
|
@ -206,14 +206,17 @@ export class GroupComponent implements OnInit {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenuProfile(params: {
|
onContextMenuProfile(
|
||||||
event: MouseEvent;
|
event: MouseEvent,
|
||||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
||||||
}) {
|
) {
|
||||||
this.profileContextMenuPosition.x = params.event.clientX + 'px';
|
event.preventDefault();
|
||||||
this.profileContextMenuPosition.y = params.event.clientY + 'px';
|
event.stopPropagation();
|
||||||
|
|
||||||
|
this.profileContextMenuPosition.x = event.clientX + 'px';
|
||||||
|
this.profileContextMenuPosition.y = event.clientY + 'px';
|
||||||
const profileContextMenuTrigger = this.menuTriggerList.toArray()[1];
|
const profileContextMenuTrigger = this.menuTriggerList.toArray()[1];
|
||||||
profileContextMenuTrigger.menuData = { userInfo: params.userInfo };
|
profileContextMenuTrigger.menuData = { userInfo };
|
||||||
profileContextMenuTrigger.openMenu();
|
profileContextMenuTrigger.openMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@ export class MessagesComponent implements OnInit {
|
||||||
save = new EventEmitter<{ fileInfo: FileInfo; type: string }>();
|
save = new EventEmitter<{ fileInfo: FileInfo; type: string }>();
|
||||||
|
|
||||||
@ViewChildren(MatMenuTrigger) menuTriggerList: QueryList<MatMenuTrigger>;
|
@ViewChildren(MatMenuTrigger) menuTriggerList: QueryList<MatMenuTrigger>;
|
||||||
|
|
||||||
@ViewChild('messageContextMenu', { static: true })
|
@ViewChild('messageContextMenu', { static: true })
|
||||||
messageContextMenu: MatMenu;
|
messageContextMenu: MatMenu;
|
||||||
messageContextMenuPosition = { x: '0px', y: '0px' };
|
messageContextMenuPosition = { x: '0px', y: '0px' };
|
||||||
|
@ -157,6 +156,8 @@ export class MessagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenuMessage(event: MouseEvent, eventType: EventType, message: Info) {
|
onContextMenuMessage(event: MouseEvent, eventType: EventType, message: Info) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
this.messageContextMenuPosition.x = event.clientX + 'px';
|
this.messageContextMenuPosition.x = event.clientX + 'px';
|
||||||
this.messageContextMenuPosition.y = event.clientY + 'px';
|
this.messageContextMenuPosition.y = event.clientY + 'px';
|
||||||
const messageContextMenuTrigger = this.menuTriggerList.toArray()[0];
|
const messageContextMenuTrigger = this.menuTriggerList.toArray()[0];
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
<!--체크박스 보여줄때는 <div class="list-item checkbox" matRipple> 클래스에 checkbox만 추가-->
|
<!--체크박스 보여줄때는 <div class="list-item checkbox" matRipple> 클래스에 checkbox만 추가-->
|
||||||
<div
|
<div class="list-item" matRipple>
|
||||||
class="list-item"
|
|
||||||
matRipple
|
|
||||||
(contextmenu)="onContextMenu($event, userInfo)"
|
|
||||||
>
|
|
||||||
<!--pcOn , pcOut pcOff , pcOther-->
|
<!--pcOn , pcOut pcOff , pcOther-->
|
||||||
<span
|
<span
|
||||||
class="presence"
|
class="presence"
|
||||||
|
|
|
@ -46,12 +46,6 @@ export class UserListItemComponent implements OnInit, OnDestroy {
|
||||||
@Input()
|
@Input()
|
||||||
sessionVerinfo: VersionInfo2Response;
|
sessionVerinfo: VersionInfo2Response;
|
||||||
|
|
||||||
@Output()
|
|
||||||
contextMenu = new EventEmitter<{
|
|
||||||
event: MouseEvent;
|
|
||||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
userPresence: StatusBulkInfo | StatusInfo;
|
userPresence: StatusBulkInfo | StatusInfo;
|
||||||
|
|
||||||
PresenceType = PresenceType;
|
PresenceType = PresenceType;
|
||||||
|
@ -112,13 +106,4 @@ export class UserListItemComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
return rtnClass;
|
return rtnClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenu(
|
|
||||||
event: MouseEvent,
|
|
||||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
|
||||||
) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
this.contextMenu.emit({ event, userInfo });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user