Commit 0878e0dc by Kim Peace

Fixed const name case

parent 87f38391
......@@ -122,13 +122,13 @@ function updateDuration() {
CHAT_UTIL.getCollaborationType = function (key) {
switch (key) {
case collaborationTypeKey.AUDIO:
case CollaborationTypeKey.AUDIO:
return COLLABORATION_TYPE.AUDIO;
case collaborationTypeKey.CAMERA:
case CollaborationTypeKey.CAMERA:
return COLLABORATION_TYPE.CAMERA;
case collaborationTypeKey.VIDEO:
case CollaborationTypeKey.VIDEO:
return COLLABORATION_TYPE.VIDEO;
case collaborationTypeKey.DOCUMENT:
case CollaborationTypeKey.DOCUMENT:
return COLLABORATION_TYPE.DOCUMENT;
default:
return 0;
......@@ -140,17 +140,17 @@ CHAT_UTIL.getCoviewTypeFromCollaborationType = function (
) {
switch (joinCollaborationType) {
case COLLABORATION_TYPE.AUDIO:
console.log(collaborationTypeKey.AUDIO);
return collaborationTypeKey.AUDIO;
console.log(CollaborationTypeKey.AUDIO);
return CollaborationTypeKey.AUDIO;
case COLLABORATION_TYPE.CAMERA:
console.log(collaborationTypeKey.CAMERA);
return collaborationTypeKey.CAMERA;
console.log(CollaborationTypeKey.CAMERA);
return CollaborationTypeKey.CAMERA;
case COLLABORATION_TYPE.VIDEO:
return collaborationTypeKey.VIDEO;
return CollaborationTypeKey.VIDEO;
case COLLABORATION_TYPE.DOCUMENT:
return collaborationTypeKey.DOCUMENT;
return CollaborationTypeKey.DOCUMENT;
case COLLABORATION_TYPE.BOARD:
return collaborationTypeKey.BOARD;
return CollaborationTypeKey.BOARD;
default:
return 0;
}
......
......@@ -197,7 +197,7 @@ CHAT.uploadImage = function (formData) {
socket.emit(
"createMessage",
{
text: encodedText + messageSeperator + messageType.IMAGE,
text: encodedText + messageSeperator + MessageType.IMAGE,
},
1
);
......@@ -253,7 +253,7 @@ CHAT.uploadImage = function (formData) {
socket.emit(
"createMessage",
{
text: encodedText + messageSeperator + messageType.VIDEO,
text: encodedText + messageSeperator + MessageType.VIDEO,
},
1
);
......@@ -603,7 +603,7 @@ document.addEventListener('DOMContentLoaded', function() {
if (message.shopMemberId == CHAT.globalLoginParameter.shopMemberId) {
template = myMessageTemplate;
}
if (message.messageType == messageType.SYSTEM) {
if (message.messageType == MessageType.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(chatRoomType.ALL, keyword);
rooms = CHAT_DB.getRoomList(ChatRoomType.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 == messageType.TEXT ||
room.messageType == messageType.SYSTEM
room.messageType == MessageType.TEXT ||
room.messageType == MessageType.SYSTEM
)
displayMsg = room.message;
if (room.messageType == messageType.IMAGE)
if (room.messageType == MessageType.IMAGE)
displayMsg = getLocalizedString("image");
if (room.messageType == messageType.VIDEO)
if (room.messageType == MessageType.VIDEO)
displayMsg = getLocalizedString("video");
if (room.messageType == messageType.TEXT) displayMsg = room.message;
if (room.messageType == messageType.COMMUNICATIONSTART)
if (room.messageType == MessageType.TEXT) displayMsg = room.message;
if (room.messageType == MessageType.COMMUNICATIONSTART)
displayMsg = getLocalizedString("collaboration_start");
if (room.messageType == messageType.COMMUNICATIONEND)
if (room.messageType == MessageType.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 == messageType.SYSTEM) {
if (message.messageType == MessageType.SYSTEM) {
template = systemMessageTemplate;
}
let messageTime = CHAT_UTIL.formatDate(message.insertDate);
......
......@@ -9,7 +9,7 @@ const readyState = {
COMPLETED: 4,
};
const messageType = {
const MessageType = {
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 makeRoomFlg = {
const MakeRoomFlag = {
NAME_CARD: 0,
MAKE_ROOM: 1,
};
......@@ -62,7 +49,7 @@ const ANDROID_SDK_VERSION = {
O: 26,
};
const HOST_REQUEST_FLG = {
const HostRequestFlag = {
DONE: 0,
DOING: 1,
};
......
......@@ -50,14 +50,14 @@ document.addEventListener('DOMContentLoaded', function() {
$(document).on("click", ".coview_share_request", function () {
console.log("globalUserInfo", globalUserInfo);
if ($(this).hasClass(collaborationTypeKey.VIDEO) == true) {
globalUserInfo.coWorkType = collaborationTypeKey.VIDEO;
if ($(this).hasClass(CollaborationTypeKey.VIDEO) == true) {
globalUserInfo.coWorkType = CollaborationTypeKey.VIDEO;
$(".coview_share_title_name").text("LIVE");
} else if ($(this).hasClass(collaborationTypeKey.CAMERA) == true) {
globalUserInfo.coWorkType = collaborationTypeKey.CAMERA;
} else if ($(this).hasClass(CollaborationTypeKey.CAMERA) == true) {
globalUserInfo.coWorkType = CollaborationTypeKey.CAMERA;
$(".coview_share_title_name").text("ライブラリ");
} else if ($(this).hasClass(collaborationTypeKey.AUDIO) == true) {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
} else if ($(this).hasClass(CollaborationTypeKey.AUDIO) == true) {
globalUserInfo.coWorkType = CollaborationTypeKey.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 = collaborationTypeKey.CAMERA;
globalUserInfo.coWorkType = CollaborationTypeKey.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 == collaborationTypeKey.DOCUMENT) {
if (globalUserInfo.coWorkType == CollaborationTypeKey.DOCUMENT) {
isDocument = true;
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
}
if (globalUserInfo.coWorkType == collaborationTypeKey.BOARD) {
if (globalUserInfo.coWorkType == CollaborationTypeKey.BOARD) {
isBoard = true;
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
}
hostSearchInterval();
if (collaborationJoinFlg == "1") {
......@@ -365,23 +365,23 @@ document.addEventListener('DOMContentLoaded', function() {
coviewInviteMessage =
"" +
messageSeperator +
messageType.COMMUNICATIONSTART +
MessageType.COMMUNICATIONSTART +
messageSeperator +
CHAT_UTIL.getCollaborationType(collaborationTypeKey.DOCUMENT) +
CHAT_UTIL.getCollaborationType(CollaborationTypeKey.DOCUMENT) +
messageSeperator +
meetingId;
} else if (isBoard) {
coviewInviteMessage =
"" +
messageSeperator +
messageType.COMMUNICATIONSTART +
MessageType.COMMUNICATIONSTART +
messageSeperator +
COLLABORATION_TYPE.BOARD;
} else {
coviewInviteMessage =
"" +
messageSeperator +
messageType.COMMUNICATIONSTART +
MessageType.COMMUNICATIONSTART +
messageSeperator +
CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType);
}
......@@ -576,7 +576,7 @@ function initCollaborationUI(changeCollaborationType) {
}
if (CHAT_UTIL.isIOS) {
roomType = CHAT_DB.getRoomType();
if (roomType == chatRoomType.DM) {
if (roomType == ChatRoomType.DM) {
$(".add_user_btn").removeClass("none");
}
}
......@@ -733,7 +733,7 @@ function applyForHostChange() {
}
function Coview_connect_audio_collaboration() {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea();
......
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