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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
70 deletions
+29
-70
public_new/js/Models/coview-userinfo.js
+11
-22
public_new/js/Models/deviceinfo.js
+7
-13
public_new/js/Models/roominfo.js
+2
-7
public_new/js/Models/serverinfo.js
+2
-8
public_new/js/Models/socket-joininfo.js
+2
-10
public_new/js/Models/userinfo.js
+5
-10
No files found.
public_new/js/Models/coview-userinfo.js
View file @
2622f6b8
...
...
@@ -6,17 +6,7 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () {
}
};
var
CoviewUserInfo
=
class
{
sid
;
loginId
;
roomId
;
shopName
;
collaborationType
;
joinType
;
isLeaved
;
meetingID
;
constructor
(
sid
,
loginId
,
roomId
,
shopName
)
{
function
CoviewUserInfo
(
sid
,
loginId
,
roomId
,
shopName
)
{
this
.
sid
=
sid
;
this
.
loginId
=
loginId
;
this
.
roomId
=
roomId
;
...
...
@@ -27,9 +17,9 @@ var CoviewUserInfo = class {
this
.
isLeaved
=
false
;
this
.
meetingID
=
0
;
}
}
get
coWorkType
()
{
CoviewUserInfo
.
prototype
.
coWorkType
=
function
()
{
switch
(
this
.
collaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
...
...
@@ -42,13 +32,13 @@ var CoviewUserInfo = class {
case
COLLABORATION_TYPE
.
BOARD
:
return
COLLABORATION_TYPE
.
AUDIO
;
}
}
};
isInvited
()
{
CoviewUserInfo
.
prototype
.
isInvited
=
function
()
{
return
this
.
joinType
==
COLLABORATION_JOIN_TYPE
.
INVITED
;
}
};
parseNumberToCoworkType
(
type
)
{
CoviewUserInfo
.
prototype
.
parseNumberToCoworkType
=
function
(
type
)
{
switch
(
type
)
{
case
COLLABORATION_TYPE_NUMBER
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
...
...
@@ -63,13 +53,13 @@ var CoviewUserInfo = class {
default
:
return
0
;
}
}
};
getCollaborarionTypeAsNumber
()
{
CoviewUserInfo
.
prototype
.
getCollaborarionTypeAsNumber
=
function
()
{
return
this
.
parseCoworkTypeToNumber
(
this
.
collaborationType
);
}
};
parseCoworkTypeToNumber
(
type
)
{
CoviewUserInfo
.
prototype
.
parseCoworkTypeToNumber
=
function
(
type
)
{
switch
(
type
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
return
COLLABORATION_TYPE_NUMBER
.
AUDIO
;
...
...
@@ -84,7 +74,6 @@ var CoviewUserInfo = class {
default
:
return
0
;
}
}
};
// variable name for legacy connection to agent_app.js in coview library
...
...
public_new/js/Models/deviceinfo.js
View file @
2622f6b8
...
...
@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () {
}
};
var
DeviceInfo
=
class
{
isMoble
;
// iphone or iPad
platform
;
// ios or android
androidVersion
;
constructor
(
deviceInfo
)
{
function
DeviceInfo
(
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"
;
}
};
isAndroid
()
{
DeviceInfo
.
prototype
.
isAndroid
=
function
()
{
return
this
.
platform
==
"android"
;
}
};
isMobile
()
{
DeviceInfo
.
prototype
.
isMobile
=
function
()
{
return
this
.
isMoble
==
true
;
}
};
var
deviceInfo
=
new
DeviceInfo
(
NativeBridgeDataSource
.
getDeviceInfo
());
...
...
public_new/js/Models/roominfo.js
View file @
2622f6b8
...
...
@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () {
}
};
var
RoomInfo
=
class
{
roomID
;
roomName
;
roomType
;
constructor
(
roomInfo
)
{
function
RoomInfo
(
roomInfo
)
{
this
.
roomID
=
roomInfo
.
roomID
;
this
.
roomName
=
roomInfo
.
roomName
;
this
.
roomType
=
roomInfo
.
roomType
;
}
};
}
var
roomInfo
=
new
RoomInfo
(
NativeBridgeDataSource
.
getRoomInfo
());
public_new/js/Models/serverinfo.js
View file @
2622f6b8
...
...
@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () {
}
};
var
ServerInfo
=
class
{
chatURL
;
cmsURL
;
isOnline
;
constructor
(
serverInfo
)
{
function
ServerInfo
(
serverInfo
)
{
this
.
chatURL
=
serverInfo
.
chatURL
;
this
.
cmsURL
=
serverInfo
.
cmsURL
;
this
.
isOnline
=
serverInfo
.
isOnline
;
}
};
}
var
serverInfo
=
new
ServerInfo
(
NativeBridgeDataSource
.
getServerInfo
());
public_new/js/Models/socket-joininfo.js
View file @
2622f6b8
var
JoinInfo
=
class
{
sid
;
loginId
;
shopName
;
roomId
;
roomName
;
shopMemberId
;
constructor
(
sid
,
loginId
,
shopName
,
roomId
,
roomName
,
shopMemberId
)
{
function
JoinInfo
(
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,13 +6,7 @@ NativeBridgeDataSource.getMyUserInfo = function () {
}
};
var
CurrentUserInfo
=
class
{
sid
;
loginID
;
shopName
;
shopMemberID
;
languageCode
;
constructor
(
userInfo
)
{
function
CurrentUserInfo
(
userInfo
)
{
this
.
sid
=
userInfo
.
sid
;
this
.
loginID
=
userInfo
.
loginId
;
this
.
shopName
=
userInfo
.
shopName
;
...
...
@@ -21,15 +15,16 @@ var CurrentUserInfo = class {
userInfo
.
languageCode
=
"jp"
;
}
this
.
languageCode
=
userInfo
.
languageCode
;
}
}
configureLanguage
(
languageCode
=
undefined
)
{
CurrentUserInfo
.
prototype
.
configureLanguage
=
function
(
languageCode
=
undefined
)
{
if
(
languageCode
==
undefined
)
{
languageCode
=
this
.
languageCode
;
}
moment
.
locale
(
languageCode
);
setLanguage
(
languageCode
);
}
};
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