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