Communication module mobile support enhancement

쪽지 모듈의 모바일 지원을 향상시켰습니다.
이 PR 이후에 회원 모듈의 모바일 지원을 향상 시키면 XE의 모바일 지원 수준이 한 단계 상승하게 됩니다.
꼭 반영되길 바랍니다!

## 수정 내용

* 커뮤니케이션 애드온의 회원 메뉴 설정 기능을 모듈의 트리거로 처리하여 조금 더 직관적으로 설정하게 됨.
* 기본값은 모듈이 동작 하도록 함.
* 모듈을 켜고 끌 수 있도록 함.
* 모바일에서 친구 추가를 할 수 있게 함.
* 스타일 아주 조금 다듬음.
This commit is contained in:
MinSoo Kim 2015-05-25 02:32:47 +09:00
parent ecce7e5efd
commit e75983768f
14 changed files with 428 additions and 85 deletions

View file

@ -182,6 +182,73 @@ class communicationMobile extends communicationView
$this->setTemplateFile('send_message');
}
/**
* display Add a friend
* @return void|Object (void : success, Object : fail)
*/
function dispCommunicationAddFriend()
{
// error appears if not logged-in
if(!Context::get('is_logged'))
{
return $this->stop('msg_not_logged');
}
$logged_info = Context::get('logged_info');
$target_srl = Context::get('target_srl');
if(!$target_srl)
{
return $this->stop('msg_invalid_request');
}
// get information of the member
$oMemberModel = getModel('member');
$oCommunicationModel = getModel('communication');
$communication_info = $oMemberModel->getMemberInfoByMemberSrl($target_srl);
if($communication_info->member_srl != $target_srl)
{
return $this->stop('msg_invalid_request');
}
Context::set('target_info', $communication_info);
// get a group list
$friend_group_list = $oCommunicationModel->getFriendGroups();
Context::set('friend_group_list', $friend_group_list);
$this->setTemplateFile('add_friend');
}
/**
* display add a group of friends
* @return void|Object (void : success, Object : fail)
*/
function dispCommunicationAddFriendGroup()
{
// error apprears if not logged-in
if(!Context::get('is_logged'))
{
return $this->stop('msg_not_logged');
}
$logged_info = Context::get('logged_info');
// change to edit mode when getting the group_srl
$friend_group_srl = Context::get('friend_group_srl');
if($friend_group_srl)
{
$oCommunicationModel = getModel('communication');
$friend_group = $oCommunicationModel->getFriendGroupInfo($friend_group_srl);
if($friend_group->friend_group_srl == $friend_group_srl)
{
Context::set('friend_group', $friend_group);
}
}
$this->setTemplateFile('add_friend_group');
}
}
/* End of file communication.mobile.php */
/* Location: ./modules/comment/communication.mobile.php */