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
14505b01
Commit
14505b01
authored
Apr 26, 2021
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
インデント修正、協業ネームカード閉じるボタン位置修正
parent
d412dadd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
161 additions
and
163 deletions
+161
-163
public_new/js/share.js
+157
-159
public_new/modal_collabo_profile.html
+4
-4
No files found.
public_new/js/share.js
View file @
14505b01
...
...
@@ -12,125 +12,123 @@ $(function() {
coview_wrap_id
:
"coviewShare"
,
coview_api_key
:
"8dda7092c5820d663"
}
);
);
// special button IN Chat ui
$
(
"#coviewShareMainBtn"
).
on
(
"click"
,
function
(
e
){
e
.
stopPropagation
();
if
(
$
(
".coview_share_dropdown_bar"
).
is
(
':visible'
)
==
true
){
Coview_shareDropdownHide
();
if
(
$
(
".coview_share_photo_select_bubble"
).
is
(
':visible'
)
==
true
){
$
(
".coview_share_photo_select_bubble"
).
slideUp
();
}
}
else
{
$
(
".coview_share_dropdown_bar"
).
slideDown
();
}
});
$
(
"#coviewShareMainBtn"
).
on
(
"click"
,
function
(
e
)
{
e
.
stopPropagation
();
if
(
$
(
".coview_share_dropdown_bar"
).
is
(
':visible'
)
==
true
)
{
Coview_shareDropdownHide
();
if
(
$
(
".coview_share_photo_select_bubble"
).
is
(
':visible'
)
==
true
)
{
$
(
".coview_share_photo_select_bubble"
).
slideUp
();
}
}
else
{
$
(
".coview_share_dropdown_bar"
).
slideDown
();
}
});
$
(
"#coviewShareCloseButton"
).
on
(
"click"
,
function
(
e
)
{
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
"#coviewShareCloseButton"
).
on
(
"click"
,
function
(
e
)
{
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
});
});
$
(
"body"
).
on
(
"click"
,
function
(){
Coview_shareDropdownHide
();
$
(
"body"
).
on
(
"click"
,
function
(){
Coview_shareDropdownHide
();
if
(
$
(
".coview_share_photo_select_bubble"
).
is
(
':visible'
)
==
true
)
{
$
(
".coview_share_photo_select_bubble"
).
slideUp
();
}
else
{
$
(
".coview_share_dropdown_bar"
).
slideDown
();
if
(
$
(
".coview_share_photo_select_bubble"
).
is
(
':visible'
)
==
true
)
{
$
(
".coview_share_photo_select_bubble"
).
slideUp
();
}
else
{
$
(
".coview_share_dropdown_bar"
).
slideDown
();
}
});
$
(
"#coviewShareCloseButton"
).
on
(
"click"
,
function
(
e
)
{
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
});
$
(
"body"
).
on
(
"click"
,
function
()
{
Coview_shareDropdownHide
();
});
$
(
document
).
on
(
"click"
,
".coview_share_request"
,
function
()
{
console
.
log
(
"globalUserInfo"
,
globalUserInfo
);
if
(
$
(
this
).
hasClass
(
collaborationTypeKey
.
VIDEO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
VIDEO
;
$
(
".coview_share_title_name"
).
text
(
"LIVE"
);
}
else
if
(
$
(
this
).
hasClass
(
collaborationTypeKey
.
CAMERA
)
==
true
)
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
CAMERA
;
$
(
".coview_share_title_name"
).
text
(
"ライブラリ"
);
}
else
if
(
$
(
this
).
hasClass
(
collaborationTypeKey
.
AUDIO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
AUDIO
;
$
(
".coview_share_title_name"
).
text
(
"音声通話"
);
}
$
(
"#coviewShareCloseButton"
).
on
(
"click"
,
function
(
e
)
{
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
});
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
});
$
(
"body"
).
on
(
"click"
,
function
()
{
Coview_shareDropdownHide
();
});
$
(
document
).
on
(
"click"
,
".coview_share_request"
,
function
()
{
console
.
log
(
"globalUserInfo"
,
globalUserInfo
);
if
(
$
(
this
).
hasClass
(
collaborationTypeKey
.
VIDEO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
VIDEO
;
$
(
".coview_share_title_name"
).
text
(
"LIVE"
);
}
else
if
(
$
(
this
).
hasClass
(
collaborationTypeKey
.
CAMERA
)
==
true
)
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
CAMERA
;
$
(
".coview_share_title_name"
).
text
(
"ライブラリ"
);
}
else
if
(
$
(
this
).
hasClass
(
collaborationTypeKey
.
AUDIO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
AUDIO
;
$
(
".coview_share_title_name"
).
text
(
"音声通話"
);
}
/* --------------------------------------------------- */
/* Video, photo, chat, doc */
/* --------------------------------------------------- */
$
(
"#coviewShareChat"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareChat"
);
});
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
});
$
(
"#coviewSharePhoto"
).
on
(
"click"
,
function
(
e
)
{
e
.
stopPropagation
();
console
.
log
(
"ON click coviewSharePhoto"
);
if
(
$
(
".coview_share_photo_select_bubble"
).
is
(
':visible'
)
==
true
)
{
$
(
".coview_share_photo_select_bubble"
).
slideUp
();
}
else
{
$
(
".coview_share_photo_select_bubble"
).
slideDown
();
}
});
/* --------------------------------------------------- */
/* Video, photo, chat, doc */
/* --------------------------------------------------- */
$
(
"#coviewShareChat"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareChat"
);
});
$
(
"#coviewSharePhoto"
).
on
(
"click"
,
function
(
e
)
{
e
.
stopPropagation
();
console
.
log
(
"ON click coviewSharePhoto"
);
if
(
$
(
".coview_share_photo_select_bubble"
).
is
(
':visible'
)
==
true
)
{
$
(
".coview_share_photo_select_bubble"
).
slideUp
();
}
else
{
$
(
".coview_share_photo_select_bubble"
).
slideDown
();
}
});
$
(
"#coviewSharePhotoCamera"
).
on
(
"click"
,
function
()
{
$
(
".coview_share_photo_select_bubble"
).
hide
();
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
CAMERA
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
".coview_share_title_name"
).
text
(
"カメラ"
);
});
$
(
"#coviewSharePhotoGallery"
).
on
(
"click"
,
function
()
{
$
(
".coview_share_photo_select_bubble"
).
hide
();
globalUserInfo
.
coWorkType
=
"gallery"
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
"#coviewSharePhotoCamera"
).
on
(
"click"
,
function
()
{
$
(
".coview_share_photo_select_bubble"
).
hide
();
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
CAMERA
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
".coview_share_title_name"
).
text
(
"ライブラリ"
);
});
$
(
".coview_share_title_name"
).
text
(
"カメラ"
);
});
$
(
"#coviewSharePhotoGallery"
).
on
(
"click"
,
function
()
{
$
(
".coview_share_photo_select_bubble"
).
hide
();
globalUserInfo
.
coWorkType
=
"gallery"
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
"#coviewShareAudio"
).
on
(
"click"
,
function
()
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
AUDIO
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
".coview_share_title_name"
).
text
(
"ライブラリ"
);
});
$
(
".coview_share_title_name"
).
text
(
"音声通話"
);
})
$
(
"#coviewShareAudio"
).
on
(
"click"
,
function
()
{
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
AUDIO
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
".coview_share_title_name"
).
text
(
"音声通話"
);
})
$
(
"#coviewShareLive"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareLive"
);
globalUserInfo
.
coWorkType
=
"video"
;
console
.
log
(
"globalUserInfo"
,
globalUserInfo
);
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
"#coviewShareLive"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareLive"
);
globalUserInfo
.
coWorkType
=
"video"
;
console
.
log
(
"globalUserInfo"
,
globalUserInfo
);
$
(
".coview_share_title_name"
).
text
(
"LIVE"
);
});
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
$
(
".coview_share_title_name"
).
text
(
"LIVE"
);
});
// $("#coviewShareDoc").on("click", function(){
// console.log("ON click coviewShareDoc");
...
...
@@ -138,59 +136,59 @@ $(function() {
// globalUserInfo.coWorkType = "audio";
// });
coview_api
.
addEventListener
(
"ready"
,
function
()
{
console
.
log
(
"=============> READY : ready for coview api"
);
coview_api
.
Login
(
globalUserInfo
.
loginId
);
});
coview_api
.
addEventListener
(
"start"
,
function
()
{
console
.
log
(
"=============> START : share start"
);
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"destroy"
,
function
()
{
console
.
log
(
"=============> START : share start"
);
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"message"
,
async
function
(
event
,
json
)
{
console
.
log
(
"+++ addEventListener"
,
json
);
console
.
log
(
"processMessage api = "
,
json
.
api
);
let
loginIdList
=
new
Array
();
switch
(
json
.
api
){
case
"LoginResponse"
:
console
.
log
(
'------------------------------'
);
console
.
log
(
globalUserInfo
.
coWorkType
);
console
.
log
(
collaborationJoinFlg
);
if
(
collaborationJoinFlg
==
'1'
)
{
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
}
else
if
(
collaborationJoinFlg
==
'0'
)
{
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
}
Coview_moveToVideoShareArea
();
coview_api
.
addEventListener
(
"ready"
,
function
()
{
console
.
log
(
"=============> READY : ready for coview api"
);
coview_api
.
Login
(
globalUserInfo
.
loginId
);
});
coview_api
.
addEventListener
(
"start"
,
function
()
{
console
.
log
(
"=============> START : share start"
);
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"destroy"
,
function
()
{
console
.
log
(
"=============> START : share start"
);
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"message"
,
async
function
(
event
,
json
)
{
console
.
log
(
"+++ addEventListener"
,
json
);
console
.
log
(
"processMessage api = "
,
json
.
api
);
let
loginIdList
=
new
Array
();
switch
(
json
.
api
){
case
"LoginResponse"
:
console
.
log
(
'------------------------------'
);
console
.
log
(
globalUserInfo
.
coWorkType
);
console
.
log
(
collaborationJoinFlg
);
if
(
collaborationJoinFlg
==
'1'
)
{
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
}
else
if
(
collaborationJoinFlg
==
'0'
)
{
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
}
Coview_moveToVideoShareArea
();
break
;
case
"CreateRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
var
coviewInviteMessage
=
""
+
messageSeperator
+
messageType
.
COMMUNICATIONSTART
+
messageSeperator
+
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
);
socket
.
emit
(
'createMessage'
,
{
text
:
coviewInviteMessage
},
0
);
}
else
{
}
case
"CreateRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
var
coviewInviteMessage
=
""
+
messageSeperator
+
messageType
.
COMMUNICATIONSTART
+
messageSeperator
+
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
);
socket
.
emit
(
'createMessage'
,
{
text
:
coviewInviteMessage
},
0
);
}
else
{
}
break
;
case
"JoinRoomInfoResponse"
:
if
(
json
.
resultCode
==
200
)
{
}
else
{
alert
(
"Not exist sharing call ("
+
json
.
resultCode
+
")
\
nPlease using share menu."
);
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
}
break
;
case
"JoinRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
case
"JoinRoomInfoResponse"
:
if
(
json
.
resultCode
==
200
)
{
}
else
{
alert
(
"Not exist sharing call ("
+
json
.
resultCode
+
")
\
nPlease using share menu."
);
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
}
break
;
case
"JoinRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
...
...
@@ -198,23 +196,23 @@ $(function() {
}
else
{
}
break
;
case
"RoomMemberJoinedEvent"
:
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
CHAT_UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
case
"RoomMemberLeavedEvent"
:
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
CHAT_UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
default
:
console
.
log
(
'Unrecognized api'
,
json
);
break
;
case
"RoomMemberJoinedEvent"
:
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
CHAT_UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
case
"RoomMemberLeavedEvent"
:
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
CHAT_UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
default
:
console
.
log
(
'Unrecognized api'
,
json
);
break
;
}
});
});
});
function
Coview_shareDropdownHide
()
{
...
...
public_new/modal_collabo_profile.html
View file @
14505b01
...
...
@@ -3,13 +3,13 @@
<div
class=
"modal-dialog modal-dialog-centered"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header border-0"
>
<div
class=
"profile_desc d-flex flex-row"
>
<img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
/>
<div
class=
"profile_name"
><span>
{{name}}
</span></div>
</div>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
<div
class=
"profile_desc_ d-flex flex-row"
>
<img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
/>
<div
class=
"profile_name"
><span>
{{name}}
</span></div>
</div>
</div>
<div
class=
"modal-body"
>
{{#groupPathList}}
...
...
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