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
b1af7455
Commit
b1af7455
authored
May 12, 2021
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ホスト変更機能実装
parent
0af9fdc9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
21 deletions
+45
-21
public_new/collaboration_overlay_user_list.html
+1
-1
public_new/js/chat-ui.js
+4
-18
public_new/js/share.js
+28
-0
public_new/modal_collabo_profile.html
+12
-2
No files found.
public_new/collaboration_overlay_user_list.html
View file @
b1af7455
<div
class=
"user_list_wrap"
>
<div
class=
"user_list d-flex flex-wrap"
>
{{#joinedUserList}}
<div
class=
"user_item
{{isHost
}}"
>
<div
class=
"user_item
"
id=
"collaboration_user_{{loginId
}}"
>
<a
href=
"#"
data-toggle=
"modal"
data-target=
"#profileModal1"
onclick=
"CHAT_UI.makeNameCardInCollaboration({{shopMemberId}})"
>
<div
class=
"img_wrap"
><img
src=
"{{profileUrl}}"
alt=
"this.src='./img/noImage.png'"
/></div>
<span
class=
"name"
>
{{shopMemberName}}
</span>
...
...
public_new/js/chat-ui.js
View file @
b1af7455
...
...
@@ -2485,7 +2485,7 @@ CHAT_UI.startCollaboration = function(collaborationType) {
}
CHAT_UI
.
refreshJoinedCollaboration
=
function
(
loginIdList
,
hostName
)
{
CHAT_UI
.
refreshJoinedCollaboration
=
function
(
loginIdList
)
{
CHAT_UI
.
showLoadingIndicator
();
$
(
'#collaboration_overlay_user_list'
).
html
(
''
);
...
...
@@ -2498,9 +2498,7 @@ CHAT_UI.refreshJoinedCollaboration = function(loginIdList, hostName) {
var
joinedUserList
=
CHAT_DB
.
getUserListByLoginId
(
loginIdList
);
joinedUserList
.
forEach
(
function
(
user
)
{
console
.
log
(
"is host = "
+
(
user
.
loginId
==
hostName
));
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
user
.
isHost
=
user
.
loginId
==
hostName
?
"host"
:
""
;
})
let
html
=
Mustache
.
render
(
joinedUserListTemplate
,
{
...
...
@@ -2718,7 +2716,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) {
}
CHAT_UI
.
makeNameCardInCollaboration
=
function
(
shopMemberId
,
isCollaborationHost
)
{
CHAT_UI
.
makeNameCardInCollaboration
=
function
(
shopMemberId
)
{
if
(
CHAT
.
globalLoginParameter
.
shopMemberId
==
shopMemberId
)
{
return
;
}
...
...
@@ -2732,19 +2730,7 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId, isCollaborationHost
namecardTemplate
=
text
;
});
if
(
isCollaborationHost
!=
"host"
)
{
$
.
get
({
url
:
"./modal_collabo_change_host.html"
,
async
:
false
}
,
function
(
text
)
{
changeHostTemplate
=
text
;
});
let
changeHostHtml
=
Mustache
.
render
(
changeHostTemplate
,
{
shopMemberId
:
nameCardInfo
.
shopMemberId
});
let
changeHostObj
=
$
(
jQuery
.
parseHTML
(
changeHostHtml
)).
on
(
'click'
,
function
()
{
});
$
(
'#modal_collabo_profile2'
).
html
(
changeHostObj
);
}
let
isCollaborationHost
=
coview_api
.
getRoomUsers
();
nameCardInfo
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
nameCardInfo
.
profileUrl
);
let
namecardHtml
=
Mustache
.
render
(
namecardTemplate
,
{
shopMemberId
:
nameCardInfo
.
shopMemberId
,
...
...
@@ -2753,7 +2739,7 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId, isCollaborationHost
name
:
nameCardInfo
.
shopMemberName
,
groupPathList
:
nameCardInfo
.
groupPathList
,
isFavorite
:
nameCardInfo
.
isFavorite
,
isHost
:
isCollaborationHost
==
"host"
?
true
:
false
isHost
:
isCollaborationHost
});
let
namecardObj
=
$
(
jQuery
.
parseHTML
(
namecardHtml
)).
on
(
'click'
,
function
()
{
...
...
public_new/js/share.js
View file @
b1af7455
...
...
@@ -4,6 +4,7 @@
let
coview_api
=
new
CoviewApi
();
var
isDocument
=
false
;
let
isLeaved
=
false
;
let
timeInterval
=
null
;
$
(
function
()
{
var
coviewApiActive
=
coview_api
.
Init
(
{
...
...
@@ -222,6 +223,7 @@ $(function() {
}
break
;
case
"JoinRoomResponse"
:
hostSearchInterval
();
if
(
json
.
resultCode
==
200
)
{
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
...
...
@@ -268,6 +270,7 @@ function Coview_exitCollaboration(isDocument = false) {
android
.
exitMeetingRoom
();
}
}
clearInterval
(
timeInterval
);
coview_api
.
LeaveRoom
();
isLeaved
=
true
;
if
(
collaborationJoinFlg
!=
'2'
)
{
...
...
@@ -298,3 +301,27 @@ function Coview_connect_audio_collaboration() {
$
(
".coview_share_title_name"
).
text
(
"音声通話"
);
}
function
hostSearchInterval
()
{
let
hostName
=
""
;
function
hostSearch
()
{
if
(
hostName
!=
g_isMainManUsername
)
{
if
(
hostName
!=
""
)
{
$
(
"#collaboration_user_"
+
hostName
).
removeClass
(
"host"
);
}
$
(
"#collaboration_user_"
+
g_isMainManUsername
).
addClass
(
"host"
);
hostName
=
g_isMainManUsername
;
}
else
{
if
(
hostName
==
""
)
{
if
(
!
$
(
"#collaboration_user_"
+
CHAT
.
globalLoginParameter
.
loginId
).
hasClass
(
"host"
)
&&
coview_api
.
getRoomUsers
())
{
$
(
"#collaboration_user_"
+
CHAT
.
globalLoginParameter
.
loginId
).
addClass
(
"host"
);
}
}
else
{
if
(
!
$
(
"#collaboration_user_"
+
hostName
).
hasClass
(
'host'
))
{
$
(
"#collaboration_user_"
+
hostName
).
addClass
(
"host"
);
}
}
}
}
timeInterval
=
setInterval
(
hostSearch
,
3000
);
}
\ No newline at end of file
public_new/modal_collabo_profile.html
View file @
b1af7455
...
...
@@ -37,7 +37,17 @@
</div>
</button>
{{/isFavorite}}
<!-- {{^isHost}}-->
{{#isHost}}
<button
type=
"button"
class=
"ch_host_btn border-0 bg_green text_white"
onclick=
"Coview_changeHost('{{loginId}}');"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
<img
src=
"icon/icon_change_host.png"
alt=
"ホスト変更"
>
</div>
<span>
ホスト変更
</span>
</div>
</button>
{{/isHost}}
{{^isHost}}
<button
type=
"button"
class=
"ch_host_btn border-0 bg_grey text_white"
onclick=
"Coview_changeHost('{{loginId}}');"
disabled
>
<div
class=
"d-flex flex-column"
>
<div
class=
"img_wrap"
>
...
...
@@ -46,7 +56,7 @@
<span>
ホスト変更
</span>
</div>
</button>
<!-- {{/isHost}}-->
{{/isHost}}
</div>
</div>
</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