Commit 850dcd11 by Kim Peace

Fixed host change logics

parent ac05490a
......@@ -71,6 +71,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
case "API_SEND_OWNER_CHANGE_COMPLETE":
FermiWebSocketMessageHandler.apiSendOwnerChangeComplete(data);
CollaborationFeature.updateHost();
break;
case "API_SEND_OWNER_CHANGE_CONFIRM":
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) {
......@@ -93,6 +94,10 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
}
CollaborationFeature.updateHost();
break;
case "SWITCH_VIDEO":
CollaborationFeature.updateHost();
CollaborationUI.userListSlideOut();
$(".profile_favorite_btn").click();
default:
break;
}
......
......@@ -234,6 +234,12 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
NativeBridgeDelegate.joinRoom(roomInfo.roomID, roomInfo.roomName);
};
CoviewBridge.changeHostFromModal = function () {
const userID = $("#changeHostModal").data("bs.modal")._config.collaborationid
// call in agent_app.js
coview_api.HostChange(userID);
};
CoviewBridge.changeHost = function (userID) {
// call in agent_app.js
coview_api.HostChange(userID);
......@@ -488,4 +494,4 @@ CollaborationUI.moveToVideoShareArea = function () {
CollaborationUI.showLoadingIndicator();
$(".coview_share_area").show();
$("#collabo_main").removeClass("none");
};
};
\ No newline at end of file
......@@ -15,7 +15,8 @@
<span>キャンセル</span>
</div>
</button>
<button type="button" onclick="CoviewBridge.changeHost({{shopMemberId}});" class="profile_chat_btn border-0 bg_blue text_white">
<button type="button" onclick="CoviewBridge.changeHostFromModal();"
class="profile_chat_btn border-0 bg_blue text_white">
<div class="d-flex flex-column">
<span>引き渡し</span>
</div>
......
......@@ -22,7 +22,8 @@
<button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column">
<span class="star active shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span class="star active shopmember_{{shopMemberId}}"
onclick="CHAT_UI.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span>お気に入り解除</span>
</div>
</button>
......@@ -31,14 +32,16 @@
<button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column">
<span class="star disable shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span class="star disable shopmember_{{shopMemberId}}"
onclick="Namecard.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span>お気に入り登録</span>
</div>
</button>
{{/isFavorite}}
{{#isHost}}
<button type="button" class="ch_host_btn border-0 bg_green text_white"
onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');">
<button type="button" class="ch_host_btn border-0 bg_green text_white" data-toggle="modal"
data-target="#changeHostModal" value="#profileModal2" data-collaborationId='{{collaborationId}}'>
<!-- onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');"> -->
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_change_host.svg" alt="ホスト変更">
......
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