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
2622f6b8
Commit
2622f6b8
authored
Sep 10, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed class to function for not to use es6
parent
c64b670e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
148 deletions
+107
-148
public_new/js/Models/coview-userinfo.js
+59
-70
public_new/js/Models/deviceinfo.js
+14
-20
public_new/js/Models/roominfo.js
+5
-10
public_new/js/Models/serverinfo.js
+5
-11
public_new/js/Models/socket-joininfo.js
+8
-16
public_new/js/Models/userinfo.js
+16
-21
No files found.
public_new/js/Models/coview-userinfo.js
View file @
2622f6b8
...
@@ -6,84 +6,73 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () {
...
@@ -6,84 +6,73 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () {
}
}
};
};
var
CoviewUserInfo
=
class
{
function
CoviewUserInfo
(
sid
,
loginId
,
roomId
,
shopName
)
{
sid
;
this
.
sid
=
sid
;
loginId
;
this
.
loginId
=
loginId
;
roomId
;
this
.
roomId
=
roomId
;
shopName
;
this
.
shopName
=
shopName
;
collaborationType
;
const
unwrappedType
=
NativeBridgeDataSource
.
getJoinCollaborationType
();
joinType
;
this
.
collaborationType
=
this
.
parseNumberToCoworkType
(
unwrappedType
);
isLeaved
;
this
.
joinType
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
meetingID
;
constructor
(
sid
,
loginId
,
roomId
,
shopName
)
{
this
.
isLeaved
=
false
;
this
.
sid
=
sid
;
this
.
meetingID
=
0
;
this
.
loginId
=
loginId
;
}
this
.
roomId
=
roomId
;
this
.
shopName
=
shopName
;
const
unwrappedType
=
NativeBridgeDataSource
.
getJoinCollaborationType
();
this
.
collaborationType
=
this
.
parseNumberToCoworkType
(
unwrappedType
);
this
.
joinType
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
this
.
isLeaved
=
false
;
CoviewUserInfo
.
prototype
.
coWorkType
=
function
()
{
this
.
meetingID
=
0
;
switch
(
this
.
collaborationType
)
{
}
case
COLLABORATION_TYPE
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
get
coWorkType
()
{
case
COLLABORATION_TYPE
.
CAMERA
:
switch
(
this
.
collaborationType
)
{
return
COLLABORATION_TYPE
.
CAMERA
;
case
COLLABORATION_TYPE
.
AUDIO
:
case
COLLABORATION_TYPE
.
VIDEO
:
return
COLLABORATION_TYPE
.
AUDIO
;
return
COLLABORATION_TYPE
.
VIDEO
;
case
COLLABORATION_TYPE
.
CAMERA
:
case
COLLABORATION_TYPE
.
DOCUMENT
:
return
COLLABORATION_TYPE
.
CAMERA
;
return
COLLABORATION_TYPE
.
AUDIO
;
case
COLLABORATION_TYPE
.
VIDEO
:
case
COLLABORATION_TYPE
.
BOARD
:
return
COLLABORATION_TYPE
.
VIDEO
;
return
COLLABORATION_TYPE
.
AUDIO
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
return
COLLABORATION_TYPE
.
AUDIO
;
case
COLLABORATION_TYPE
.
BOARD
:
return
COLLABORATION_TYPE
.
AUDIO
;
}
}
}
};
isInvited
()
{
CoviewUserInfo
.
prototype
.
isInvited
=
function
()
{
return
this
.
joinType
==
COLLABORATION_JOIN_TYPE
.
INVITED
;
return
this
.
joinType
==
COLLABORATION_JOIN_TYPE
.
INVITED
;
}
};
parseNumberToCoworkType
(
type
)
{
CoviewUserInfo
.
prototype
.
parseNumberToCoworkType
=
function
(
type
)
{
switch
(
type
)
{
switch
(
type
)
{
case
COLLABORATION_TYPE_NUMBER
.
AUDIO
:
case
COLLABORATION_TYPE_NUMBER
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
return
COLLABORATION_TYPE
.
AUDIO
;
case
COLLABORATION_TYPE_NUMBER
.
CAMERA
:
case
COLLABORATION_TYPE_NUMBER
.
CAMERA
:
return
COLLABORATION_TYPE
.
CAMERA
;
return
COLLABORATION_TYPE
.
CAMERA
;
case
COLLABORATION_TYPE_NUMBER
.
VIDEO
:
case
COLLABORATION_TYPE_NUMBER
.
VIDEO
:
return
COLLABORATION_TYPE
.
VIDEO
;
return
COLLABORATION_TYPE
.
VIDEO
;
case
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
:
case
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
:
return
COLLABORATION_TYPE
.
DOCUMENT
;
return
COLLABORATION_TYPE
.
DOCUMENT
;
case
COLLABORATION_TYPE_NUMBER
.
BOARD
:
case
COLLABORATION_TYPE_NUMBER
.
BOARD
:
return
COLLABORATION_TYPE
.
BOARD
;
return
COLLABORATION_TYPE
.
BOARD
;
default
:
default
:
return
0
;
return
0
;
}
}
}
};
getCollaborarionTypeAsNumber
()
{
CoviewUserInfo
.
prototype
.
getCollaborarionTypeAsNumber
=
function
()
{
return
this
.
parseCoworkTypeToNumber
(
this
.
collaborationType
);
return
this
.
parseCoworkTypeToNumber
(
this
.
collaborationType
);
}
};
parseCoworkTypeToNumber
(
type
)
{
CoviewUserInfo
.
prototype
.
parseCoworkTypeToNumber
=
function
(
type
)
{
switch
(
type
)
{
switch
(
type
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
case
COLLABORATION_TYPE
.
AUDIO
:
return
COLLABORATION_TYPE_NUMBER
.
AUDIO
;
return
COLLABORATION_TYPE_NUMBER
.
AUDIO
;
case
COLLABORATION_TYPE
.
CAMERA
:
case
COLLABORATION_TYPE
.
CAMERA
:
return
COLLABORATION_TYPE_NUMBER
.
CAMERA
;
return
COLLABORATION_TYPE_NUMBER
.
CAMERA
;
case
COLLABORATION_TYPE
.
VIDEO
:
case
COLLABORATION_TYPE
.
VIDEO
:
return
COLLABORATION_TYPE_NUMBER
.
VIDEO
;
return
COLLABORATION_TYPE_NUMBER
.
VIDEO
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
case
COLLABORATION_TYPE
.
DOCUMENT
:
return
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
;
return
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
;
case
COLLABORATION_TYPE
.
BOARD
:
case
COLLABORATION_TYPE
.
BOARD
:
return
COLLABORATION_TYPE_NUMBER
.
BOARD
;
return
COLLABORATION_TYPE_NUMBER
.
BOARD
;
default
:
default
:
return
0
;
return
0
;
}
}
}
};
};
...
...
public_new/js/Models/deviceinfo.js
View file @
2622f6b8
...
@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () {
...
@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () {
}
}
};
};
var
DeviceInfo
=
class
{
function
DeviceInfo
(
deviceInfo
)
{
isMoble
;
// iphone or iPad
this
.
isMoble
=
deviceInfo
.
isMoble
;
platform
;
// ios or android
this
.
platform
=
deviceInfo
.
platform
;
androidVersion
;
if
(
typeof
android
!=
"undefined"
)
{
this
.
androidVersion
=
android
.
getAndroidVersion
();
constructor
(
deviceInfo
)
{
this
.
isMoble
=
deviceInfo
.
isMoble
;
this
.
platform
=
deviceInfo
.
platform
;
if
(
typeof
android
!=
"undefined"
)
{
this
.
androidVersion
=
android
.
getAndroidVersion
();
}
}
}
}
isiOS
()
{
DeviceInfo
.
prototype
.
isiOS
=
function
()
{
return
this
.
platform
==
"ios"
;
return
this
.
platform
==
"ios"
;
}
};
isAndroid
()
{
DeviceInfo
.
prototype
.
isAndroid
=
function
()
{
return
this
.
platform
==
"android"
;
return
this
.
platform
==
"android"
;
}
};
isMobile
()
{
DeviceInfo
.
prototype
.
isMobile
=
function
()
{
return
this
.
isMoble
==
true
;
return
this
.
isMoble
==
true
;
}
};
};
var
deviceInfo
=
new
DeviceInfo
(
NativeBridgeDataSource
.
getDeviceInfo
());
var
deviceInfo
=
new
DeviceInfo
(
NativeBridgeDataSource
.
getDeviceInfo
());
...
...
public_new/js/Models/roominfo.js
View file @
2622f6b8
...
@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () {
...
@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () {
}
}
};
};
var
RoomInfo
=
class
{
function
RoomInfo
(
roomInfo
)
{
roomID
;
this
.
roomID
=
roomInfo
.
roomID
;
roomName
;
this
.
roomName
=
roomInfo
.
roomName
;
roomType
;
this
.
roomType
=
roomInfo
.
roomType
;
constructor
(
roomInfo
)
{
}
this
.
roomID
=
roomInfo
.
roomID
;
this
.
roomName
=
roomInfo
.
roomName
;
this
.
roomType
=
roomInfo
.
roomType
;
}
};
var
roomInfo
=
new
RoomInfo
(
NativeBridgeDataSource
.
getRoomInfo
());
var
roomInfo
=
new
RoomInfo
(
NativeBridgeDataSource
.
getRoomInfo
());
public_new/js/Models/serverinfo.js
View file @
2622f6b8
...
@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () {
...
@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () {
}
}
};
};
var
ServerInfo
=
class
{
function
ServerInfo
(
serverInfo
)
{
chatURL
;
this
.
chatURL
=
serverInfo
.
chatURL
;
cmsURL
;
this
.
cmsURL
=
serverInfo
.
cmsURL
;
isOnline
;
this
.
isOnline
=
serverInfo
.
isOnline
;
}
constructor
(
serverInfo
)
{
this
.
chatURL
=
serverInfo
.
chatURL
;
this
.
cmsURL
=
serverInfo
.
cmsURL
;
this
.
isOnline
=
serverInfo
.
isOnline
;
}
};
var
serverInfo
=
new
ServerInfo
(
NativeBridgeDataSource
.
getServerInfo
());
var
serverInfo
=
new
ServerInfo
(
NativeBridgeDataSource
.
getServerInfo
());
public_new/js/Models/socket-joininfo.js
View file @
2622f6b8
var
JoinInfo
=
class
{
function
JoinInfo
(
sid
,
loginId
,
shopName
,
roomId
,
roomName
,
shopMemberId
)
{
sid
;
this
.
sid
=
sid
;
loginId
;
this
.
loginId
=
loginId
;
shopName
;
this
.
shopName
=
shopName
;
roomId
;
this
.
roomId
=
roomId
;
roomName
;
this
.
roomName
=
roomName
;
shopMemberId
;
this
.
shopMemberId
=
shopMemberId
;
constructor
(
sid
,
loginId
,
shopName
,
roomId
,
roomName
,
shopMemberId
)
{
}
this
.
sid
=
sid
;
this
.
loginId
=
loginId
;
this
.
shopName
=
shopName
;
this
.
roomId
=
roomId
;
this
.
roomName
=
roomName
;
this
.
shopMemberId
=
shopMemberId
;
}
};
public_new/js/Models/userinfo.js
View file @
2622f6b8
...
@@ -6,30 +6,25 @@ NativeBridgeDataSource.getMyUserInfo = function () {
...
@@ -6,30 +6,25 @@ NativeBridgeDataSource.getMyUserInfo = function () {
}
}
};
};
var
CurrentUserInfo
=
class
{
function
CurrentUserInfo
(
userInfo
)
{
sid
;
this
.
sid
=
userInfo
.
sid
;
loginID
;
this
.
loginID
=
userInfo
.
loginId
;
shopName
;
this
.
shopName
=
userInfo
.
shopName
;
shopMemberID
;
this
.
shopMemberID
=
userInfo
.
shopMemberId
;
languageCode
;
if
(
userInfo
.
languageCode
==
undefined
)
{
constructor
(
userInfo
)
{
userInfo
.
languageCode
=
"jp"
;
this
.
sid
=
userInfo
.
sid
;
this
.
loginID
=
userInfo
.
loginId
;
this
.
shopName
=
userInfo
.
shopName
;
this
.
shopMemberID
=
userInfo
.
shopMemberId
;
if
(
userInfo
.
languageCode
==
undefined
)
{
userInfo
.
languageCode
=
"jp"
;
}
this
.
languageCode
=
userInfo
.
languageCode
;
}
}
this
.
languageCode
=
userInfo
.
languageCode
;
}
configureLanguage
(
languageCode
=
undefined
)
{
CurrentUserInfo
.
prototype
.
configureLanguage
=
function
(
if
(
languageCode
==
undefined
)
{
languageCode
=
undefined
languageCode
=
this
.
languageCode
;
)
{
}
if
(
languageCode
==
undefined
)
{
moment
.
locale
(
languageCode
);
languageCode
=
this
.
languageCode
;
setLanguage
(
languageCode
);
}
}
moment
.
locale
(
languageCode
);
setLanguage
(
languageCode
);
};
};
var
currentUserInfo
=
new
CurrentUserInfo
(
var
currentUserInfo
=
new
CurrentUserInfo
(
...
...
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