그룹 > 사용자 검색 :: 검색된 사용자에 대해서 context menu 표출 안되던것 수정.
This commit is contained in:
parent
c349500718
commit
c88b198abb
|
@ -39,7 +39,7 @@
|
|||
[sessionVerinfo]="sessionVerinfo"
|
||||
(click)="onSelectBuddy(userInfo)"
|
||||
(openProfile)="onClickOpenProfile($event)"
|
||||
(contextmenu)="onContextMenuProfile($event, userInfo, group)"
|
||||
(contextmenu)="onContextMenuProfile($event, userInfo, group, false)"
|
||||
class="list-item-frame ucap-clickable"
|
||||
>
|
||||
</ucap-profile-user-list-item>
|
||||
|
@ -64,6 +64,7 @@
|
|||
[sessionVerinfo]="sessionVerinfo"
|
||||
(click)="onSelectBuddy(userInfo)"
|
||||
(openProfile)="onClickOpenProfile($event)"
|
||||
(contextmenu)="onContextMenuProfile($event, userInfo, null, true)"
|
||||
>
|
||||
</ucap-profile-user-list-item>
|
||||
</div>
|
||||
|
@ -150,7 +151,12 @@
|
|||
[hasBackdrop]="false"
|
||||
(ucapClickOutside)="profileContextMenuTrigger.closeMenu()"
|
||||
>
|
||||
<ng-template matMenuContent let-userInfo="userInfo" let-group="group">
|
||||
<ng-template
|
||||
matMenuContent
|
||||
let-userInfo="userInfo"
|
||||
let-group="group"
|
||||
let-isSearchData="isSearchData"
|
||||
>
|
||||
<button
|
||||
mat-menu-item
|
||||
(click)="onClickProfileContextMenu('VIEW_PROFILE', userInfo)"
|
||||
|
@ -159,7 +165,14 @@
|
|||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowProfileContextMenu('REGISTER_FAVORITE', userInfo, group)"
|
||||
*ngIf="
|
||||
getShowProfileContextMenu(
|
||||
'REGISTER_FAVORITE',
|
||||
userInfo,
|
||||
group,
|
||||
isSearchData
|
||||
)
|
||||
"
|
||||
(click)="onClickProfileContextMenu('REGISTER_FAVORITE', userInfo)"
|
||||
>
|
||||
즐겨찾기 {{ userInfo.isFavorit ? '해제' : '등록' }}
|
||||
|
@ -169,28 +182,41 @@
|
|||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowProfileContextMenu('REMOVE_FROM_GROUP', userInfo, group)"
|
||||
*ngIf="
|
||||
getShowProfileContextMenu(
|
||||
'REMOVE_FROM_GROUP',
|
||||
userInfo,
|
||||
group,
|
||||
isSearchData
|
||||
)
|
||||
"
|
||||
(click)="onClickProfileContextMenu('REMOVE_FROM_GROUP', userInfo, group)"
|
||||
>
|
||||
이 그룹에서 삭제
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowProfileContextMenu('COPY_BUDDY', userInfo, group)"
|
||||
*ngIf="
|
||||
getShowProfileContextMenu('COPY_BUDDY', userInfo, group, isSearchData)
|
||||
"
|
||||
(click)="onClickProfileContextMenu('COPY_BUDDY', userInfo)"
|
||||
>
|
||||
대화 상대 복사
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowProfileContextMenu('MOVE_BUDDY', userInfo, group)"
|
||||
*ngIf="
|
||||
getShowProfileContextMenu('MOVE_BUDDY', userInfo, group, isSearchData)
|
||||
"
|
||||
(click)="onClickProfileContextMenu('MOVE_BUDDY', userInfo, group)"
|
||||
>
|
||||
대화 상대 이동
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="getShowProfileContextMenu('SEND_MESSAGE', userInfo, group)"
|
||||
*ngIf="
|
||||
getShowProfileContextMenu('SEND_MESSAGE', userInfo, group, isSearchData)
|
||||
"
|
||||
(click)="onClickProfileContextMenu('SEND_MESSAGE', userInfo)"
|
||||
>
|
||||
쪽지 보내기
|
||||
|
|
|
@ -368,12 +368,21 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
getShowProfileContextMenu(
|
||||
menuType: string,
|
||||
userInfo: UserInfo | UserInfoF,
|
||||
group?: GroupDetailData
|
||||
group: GroupDetailData,
|
||||
isSearchData: boolean
|
||||
) {
|
||||
if (userInfo.seq === this.loginRes.userSeq) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!!isSearchData) {
|
||||
if (menuType === 'VIEW_PROFILE' || menuType === 'SEND_MESSAGE') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!group || group === undefined) {
|
||||
if (
|
||||
menuType === 'REGISTER_FAVORITE' ||
|
||||
|
@ -554,7 +563,8 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
onContextMenuProfile(
|
||||
event: MouseEvent,
|
||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN,
|
||||
group: GroupDetailData
|
||||
group: GroupDetailData,
|
||||
isSearchData: boolean
|
||||
) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
@ -562,7 +572,7 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
this.profileContextMenuPosition.x = event.clientX + 'px';
|
||||
this.profileContextMenuPosition.y = event.clientY + 'px';
|
||||
this.profileContextMenuTrigger.menu.focusFirstItem('mouse');
|
||||
this.profileContextMenuTrigger.menuData = { userInfo, group };
|
||||
this.profileContextMenuTrigger.menuData = { userInfo, group, isSearchData };
|
||||
this.profileContextMenuTrigger.openMenu();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user