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
4db50925
Commit
4db50925
authored
Apr 19, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
写真協業実装
parent
6638f5dd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
23 deletions
+93
-23
public_new/chat_room.html
+1
-1
public_new/js/chat-ui.js
+30
-12
public_new/js/chat-util.js
+47
-0
public_new/js/constant.js
+7
-1
public_new/js/share.js
+2
-3
public_new/template/template_open_collaboration_message.html
+5
-5
public_new/template/template_user_list.html
+1
-1
No files found.
public_new/chat_room.html
View file @
4db50925
...
...
@@ -187,7 +187,7 @@
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
CMS_SERVER_URL
=
cmsServerUrl
;
...
...
public_new/js/chat-ui.js
View file @
4db50925
...
...
@@ -1268,19 +1268,36 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
}
checkBeforeDate
=
messageTime
.
createdAtDay
;
beforeDate
=
message
.
insertDate
;
if
(
message
.
messageType
==
messageType
.
COMMUNICATIONSTART
||
message
.
messageType
==
messageType
.
COMMUNICATIONEND
)
{
var
collaborationInfo
=
JSON
.
parse
(
message
.
message
);
var
userInCollaboration
=
JSON
.
parse
(
android
.
getUserInfoList
(
collaborationInfo
.
userList
));
let
html
=
Mustache
.
render
(
template
,
{
text
:
message
.
message
,
from
:
message
.
loginId
,
shopMemberId
:
message
.
shopMemberId
,
profileImage
:
message
.
profileUrl
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
,
unreadCount
:
message
.
unreadCount
,
isToday
:
isToday
});
html
=
message
.
message
.
includes
(
'attachedImages'
)
||
message
.
message
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
workVal
=
html
+
workVal
;
console
.
log
(
messageTime
);
userInCollaboration
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
})
let
html
=
Mustache
.
render
(
template
,
{
roomName
:
roomName
,
userCount
:
userInCollaboration
.
length
,
userList
:
userInCollaboration
.
length
>
3
?
userInCollaboration
.
slice
(
0
,
3
)
:
userInCollaboration
,
insertDate
:
message
.
insertDate
});
html
=
message
.
message
.
includes
(
'attachedImages'
)
||
message
.
message
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
workVal
=
html
+
workVal
;
}
else
{
let
html
=
Mustache
.
render
(
template
,
{
text
:
message
.
message
,
from
:
message
.
loginId
,
shopMemberId
:
message
.
shopMemberId
,
profileImage
:
message
.
profileUrl
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
,
unreadCount
:
message
.
unreadCount
,
isToday
:
isToday
});
html
=
message
.
message
.
includes
(
'attachedImages'
)
||
message
.
message
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
workVal
=
html
+
workVal
;
}
})
// メッセージの画面描画
...
...
@@ -1301,6 +1318,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
CHAT_UI
.
waitForLoadingImage
(
jQueryMessages
,
CHAT_UI
.
scrollToBottom
);
// ユーザ削除ボタン表示しない
$
(
"#userSelectionDeleteBtn"
).
hide
();
setInterval
(
updateDuration
,
1000
);
CHAT_UI
.
scrollToBottom
();
};
...
...
public_new/js/chat-util.js
View file @
4db50925
...
...
@@ -89,3 +89,49 @@ CHAT_UTIL.findDow = function(data) {
}
return
dow
;
}
function
msToTime
(
s
)
{
var
ms
=
s
%
1000
;
s
=
(
s
-
ms
)
/
1000
;
var
secs
=
s
%
60
;
s
=
(
s
-
secs
)
/
60
;
var
mins
=
s
%
60
;
var
hrs
=
(
s
-
mins
)
/
60
;
return
hrs
+
':'
+
mins
+
':'
+
secs
;
}
function
updateDuration
()
{
var
now
=
new
Date
();
console
.
log
(
'updateDuration'
);
$
(
'.collaboration_duration'
).
each
(
function
()
{
var
insertDateString
=
$
(
this
).
data
(
'insertdate'
);
insertDateString
=
insertDateString
.
toString
();
var
insertDateString
=
"20210414103256"
;
var
year
=
insertDateString
.
substring
(
0
,
4
);
var
month
=
insertDateString
.
substring
(
4
,
6
);
var
day
=
insertDateString
.
substring
(
6
,
8
);
var
hour
=
insertDateString
.
substring
(
8
,
10
);
var
min
=
insertDateString
.
substring
(
10
,
12
);
var
sec
=
insertDateString
.
substring
(
12
,
14
);
var
insertDate
=
new
Date
(
year
,
month
-
1
,
day
,
hour
,
min
,
sec
);
$
(
this
).
html
(
msToTime
(
now
-
insertDate
));
});
}
CHAT_UTIL
.
getCollaborationType
=
function
(
key
)
{
switch
(
key
)
{
case
collaborationTypeKey
.
AUDIO
:
return
collaborationType
.
AUDIO
;
break
;
case
collaborationTypeKey
.
CAMERA
:
return
collaborationType
.
CAMERA
;
break
;
case
collaborationTypeKey
.
VIDEO
:
return
collaborationType
.
VIDEO
;
break
;
default
:
return
0
;
break
;
}
}
\ No newline at end of file
public_new/js/constant.js
View file @
4db50925
...
...
@@ -38,11 +38,17 @@ const nameCardAreaId = {
}
const
collaborationTypeKey
=
{
CAMERA
:
"camera"
,
AUDIO
:
"audio"
,
CAMERA
:
"camera"
,
VIDEO
:
"video"
}
const
collaborationType
=
{
AUDIO
:
0
,
CAMERA
:
2
,
VIDEO
:
3
}
const
makeRoomFlg
=
{
NAME_CARD
:
0
,
MAKE_ROOM
:
1
...
...
public_new/js/share.js
View file @
4db50925
...
...
@@ -152,7 +152,6 @@ $(function(){
switch
(
json
.
api
){
case
"LoginResponse"
:
if
(
globalUserInfo
.
coWorkType
=
collaborationTypeKey
.
CAMERA
)
{
globalUserInfo
.
coWorkType
=
"camera"
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
}
...
...
@@ -160,9 +159,9 @@ $(function(){
break
;
case
"CreateRoomResponse"
:
if
(
json
.
resultCode
==
200
){
var
coviewInviteMessage
=
"
coviewsharerequest:"
+
globalUserInfo
.
coWorkType
;
var
coviewInviteMessage
=
"
"
+
messageSeperator
+
messageType
.
COMMUNICATIONSTART
+
messageSeperator
+
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
)
;
socket
.
emit
(
'createMessage'
,
{
text
:
coviewInviteMessage
+
messageSeperator
+
messageType
.
COMMUNICATIONSTART
text
:
coviewInviteMessage
},
0
);
}
else
{
...
...
public_new/template/template_open_collaboration_message.html
View file @
4db50925
...
...
@@ -12,13 +12,13 @@
</div>
<div
class=
"d-flex flex-row justify-content-between"
>
<div
class=
"collabo_user_list d-flex flex-row"
>
<div
class=
"img_wrap"
><img
src=
"img/noImage.png"
alt=
"プロフィール画像"
></div>
<div
class=
"img_wrap"
><img
src=
"
img/noImage.png"
alt=
"プロフィール画像
"
></div>
<div
class=
"img_wrap"
><img
src=
"img/noImage.png"
alt=
"プロフィール画像"
></div>
<div
class=
"num"
><span>
10
</span></div>
{{#userList}}
<div
class=
"img_wrap"
><img
src=
"
{{profileUrl}}"
onError=
"this.src='./img/noImage.png'
"
></div>
{{/userList}}
<div
class=
"num"
><span>
{{userCount}}
</span></div>
</div>
<div
class=
"collabo_time"
>
<span
>
1:10:20
</span>
<span
class=
"collaboration_duration"
data-insertDate=
"{{insertDate}}"
>
</span>
</div>
</div>
<div
class=
"collabo_btn"
>
...
...
public_new/template/template_user_list.html
View file @
4db50925
...
...
@@ -5,7 +5,7 @@
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail"
>
<div
class=
"img_wrap"
><img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
/></div>
<div
class=
"img_wrap"
><img
src=
"{{profileUrl}}"
onError=
"this.src='./img/noImage.png'"
/></div>
</div>
</div>
<div
class=
"chat_item_m px-0"
>
...
...
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