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
0878e0dc
Commit
0878e0dc
authored
Jun 08, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed const name case
parent
87f38391
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
58 deletions
+45
-58
public_new/js/chat-util.js
+11
-11
public_new/js/chat.js
+12
-12
public_new/js/constant.js
+5
-18
public_new/js/share.js
+17
-17
No files found.
public_new/js/chat-util.js
View file @
0878e0dc
...
...
@@ -122,13 +122,13 @@ function updateDuration() {
CHAT_UTIL
.
getCollaborationType
=
function
(
key
)
{
switch
(
key
)
{
case
c
ollaborationTypeKey
.
AUDIO
:
case
C
ollaborationTypeKey
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
case
c
ollaborationTypeKey
.
CAMERA
:
case
C
ollaborationTypeKey
.
CAMERA
:
return
COLLABORATION_TYPE
.
CAMERA
;
case
c
ollaborationTypeKey
.
VIDEO
:
case
C
ollaborationTypeKey
.
VIDEO
:
return
COLLABORATION_TYPE
.
VIDEO
;
case
c
ollaborationTypeKey
.
DOCUMENT
:
case
C
ollaborationTypeKey
.
DOCUMENT
:
return
COLLABORATION_TYPE
.
DOCUMENT
;
default
:
return
0
;
...
...
@@ -140,17 +140,17 @@ CHAT_UTIL.getCoviewTypeFromCollaborationType = function (
)
{
switch
(
joinCollaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
console
.
log
(
c
ollaborationTypeKey
.
AUDIO
);
return
c
ollaborationTypeKey
.
AUDIO
;
console
.
log
(
C
ollaborationTypeKey
.
AUDIO
);
return
C
ollaborationTypeKey
.
AUDIO
;
case
COLLABORATION_TYPE
.
CAMERA
:
console
.
log
(
c
ollaborationTypeKey
.
CAMERA
);
return
c
ollaborationTypeKey
.
CAMERA
;
console
.
log
(
C
ollaborationTypeKey
.
CAMERA
);
return
C
ollaborationTypeKey
.
CAMERA
;
case
COLLABORATION_TYPE
.
VIDEO
:
return
c
ollaborationTypeKey
.
VIDEO
;
return
C
ollaborationTypeKey
.
VIDEO
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
return
c
ollaborationTypeKey
.
DOCUMENT
;
return
C
ollaborationTypeKey
.
DOCUMENT
;
case
COLLABORATION_TYPE
.
BOARD
:
return
c
ollaborationTypeKey
.
BOARD
;
return
C
ollaborationTypeKey
.
BOARD
;
default
:
return
0
;
}
...
...
public_new/js/chat.js
View file @
0878e0dc
...
...
@@ -197,7 +197,7 @@ CHAT.uploadImage = function (formData) {
socket
.
emit
(
"createMessage"
,
{
text
:
encodedText
+
messageSeperator
+
m
essageType
.
IMAGE
,
text
:
encodedText
+
messageSeperator
+
M
essageType
.
IMAGE
,
},
1
);
...
...
@@ -253,7 +253,7 @@ CHAT.uploadImage = function (formData) {
socket
.
emit
(
"createMessage"
,
{
text
:
encodedText
+
messageSeperator
+
m
essageType
.
VIDEO
,
text
:
encodedText
+
messageSeperator
+
M
essageType
.
VIDEO
,
},
1
);
...
...
@@ -603,7 +603,7 @@ document.addEventListener('DOMContentLoaded', function() {
if
(
message
.
shopMemberId
==
CHAT
.
globalLoginParameter
.
shopMemberId
)
{
template
=
myMessageTemplate
;
}
if
(
message
.
messageType
==
m
essageType
.
SYSTEM
)
{
if
(
message
.
messageType
==
M
essageType
.
SYSTEM
)
{
template
=
systemMessageTemplate
;
}
let
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
insertDate
);
...
...
@@ -644,7 +644,7 @@ document.addEventListener('DOMContentLoaded', function() {
// チャットルーム検索
CHAT
.
searchRoom
=
function
(
keyword
,
rooms
)
{
$
(
".overlay_src_msg"
).
empty
();
rooms
=
CHAT_DB
.
getRoomList
(
c
hatRoomType
.
ALL
,
keyword
);
rooms
=
CHAT_DB
.
getRoomList
(
C
hatRoomType
.
ALL
,
keyword
);
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
$
(
"#chatTitle"
).
text
(
roomListTitle
);
var
template
;
...
...
@@ -663,18 +663,18 @@ CHAT.searchRoom = function (keyword, rooms) {
}
var
displayMsg
;
if
(
room
.
messageType
==
m
essageType
.
TEXT
||
room
.
messageType
==
m
essageType
.
SYSTEM
room
.
messageType
==
M
essageType
.
TEXT
||
room
.
messageType
==
M
essageType
.
SYSTEM
)
displayMsg
=
room
.
message
;
if
(
room
.
messageType
==
m
essageType
.
IMAGE
)
if
(
room
.
messageType
==
M
essageType
.
IMAGE
)
displayMsg
=
getLocalizedString
(
"image"
);
if
(
room
.
messageType
==
m
essageType
.
VIDEO
)
if
(
room
.
messageType
==
M
essageType
.
VIDEO
)
displayMsg
=
getLocalizedString
(
"video"
);
if
(
room
.
messageType
==
m
essageType
.
TEXT
)
displayMsg
=
room
.
message
;
if
(
room
.
messageType
==
m
essageType
.
COMMUNICATIONSTART
)
if
(
room
.
messageType
==
M
essageType
.
TEXT
)
displayMsg
=
room
.
message
;
if
(
room
.
messageType
==
M
essageType
.
COMMUNICATIONSTART
)
displayMsg
=
getLocalizedString
(
"collaboration_start"
);
if
(
room
.
messageType
==
m
essageType
.
COMMUNICATIONEND
)
if
(
room
.
messageType
==
M
essageType
.
COMMUNICATIONEND
)
displayMsg
=
getLocalizedString
(
"collaboration_end"
);
var
attendUserName
=
[];
room
.
attendUsers
.
forEach
(
function
(
user
)
{
...
...
@@ -743,7 +743,7 @@ CHAT.searchMessage = function (keyword, workVal) {
if
(
message
.
shopMemberId
==
CHAT
.
globalLoginParameter
.
shopMemberId
)
{
template
=
myMessageTemplate
;
}
if
(
message
.
messageType
==
m
essageType
.
SYSTEM
)
{
if
(
message
.
messageType
==
M
essageType
.
SYSTEM
)
{
template
=
systemMessageTemplate
;
}
let
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
insertDate
);
...
...
public_new/js/constant.js
View file @
0878e0dc
...
...
@@ -9,7 +9,7 @@ const readyState = {
COMPLETED
:
4
,
};
const
m
essageType
=
{
const
M
essageType
=
{
TEXT
:
0
,
IMAGE
:
1
,
VIDEO
:
2
,
...
...
@@ -18,26 +18,13 @@ const messageType = {
COMMUNICATIONEND
:
5
,
};
const
userAPICmd
=
{
MYINFO
:
9
,
};
const
chatRoomType
=
{
const
ChatRoomType
=
{
DM
:
"1"
,
GROUP
:
"0"
,
ALL
:
"2"
,
};
const
groupSearchFlg
=
{
ROOT
:
"0"
,
};
const
nameCardAreaId
=
{
MY
:
"myNamecard"
,
USER
:
"userNamecard"
,
};
const
collaborationTypeKey
=
{
const
CollaborationTypeKey
=
{
AUDIO
:
"audio"
,
CAMERA
:
"camera"
,
VIDEO
:
"video"
,
...
...
@@ -53,7 +40,7 @@ const COLLABORATION_TYPE = {
BOARD
:
5
,
};
const
makeRoomFl
g
=
{
const
MakeRoomFla
g
=
{
NAME_CARD
:
0
,
MAKE_ROOM
:
1
,
};
...
...
@@ -62,7 +49,7 @@ const ANDROID_SDK_VERSION = {
O
:
26
,
};
const
H
OST_REQUEST_FLG
=
{
const
H
ostRequestFlag
=
{
DONE
:
0
,
DOING
:
1
,
};
...
...
public_new/js/share.js
View file @
0878e0dc
...
...
@@ -50,14 +50,14 @@ document.addEventListener('DOMContentLoaded', function() {
$
(
document
).
on
(
"click"
,
".coview_share_request"
,
function
()
{
console
.
log
(
"globalUserInfo"
,
globalUserInfo
);
if
(
$
(
this
).
hasClass
(
c
ollaborationTypeKey
.
VIDEO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
c
ollaborationTypeKey
.
VIDEO
;
if
(
$
(
this
).
hasClass
(
C
ollaborationTypeKey
.
VIDEO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
C
ollaborationTypeKey
.
VIDEO
;
$
(
".coview_share_title_name"
).
text
(
"LIVE"
);
}
else
if
(
$
(
this
).
hasClass
(
c
ollaborationTypeKey
.
CAMERA
)
==
true
)
{
globalUserInfo
.
coWorkType
=
c
ollaborationTypeKey
.
CAMERA
;
}
else
if
(
$
(
this
).
hasClass
(
C
ollaborationTypeKey
.
CAMERA
)
==
true
)
{
globalUserInfo
.
coWorkType
=
C
ollaborationTypeKey
.
CAMERA
;
$
(
".coview_share_title_name"
).
text
(
"ライブラリ"
);
}
else
if
(
$
(
this
).
hasClass
(
c
ollaborationTypeKey
.
AUDIO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
c
ollaborationTypeKey
.
AUDIO
;
}
else
if
(
$
(
this
).
hasClass
(
C
ollaborationTypeKey
.
AUDIO
)
==
true
)
{
globalUserInfo
.
coWorkType
=
C
ollaborationTypeKey
.
AUDIO
;
$
(
".coview_share_title_name"
).
text
(
"音声通話"
);
}
...
...
@@ -85,7 +85,7 @@ document.addEventListener('DOMContentLoaded', function() {
$
(
"#coviewSharePhotoCamera"
).
on
(
"click"
,
function
()
{
$
(
".coview_share_photo_select_bubble"
).
hide
();
globalUserInfo
.
coWorkType
=
c
ollaborationTypeKey
.
CAMERA
;
globalUserInfo
.
coWorkType
=
C
ollaborationTypeKey
.
CAMERA
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
...
...
@@ -322,13 +322,13 @@ document.addEventListener('DOMContentLoaded', function() {
let
loginIdList
=
new
Array
();
switch
(
json
.
api
)
{
case
"LoginResponse"
:
if
(
globalUserInfo
.
coWorkType
==
c
ollaborationTypeKey
.
DOCUMENT
)
{
if
(
globalUserInfo
.
coWorkType
==
C
ollaborationTypeKey
.
DOCUMENT
)
{
isDocument
=
true
;
globalUserInfo
.
coWorkType
=
c
ollaborationTypeKey
.
AUDIO
;
globalUserInfo
.
coWorkType
=
C
ollaborationTypeKey
.
AUDIO
;
}
if
(
globalUserInfo
.
coWorkType
==
c
ollaborationTypeKey
.
BOARD
)
{
if
(
globalUserInfo
.
coWorkType
==
C
ollaborationTypeKey
.
BOARD
)
{
isBoard
=
true
;
globalUserInfo
.
coWorkType
=
c
ollaborationTypeKey
.
AUDIO
;
globalUserInfo
.
coWorkType
=
C
ollaborationTypeKey
.
AUDIO
;
}
hostSearchInterval
();
if
(
collaborationJoinFlg
==
"1"
)
{
...
...
@@ -365,23 +365,23 @@ document.addEventListener('DOMContentLoaded', function() {
coviewInviteMessage
=
""
+
messageSeperator
+
m
essageType
.
COMMUNICATIONSTART
+
M
essageType
.
COMMUNICATIONSTART
+
messageSeperator
+
CHAT_UTIL
.
getCollaborationType
(
c
ollaborationTypeKey
.
DOCUMENT
)
+
CHAT_UTIL
.
getCollaborationType
(
C
ollaborationTypeKey
.
DOCUMENT
)
+
messageSeperator
+
meetingId
;
}
else
if
(
isBoard
)
{
coviewInviteMessage
=
""
+
messageSeperator
+
m
essageType
.
COMMUNICATIONSTART
+
M
essageType
.
COMMUNICATIONSTART
+
messageSeperator
+
COLLABORATION_TYPE
.
BOARD
;
}
else
{
coviewInviteMessage
=
""
+
messageSeperator
+
m
essageType
.
COMMUNICATIONSTART
+
M
essageType
.
COMMUNICATIONSTART
+
messageSeperator
+
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
);
}
...
...
@@ -576,7 +576,7 @@ function initCollaborationUI(changeCollaborationType) {
}
if
(
CHAT_UTIL
.
isIOS
)
{
roomType
=
CHAT_DB
.
getRoomType
();
if
(
roomType
==
c
hatRoomType
.
DM
)
{
if
(
roomType
==
C
hatRoomType
.
DM
)
{
$
(
".add_user_btn"
).
removeClass
(
"none"
);
}
}
...
...
@@ -733,7 +733,7 @@ function applyForHostChange() {
}
function
Coview_connect_audio_collaboration
()
{
globalUserInfo
.
coWorkType
=
c
ollaborationTypeKey
.
AUDIO
;
globalUserInfo
.
coWorkType
=
C
ollaborationTypeKey
.
AUDIO
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
...
...
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