Commit e23b43b5 by Lee Munkyeong

Merge branch 'feature/develop_fix_collaboration_user_invitation_screen' into 'develop'

Feature/develop fix collaboration user invitation screen

See merge request !140
parents 80cbdc71 c6bec16c
......@@ -22,6 +22,11 @@
height: 100%;
}
.breadcrumb_item:not(:last-child):after {
content: ">";
margin: 0 5px;
}
/**************************** main *************************/
#collabo_main {
height: calc(100vh - 180px);
......@@ -206,7 +211,9 @@
#add_user_list .chat_item_ttl {
font-weight: bold;
}
.modal_collaboration_user {
margin: 0px !important;
}
#add_user_list .user_item {
height: 90px;
}
......@@ -451,7 +458,7 @@
.add_user_modal {
width: 80%;
height: 80%;
left: 10%;
left: 12.5%;
overflow: auto;
}
......
......@@ -1161,7 +1161,11 @@ CHAT_UI.refreshRoomList = function(roomType) {
CHAT_UI.joinRoom = function(roomId,roomName) {
//native側に入場対象のroomId,roomNameを保存。(ルーム詳細画面初期化の時に使用。)
if (typeof(android) != "undefined") {
try {
android.joinRoom(roomId,roomName);
} catch {
alert(getLocalizedString('err_not_exist_room'));
}
} else {
webkit.messageHandlers.joinRoom.postMessage({"roomId": roomId, "roomName": roomName});
}
......@@ -2515,13 +2519,22 @@ CHAT_UI.refreshJoinedCollaboration = function(loginIdList) {
});
var joinedUserList = CHAT_DB.getUserListByLoginId(loginIdList);
var sortedUserList = new Array();
loginIdList.forEach(function(userId) {
joinedUserList.forEach(function(user) {
if (userId == user.loginId) {
sortedUserList.push(user);
}
})
})
sortedUserList.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
})
let html = Mustache.render(joinedUserListTemplate, {
joinedUserList: joinedUserList
joinedUserList: sortedUserList
});
let obj = jQuery.parseHTML(html);
......@@ -2751,6 +2764,7 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId) {
let isCollaborationHost = coview_api.getRoomUsers();
nameCardInfo.profileUrl = CHAT.getProfileImgUrl(nameCardInfo.profileUrl);
let whosHost = $("#collaboration_user_" + nameCardInfo.loginId).hasClass("host");
let namecardHtml = Mustache.render(namecardTemplate, {
shopMemberId: nameCardInfo.shopMemberId,
profileUrl: nameCardInfo.profileUrl,
......@@ -2758,7 +2772,8 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId) {
name: nameCardInfo.shopMemberName,
groupPathList: nameCardInfo.groupPathList,
isFavorite: nameCardInfo.isFavorite,
isHost: isCollaborationHost
isHost: isCollaborationHost,
whosHost: whosHost
});
let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function() {
......
......@@ -97,5 +97,7 @@ $.lang.en = {
"request_capture" : " request Screen capture.(if you confirm this request, capture the screen and change the host)",
"host_change_notify" : "host changed to %@",
"not_support_version" : "did not support this device version.",
"err_target_android_version_not_support" : "did not support document collaboration on this user's device version."
"err_target_android_version_not_support" : "did not support document collaboration on this user's device version.",
"err_not_exist_room" : "this room is not exist.",
"norify_request_host_change" : "%@ request host permission \ndo you want to approve?"
}
......@@ -97,5 +97,7 @@ $.lang.ja = {
"request_capture" : "様がキャプチャーをリクエストしました。(確認時画面をキャプチャーし、ホストを変更します。)",
"host_change_notify" : "ホストが%@様に変更されました。",
"not_support_version" : "現在の端末バージョンでは利用できません。",
"err_target_android_version_not_support" : "対象ユーザの端末バージョンでは文書協業が利用できません。"
"err_target_android_version_not_support" : "対象ユーザの端末バージョンでは文書協業が利用できません。",
"err_not_exist_room" : "該当のルームが存在しません。",
"norify_request_host_change" : "%@様からホスト変更リクエストがあります。\n承認しますか?"
}
\ No newline at end of file
......@@ -97,5 +97,7 @@ $.lang.ko = {
"request_capture" : "님이 화면캡처를 요청하셨습니다.(확인시 화면을캡처하고 호스트를 변경합니다.)",
"host_change_notify" : "호스트가 %@님으로 변경되었습니다.",
"not_support_version" : "현재단말버전에서는 지원되지않는기능입니다.",
"err_target_android_version_not_support" : "해당 유저의 단말버전에서는 문서협업이 이용불가능합니다."
"err_target_android_version_not_support" : "해당 유저의 단말버전에서는 문서협업이 이용불가능합니다.",
"err_not_exist_room" : "해당 룸이 존재하지않습니다.",
"norify_request_host_change" : "%@님이 호스트변경을 요청하셨습니다.\n승인하시겠습니까?"
}
......@@ -181,6 +181,10 @@ $(function () {
recordStop();
}
penOff();
} else if (data.type === "CHANGE_HOST_APPLY") {
if(confirm(getLocalizedString('norify_request_host_change',data.payload.hostId))) {
Coview_changeHost(data.payload.hostId);
}
}
});
});
......@@ -551,6 +555,14 @@ function Coview_addLoginId(loginId) {
});
}
function applyForHostChange() {
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version'));
return;
}
fw.sendToMsg('others', 'CHANGE_HOST_APPLY', {"hostId": CHAT.globalLoginParameter.loginId});
};
function Coview_connect_audio_collaboration() {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
......@@ -563,6 +575,7 @@ function hostSearchInterval() {
let hostName = "";
function hostSearch() {
if (g_isMainMan) {
$("#collaboration_user_" + CHAT.globalLoginParameter.loginId).addClass("host");
$('.host_contents').removeClass('none');
if (joinCollaborationType == COLLABORATION_TYPE.CAMERA) {
$('.photo_select_button').removeClass('none');
......@@ -573,6 +586,7 @@ function hostSearchInterval() {
}
if (CHAT_UTIL.isIOS()) isIos = true;
} else {
$("#collaboration_user_" + CHAT.globalLoginParameter.loginId).removeClass("host");
$('.host_contents').addClass('none');
if (joinCollaborationType == COLLABORATION_TYPE.CAMERA) {
$('.photo_select_button').addClass('none');
......
<div class="modal fade add_user_confirm_modal" id="modalAddUserConfirm" tabindex="-1" role="dialog"
aria-labelledby="modalAddUserConfirm" aria-hidden="true" style="position: fixed;">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document">
<div class="modal-content" style="position: fixed;height: 600px;width: 86%;">
<div class="modal-header border-0 pb-0">
<span>ユーザー招待</span>
......
<!-- コンテンツ -->
<div class="modal fade add_user_modal" id="addUserInCollaboration" tabindex="-1" role="dialog" aria-labelledby="addUserInCollaboration" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document">
<div class="modal-content" style="position: fixed;width: 75.5%;top: 0px;">
<form id="addUserFormInCollaboration" action="chat_add_user_confirm.html" method="post">
<!-- ユーザー検索 -->
......@@ -81,7 +81,7 @@
</div>
<!-- ルーム解説ボタン -->
<div class="add_user_confirm_btn content" id="addUserConfirmBtnInCollaboration" style="position: fixed;">
<button type="button" name="button" id="buttonAddUser" style="top: 465px; width: 75%;">
<button type="button" name="button" id="buttonAddUser" style="top: 455px; width: 75%;">
確認<br>
<span class="select_member_num"></span><span class="select_member">名 選択中</span></button>
</div>
......
......@@ -15,7 +15,7 @@
<span>キャンセル</span>
</div>
</button>
<button type="button" class="profile_chat_btn border-0 bg_blue text_white">
<button type="button" class="profile_chat_btn border-0 bg_blue text_white" onclick="applyForHostChange();">
<div class="d-flex flex-column">
<span>リクエスト</span>
</div>
......
......@@ -48,7 +48,8 @@
</button>
{{/isHost}}
{{^isHost}}
<button type="button" class="ch_host_btn border-0 bg_grey text_white" onclick="hostChangeRequest('{{loginId}}');" disabled>
{{#whosHost}}
<button type="button" class="ch_host_btn border-0 bg_blue text_white" data-toggle="modal" data-target="#hostRequestModal" value="#profileModal2">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_change_host.png" alt="ホスト変更">
......@@ -56,6 +57,17 @@
<span>ホスト変更</span>
</div>
</button>
{{/whosHost}}
{{^whosHost}}
<button type="button" class="ch_host_btn border-0 bg_grey text_white" data-toggle="modal" data-target="#hostRequestModal" value="#profileModal2" disabled>
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_change_host.png" alt="ホスト変更">
</div>
<span>ホスト変更</span>
</div>
</button>
{{/whosHost}}
{{/isHost}}
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment