Commit c0290730 by Lee Munkyeong

Merge branch 'feature/42975_メンバー側がホスト変更依頼をした時に、メンバー側に余計なアラートが表示される' into 'develop'

#42975_ホストリクエストロジック修正。

See merge request !152
parents 996e8328 1217a8b9
......@@ -62,5 +62,10 @@ const ANDROID_SDK_VERSION = {
O : 26
}
const HOST_REQUEST_FLG = {
DONE : 0,
DOING : 1
}
const messageSeperator = "<::split>";
const dataMessageScheme = "::NOT_MESSAGE";
......@@ -100,5 +100,6 @@ $.lang.en = {
"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?",
"error_send_video": "Fail to send."
"error_send_video": "Fail to send.",
"already_processing_host_request" : "already processing host request"
}
......@@ -100,5 +100,6 @@ $.lang.ja = {
"err_target_android_version_not_support" : "対象ユーザの端末バージョンでは文書協業が利用できません。",
"err_not_exist_room" : "該当のルームが存在しません。",
"norify_request_host_change" : "%@様からホスト変更リクエストがあります。\n承認しますか?",
"error_send_video": "送信に失敗しました。"
"error_send_video": "送信に失敗しました。",
"already_processing_host_request" : "既にホストリクエストが進行中です。"
}
\ No newline at end of file
......@@ -100,5 +100,6 @@ $.lang.ko = {
"err_target_android_version_not_support" : "해당 유저의 단말버전에서는 문서협업이 이용불가능합니다.",
"err_not_exist_room" : "해당 룸이 존재하지않습니다.",
"norify_request_host_change" : "%@님이 호스트변경을 요청하셨습니다.\n승인하시겠습니까?",
"error_send_video": "전송에 실패했습니다."
"error_send_video": "전송에 실패했습니다.",
"already_processing_host_request" : "이미 호스트요청이 진행중입니다."
}
......@@ -173,7 +173,7 @@ $(function () {
var isAble = data.payload.isAble
if (g_isMainMan && isAndroid && !isAble && joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
alert(getLocalizedString('err_target_android_version_not_support'));
} else {
} else if (g_isMainMan){
Coview_changeHost(getFermiLoginId(data.payload.loginId));
}
} else if (data.type === "API_SEND_OWNER_CHANGE_COMPLETE") {
......@@ -182,8 +182,25 @@ $(function () {
}
penOff();
} else if (data.type === "CHANGE_HOST_APPLY") {
if(confirm(getLocalizedString('norify_request_host_change',data.payload.hostId))) {
if (CHAT_UTIL.isAndroid()) {
android.setHostRequestFlg(HOST_REQUEST_FLG.DOING);
} else {
//TODO ホストリクエスト中フラグを設定
}
if(g_isMainMan && confirm(getLocalizedString('norify_request_host_change', data.payload.hostId))) {
Coview_changeHost(getFermiLoginId(data.payload.hostId));
if (CHAT_UTIL.isAndroid()) {
android.setHostRequestFlg(HOST_REQUEST_FLG.DONE);
} else {
//TODO ホストリクエスト中フラグを設定
}
fw.sendToMsg('others', 'HOST_REQUEST_DONE', {"hostId": data.payload.hostId});
}
} else if (data.type === "HOST_REQUEST_DONE") {
if (CHAT_UTIL.isAndroid()) {
android.setHostRequestFlg(HOST_REQUEST_FLG.DONE);
} else {
//TODO ホストリクエスト中フラグを設定
}
}
});
......@@ -563,6 +580,21 @@ function applyForHostChange() {
alert(getLocalizedString('not_support_version'));
return;
}
var hostRequestFlg = 0;
if (CHAT_UTIL.isAndroid()) {
hostRequestFlg = android.getHostRequestFlg();
} else {
//TODO ホストリクエスト中フラグを取得
}
if (hostRequestFlg == HOST_REQUEST_FLG.DOING) {
alert(getLocalizedString('already_processing_host_request'));
return;
}
if (CHAT_UTIL.isAndroid()) {
android.setHostRequestFlg(HOST_REQUEST_FLG.DOING);
} else {
//TODO ホストリクエスト中フラグを設定
}
fw.sendToMsg('others', 'CHANGE_HOST_APPLY', {"hostId": CHAT.globalLoginParameter.loginId});
};
......
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