Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
25fa2ec6
Commit
25fa2ec6
authored
Jun 10, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/finish_all_collaboration' into 'develop'
Feature/finish all collaboration See merge request
!169
parents
5ab391a4
fee04e09
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
10 deletions
+63
-10
public_new/js/chat-ui.js
+21
-3
public_new/js/chat-websocket.js
+10
-0
public_new/js/constant.js
+2
-1
public_new/js/language_en.js
+2
-0
public_new/js/language_ja.js
+2
-0
public_new/js/language_ko.js
+2
-0
public_new/js/share.js
+15
-2
public_new/template/template_open_collaboration_message.html
+9
-4
No files found.
public_new/js/chat-ui.js
View file @
25fa2ec6
...
...
@@ -2621,13 +2621,31 @@ CHAT_UI.joinCollaboration = function(collaborationType, meetingId = 0) {
}
CHAT_UI
.
startCollaboration
=
function
(
collaborationType
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
startCollaboration
.
postMessage
(
collaborationType
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
if
(
CHAT_UTIL
.
isAndroid
())
{
if
(
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
alert
(
getLocalizedString
(
'not_support_version'
));
return
;
}
}
if
(
$
(
'.collabo_area.start'
).
length
!=
0
)
{
if
(
!
confirm
(
getLocalizedString
(
'already_exist_collaboration'
)))
{
CHAT_UI
.
dismissLoadingIndicator
();
return
;
}
socket
.
emit
(
'createMessage'
,
{
text
:
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
},
0
);
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO ルーム全協業終了API
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
finishAllCollaboration
();
}
}
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
startCollaboration
.
postMessage
(
collaborationType
);
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
startCollaboration
(
collaborationType
);
}
}
...
...
public_new/js/chat-websocket.js
View file @
25fa2ec6
...
...
@@ -204,6 +204,16 @@ function setSocketAction () {
}
let
type
;
let
collaborationType
;
if
(
message
.
text
==
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
)
{
$
(
'.collabo_area.start'
).
each
(
function
(
index
,
collaborationMessage
)
{
$
(
collaborationMessage
).
removeClass
(
'start'
);
$
(
collaborationMessage
).
addClass
(
'end'
);
$
(
collaborationMessage
).
addClass
(
'disable'
);
$
(
collaborationMessage
).
find
(
'.collaboation_join_button'
).
attr
(
'disabled'
,
'disabled'
);
$
(
collaborationMessage
).
find
(
'.collaboration_join_message'
).
text
(
getLocalizedString
(
'message_ended'
));
});
return
;
}
if
(
message
.
text
.
includes
(
messageSeperator
)
)
{
let
text
=
message
.
text
.
split
(
messageSeperator
);
message
.
text
=
text
[
0
];
...
...
public_new/js/constant.js
View file @
25fa2ec6
...
...
@@ -68,4 +68,5 @@ const HOST_REQUEST_FLG = {
}
const
messageSeperator
=
"<::split>"
;
const
dataMessageScheme
=
"::NOT_MESSAGE"
;
const
DATA_MESSAGE_SCHEME
=
"::NOT_MESSAGE"
;
const
FINISH_ALL_COLLABORATION_SIGNAL
=
"::ALL_COLLABORATION_END"
;
public_new/js/language_en.js
View file @
25fa2ec6
...
...
@@ -61,6 +61,7 @@ $.lang.en = {
"groupChatRoom"
:
"Group"
,
"myGroup"
:
"My Group"
,
"allGroup"
:
"All Group"
,
"message_ended"
:
"End"
,
"returnToRootGroup"
:
"Return to Root Group"
,
"returnToParentGroup"
:
"Return to Parent Group"
,
"quickBtn"
:
"Quick Button"
,
...
...
@@ -100,6 +101,7 @@ $.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?"
,
"already_exist_collaboration"
:
"already exist collaboration. do you want finish already exist collaboration and start new one?"
,
"error_send_video"
:
"Fail to send."
,
"already_processing_host_request"
:
"already processing host request"
,
"err_weak_network_exit_collaboration"
:
"network is weak. end Collaboration"
...
...
public_new/js/language_ja.js
View file @
25fa2ec6
...
...
@@ -61,6 +61,7 @@ $.lang.ja = {
"groupChatRoom"
:
"グループ"
,
"myGroup"
:
"マイグループ"
,
"allGroup"
:
"全グループ"
,
"message_ended"
:
"終了しました"
,
"returnToRootGroup"
:
"トップグループに戻る"
,
"returnToParentGroup"
:
"上位グループに戻る"
,
"quickBtn"
:
"クイックボタン"
,
...
...
@@ -100,6 +101,7 @@ $.lang.ja = {
"err_target_android_version_not_support"
:
"対象ユーザの端末バージョンでは文書協業が利用できません。"
,
"err_not_exist_room"
:
"該当のルームが存在しません。"
,
"norify_request_host_change"
:
"%@様からホスト変更リクエストがあります。
\
n承認しますか?"
,
"already_exist_collaboration"
:
"現在進行中の協業があります。進行中の協業を終了し、新たな協業を開始しますか?"
,
"error_send_video"
:
"送信に失敗しました。"
,
"already_processing_host_request"
:
"既にホストリクエストが進行中です。"
,
"err_weak_network_exit_collaboration"
:
"ネットワーク信号が弱いです。協業を終了します。"
...
...
public_new/js/language_ko.js
View file @
25fa2ec6
...
...
@@ -61,6 +61,7 @@ $.lang.ko = {
"groupChatRoom"
:
"그룹"
,
"myGroup"
:
"내그룹"
,
"allGroup"
:
"전그룹"
,
"message_ended"
:
"종료되었습니다."
,
"returnToRootGroup"
:
"최상위그룹으로 돌아가기"
,
"returnToParentGroup"
:
"상위그룹으로 돌아가기"
,
"quickBtn"
:
"퀵버튼"
,
...
...
@@ -100,6 +101,7 @@ $.lang.ko = {
"err_target_android_version_not_support"
:
"해당 유저의 단말버전에서는 문서협업이 이용불가능합니다."
,
"err_not_exist_room"
:
"해당 룸이 존재하지않습니다."
,
"norify_request_host_change"
:
"%@님이 호스트변경을 요청하셨습니다.
\
n승인하시겠습니까?"
,
"already_exist_collaboration"
:
"현재 진행중인 협업이 있습니다. 진행중인 협업을 강제종료하고 새로 개시하시겠습니까?"
,
"error_send_video"
:
"전송에 실패했습니다."
,
"already_processing_host_request"
:
"이미 호스트요청이 진행중입니다."
,
"err_weak_network_exit_collaboration"
:
"네트워크신호가 약합니다. 협업을 정리하겠습니다."
...
...
public_new/js/share.js
View file @
25fa2ec6
...
...
@@ -119,7 +119,12 @@ $(function () {
console
.
log
(
"=============> READY : ready for coview api"
);
Coview_addLoginId
(
globalUserInfo
.
loginId
);
coview_api
.
Login
(
globalUserInfo
.
loginId
);
initCollaborationUI
(
joinCollaborationType
)
initCollaborationUI
(
joinCollaborationType
);
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
setHostRequestFlg
(
HOST_REQUEST_FLG
.
DONE
);
}
else
{
webkit
.
messageHandlers
.
setHostRequestFlg
.
postMessage
(
HOST_REQUEST_FLG
.
DONE
);
}
fw
.
socket
.
on
(
'message'
,
async
function
(
data
)
{
console
.
log
(
'====> message::data: '
,
data
);
if
(
data
.
type
===
"CHANGE_COLLABORATION"
)
{
...
...
@@ -132,6 +137,7 @@ $(function () {
}
if
(
CHAT_UTIL
.
isAndroid
()
&&
data
.
payload
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
alert
(
getLocalizedString
(
'not_support_version'
));
joinCollaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
}
else
{
...
...
@@ -182,6 +188,7 @@ $(function () {
var
isAndroid
=
data
.
payload
.
isAndroid
;
var
isAble
=
data
.
payload
.
isAble
if
(
g_isMainMan
&&
isAndroid
&&
!
isAble
&&
joinCollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
alert
(
getLocalizedString
(
'err_target_android_version_not_support'
));
}
else
if
(
g_isMainMan
){
Coview_changeHost
(
getFermiLoginId
(
data
.
payload
.
loginId
));
...
...
@@ -199,6 +206,7 @@ $(function () {
webkit
.
messageHandlers
.
setHostRequestFlg
.
postMessage
(
HOST_REQUEST_FLG
.
DOING
);
}
if
(
g_isMainMan
)
{
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
if
(
confirm
(
getLocalizedString
(
'norify_request_host_change'
,
data
.
payload
.
hostId
)))
{
Coview_changeHost
(
getFermiLoginId
(
data
.
payload
.
hostId
));
if
(
CHAT_UTIL
.
isAndroid
())
{
...
...
@@ -573,6 +581,11 @@ function Coview_exitCollaboration(isDocument = false) {
android
.
exitMeetingRoom
();
}
}
if
(
socket
!=
null
&&
socket
.
connected
)
{
socket
.
emit
(
'createMessage'
,
{
text
:
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
},
0
);
}
if
(
$
(
'#recordBtn'
).
hasClass
(
'bg_red'
))
{
recordStop
(
Coview_finishCollaboration
);
}
else
{
...
...
@@ -587,7 +600,7 @@ function Coview_finishCollaboration() {
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
finishCollaboration
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
finishCollaboration
()
android
.
finishCollaboration
()
;
}
};
isLeaved
=
true
;
...
...
public_new/template/template_open_collaboration_message.html
View file @
25fa2ec6
...
...
@@ -9,7 +9,12 @@
<span>
{{createdAtDay}}
</span><span>
{{createdAtTime}}
</span>
{{/isToday}}
</div>
<div
class=
"collabo_area {{#isEnded}} disable {{/isEnded}}"
>
{{#isEnded}}
<div
class=
"collabo_area end disable"
>
{{/isEnded}}
{{^isEnded}}
<div
class=
"collabo_area start"
>
{{/isEnded}}
<div
class=
"collabo_desc"
>
<div
class=
"collabo_room_name d-flex flex-row"
>
<span>
{{roomName}}
</span>
...
...
@@ -27,13 +32,13 @@
</div>
</div>
<div
class=
"collabo_btn"
>
<button
type=
"button"
name=
"button"
onclick=
"CHAT_UI.joinCollaboration({{collaborationType}}, {{meetingId}})"
{{#
isEnded
}}
disabled
{{/
isEnded
}}
>
<button
class=
"collaboation_join_button"
type=
"button"
name=
"button"
onclick=
"CHAT_UI.joinCollaboration({{collaborationType}}, {{meetingId}})"
{{#
isEnded
}}
disabled
{{/
isEnded
}}
>
<img
src=
"icon/icon_profile_phone.png"
alt=
"通話"
>
{{#isEnded}}
<span>
終了しました
</span>
<span
class=
"collaboration_join_message"
>
終了しました
</span>
{{/isEnded}}
{{^isEnded}}
<span>
参加する
</span>
<span
class=
"collaboration_join_message"
>
参加する
</span>
{{/isEnded}}
</button>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment