Commit 2622f6b8 by Kim Peace

Changed class to function for not to use es6

parent c64b670e
...@@ -6,17 +6,7 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () { ...@@ -6,17 +6,7 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () {
} }
}; };
var CoviewUserInfo = class { function CoviewUserInfo(sid, loginId, roomId, shopName) {
sid;
loginId;
roomId;
shopName;
collaborationType;
joinType;
isLeaved;
meetingID;
constructor(sid, loginId, roomId, shopName) {
this.sid = sid; this.sid = sid;
this.loginId = loginId; this.loginId = loginId;
this.roomId = roomId; this.roomId = roomId;
...@@ -27,9 +17,9 @@ var CoviewUserInfo = class { ...@@ -27,9 +17,9 @@ var CoviewUserInfo = class {
this.isLeaved = false; this.isLeaved = false;
this.meetingID = 0; this.meetingID = 0;
} }
get coWorkType() { CoviewUserInfo.prototype.coWorkType = function () {
switch (this.collaborationType) { switch (this.collaborationType) {
case COLLABORATION_TYPE.AUDIO: case COLLABORATION_TYPE.AUDIO:
return COLLABORATION_TYPE.AUDIO; return COLLABORATION_TYPE.AUDIO;
...@@ -42,13 +32,13 @@ var CoviewUserInfo = class { ...@@ -42,13 +32,13 @@ var CoviewUserInfo = class {
case COLLABORATION_TYPE.BOARD: case COLLABORATION_TYPE.BOARD:
return COLLABORATION_TYPE.AUDIO; 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;
...@@ -63,13 +53,13 @@ var CoviewUserInfo = class { ...@@ -63,13 +53,13 @@ var CoviewUserInfo = class {
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;
...@@ -84,7 +74,6 @@ var CoviewUserInfo = class { ...@@ -84,7 +74,6 @@ var CoviewUserInfo = class {
default: default:
return 0; return 0;
} }
}
}; };
// variable name for legacy connection to agent_app.js in coview library // variable name for legacy connection to agent_app.js in coview library
......
...@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () { ...@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () {
} }
}; };
var DeviceInfo = class { function DeviceInfo(deviceInfo) {
isMoble; // iphone or iPad
platform; // ios or android
androidVersion;
constructor(deviceInfo) {
this.isMoble = deviceInfo.isMoble; this.isMoble = deviceInfo.isMoble;
this.platform = deviceInfo.platform; this.platform = deviceInfo.platform;
if (typeof android != "undefined") { if (typeof android != "undefined") {
this.androidVersion = android.getAndroidVersion(); 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());
......
...@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () { ...@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () {
} }
}; };
var RoomInfo = class { function RoomInfo(roomInfo) {
roomID;
roomName;
roomType;
constructor(roomInfo) {
this.roomID = roomInfo.roomID; this.roomID = roomInfo.roomID;
this.roomName = roomInfo.roomName; this.roomName = roomInfo.roomName;
this.roomType = roomInfo.roomType; this.roomType = roomInfo.roomType;
} }
};
var roomInfo = new RoomInfo(NativeBridgeDataSource.getRoomInfo()); var roomInfo = new RoomInfo(NativeBridgeDataSource.getRoomInfo());
...@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () { ...@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () {
} }
}; };
var ServerInfo = class { function ServerInfo(serverInfo) {
chatURL;
cmsURL;
isOnline;
constructor(serverInfo) {
this.chatURL = serverInfo.chatURL; this.chatURL = serverInfo.chatURL;
this.cmsURL = serverInfo.cmsURL; this.cmsURL = serverInfo.cmsURL;
this.isOnline = serverInfo.isOnline; this.isOnline = serverInfo.isOnline;
} }
};
var serverInfo = new ServerInfo(NativeBridgeDataSource.getServerInfo()); var serverInfo = new ServerInfo(NativeBridgeDataSource.getServerInfo());
var JoinInfo = class { function JoinInfo(sid, loginId, shopName, roomId, roomName, shopMemberId) {
sid;
loginId;
shopName;
roomId;
roomName;
shopMemberId;
constructor(sid, loginId, shopName, roomId, roomName, shopMemberId) {
this.sid = sid; this.sid = sid;
this.loginId = loginId; this.loginId = loginId;
this.shopName = shopName; this.shopName = shopName;
this.roomId = roomId; this.roomId = roomId;
this.roomName = roomName; this.roomName = roomName;
this.shopMemberId = shopMemberId; this.shopMemberId = shopMemberId;
} }
};
...@@ -6,13 +6,7 @@ NativeBridgeDataSource.getMyUserInfo = function () { ...@@ -6,13 +6,7 @@ NativeBridgeDataSource.getMyUserInfo = function () {
} }
}; };
var CurrentUserInfo = class { function CurrentUserInfo(userInfo) {
sid;
loginID;
shopName;
shopMemberID;
languageCode;
constructor(userInfo) {
this.sid = userInfo.sid; this.sid = userInfo.sid;
this.loginID = userInfo.loginId; this.loginID = userInfo.loginId;
this.shopName = userInfo.shopName; this.shopName = userInfo.shopName;
...@@ -21,15 +15,16 @@ var CurrentUserInfo = class { ...@@ -21,15 +15,16 @@ var CurrentUserInfo = class {
userInfo.languageCode = "jp"; userInfo.languageCode = "jp";
} }
this.languageCode = userInfo.languageCode; this.languageCode = userInfo.languageCode;
} }
configureLanguage(languageCode = undefined) { CurrentUserInfo.prototype.configureLanguage = function (
languageCode = undefined
) {
if (languageCode == undefined) { if (languageCode == undefined) {
languageCode = this.languageCode; languageCode = this.languageCode;
} }
moment.locale(languageCode); moment.locale(languageCode);
setLanguage(languageCode); setLanguage(languageCode);
}
}; };
var currentUserInfo = new CurrentUserInfo( var currentUserInfo = new CurrentUserInfo(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment