Commit 0878e0dc by Kim Peace

Fixed const name case

parent 87f38391
...@@ -122,13 +122,13 @@ function updateDuration() { ...@@ -122,13 +122,13 @@ function updateDuration() {
CHAT_UTIL.getCollaborationType = function (key) { CHAT_UTIL.getCollaborationType = function (key) {
switch (key) { switch (key) {
case collaborationTypeKey.AUDIO: case CollaborationTypeKey.AUDIO:
return COLLABORATION_TYPE.AUDIO; return COLLABORATION_TYPE.AUDIO;
case collaborationTypeKey.CAMERA: case CollaborationTypeKey.CAMERA:
return COLLABORATION_TYPE.CAMERA; return COLLABORATION_TYPE.CAMERA;
case collaborationTypeKey.VIDEO: case CollaborationTypeKey.VIDEO:
return COLLABORATION_TYPE.VIDEO; return COLLABORATION_TYPE.VIDEO;
case collaborationTypeKey.DOCUMENT: case CollaborationTypeKey.DOCUMENT:
return COLLABORATION_TYPE.DOCUMENT; return COLLABORATION_TYPE.DOCUMENT;
default: default:
return 0; return 0;
...@@ -140,17 +140,17 @@ CHAT_UTIL.getCoviewTypeFromCollaborationType = function ( ...@@ -140,17 +140,17 @@ CHAT_UTIL.getCoviewTypeFromCollaborationType = function (
) { ) {
switch (joinCollaborationType) { switch (joinCollaborationType) {
case COLLABORATION_TYPE.AUDIO: case COLLABORATION_TYPE.AUDIO:
console.log(collaborationTypeKey.AUDIO); console.log(CollaborationTypeKey.AUDIO);
return collaborationTypeKey.AUDIO; return CollaborationTypeKey.AUDIO;
case COLLABORATION_TYPE.CAMERA: case COLLABORATION_TYPE.CAMERA:
console.log(collaborationTypeKey.CAMERA); console.log(CollaborationTypeKey.CAMERA);
return collaborationTypeKey.CAMERA; return CollaborationTypeKey.CAMERA;
case COLLABORATION_TYPE.VIDEO: case COLLABORATION_TYPE.VIDEO:
return collaborationTypeKey.VIDEO; return CollaborationTypeKey.VIDEO;
case COLLABORATION_TYPE.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
return collaborationTypeKey.DOCUMENT; return CollaborationTypeKey.DOCUMENT;
case COLLABORATION_TYPE.BOARD: case COLLABORATION_TYPE.BOARD:
return collaborationTypeKey.BOARD; return CollaborationTypeKey.BOARD;
default: default:
return 0; return 0;
} }
......
...@@ -197,7 +197,7 @@ CHAT.uploadImage = function (formData) { ...@@ -197,7 +197,7 @@ CHAT.uploadImage = function (formData) {
socket.emit( socket.emit(
"createMessage", "createMessage",
{ {
text: encodedText + messageSeperator + messageType.IMAGE, text: encodedText + messageSeperator + MessageType.IMAGE,
}, },
1 1
); );
...@@ -253,7 +253,7 @@ CHAT.uploadImage = function (formData) { ...@@ -253,7 +253,7 @@ CHAT.uploadImage = function (formData) {
socket.emit( socket.emit(
"createMessage", "createMessage",
{ {
text: encodedText + messageSeperator + messageType.VIDEO, text: encodedText + messageSeperator + MessageType.VIDEO,
}, },
1 1
); );
...@@ -603,7 +603,7 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -603,7 +603,7 @@ document.addEventListener('DOMContentLoaded', function() {
if (message.shopMemberId == CHAT.globalLoginParameter.shopMemberId) { if (message.shopMemberId == CHAT.globalLoginParameter.shopMemberId) {
template = myMessageTemplate; template = myMessageTemplate;
} }
if (message.messageType == messageType.SYSTEM) { if (message.messageType == MessageType.SYSTEM) {
template = systemMessageTemplate; template = systemMessageTemplate;
} }
let messageTime = CHAT_UTIL.formatDate(message.insertDate); let messageTime = CHAT_UTIL.formatDate(message.insertDate);
...@@ -644,7 +644,7 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -644,7 +644,7 @@ document.addEventListener('DOMContentLoaded', function() {
// チャットルーム検索 // チャットルーム検索
CHAT.searchRoom = function (keyword, rooms) { CHAT.searchRoom = function (keyword, rooms) {
$(".overlay_src_msg").empty(); $(".overlay_src_msg").empty();
rooms = CHAT_DB.getRoomList(chatRoomType.ALL, keyword); rooms = CHAT_DB.getRoomList(ChatRoomType.ALL, keyword);
let roomListTitle = getLocalizedString("room_search_placeholder"); let roomListTitle = getLocalizedString("room_search_placeholder");
$("#chatTitle").text(roomListTitle); $("#chatTitle").text(roomListTitle);
var template; var template;
...@@ -663,18 +663,18 @@ CHAT.searchRoom = function (keyword, rooms) { ...@@ -663,18 +663,18 @@ CHAT.searchRoom = function (keyword, rooms) {
} }
var displayMsg; var displayMsg;
if ( if (
room.messageType == messageType.TEXT || room.messageType == MessageType.TEXT ||
room.messageType == messageType.SYSTEM room.messageType == MessageType.SYSTEM
) )
displayMsg = room.message; displayMsg = room.message;
if (room.messageType == messageType.IMAGE) if (room.messageType == MessageType.IMAGE)
displayMsg = getLocalizedString("image"); displayMsg = getLocalizedString("image");
if (room.messageType == messageType.VIDEO) if (room.messageType == MessageType.VIDEO)
displayMsg = getLocalizedString("video"); displayMsg = getLocalizedString("video");
if (room.messageType == messageType.TEXT) displayMsg = room.message; if (room.messageType == MessageType.TEXT) displayMsg = room.message;
if (room.messageType == messageType.COMMUNICATIONSTART) if (room.messageType == MessageType.COMMUNICATIONSTART)
displayMsg = getLocalizedString("collaboration_start"); displayMsg = getLocalizedString("collaboration_start");
if (room.messageType == messageType.COMMUNICATIONEND) if (room.messageType == MessageType.COMMUNICATIONEND)
displayMsg = getLocalizedString("collaboration_end"); displayMsg = getLocalizedString("collaboration_end");
var attendUserName = []; var attendUserName = [];
room.attendUsers.forEach(function (user) { room.attendUsers.forEach(function (user) {
...@@ -743,7 +743,7 @@ CHAT.searchMessage = function (keyword, workVal) { ...@@ -743,7 +743,7 @@ CHAT.searchMessage = function (keyword, workVal) {
if (message.shopMemberId == CHAT.globalLoginParameter.shopMemberId) { if (message.shopMemberId == CHAT.globalLoginParameter.shopMemberId) {
template = myMessageTemplate; template = myMessageTemplate;
} }
if (message.messageType == messageType.SYSTEM) { if (message.messageType == MessageType.SYSTEM) {
template = systemMessageTemplate; template = systemMessageTemplate;
} }
let messageTime = CHAT_UTIL.formatDate(message.insertDate); let messageTime = CHAT_UTIL.formatDate(message.insertDate);
......
...@@ -9,7 +9,7 @@ const readyState = { ...@@ -9,7 +9,7 @@ const readyState = {
COMPLETED: 4, COMPLETED: 4,
}; };
const messageType = { const MessageType = {
TEXT: 0, TEXT: 0,
IMAGE: 1, IMAGE: 1,
VIDEO: 2, VIDEO: 2,
...@@ -18,26 +18,13 @@ const messageType = { ...@@ -18,26 +18,13 @@ const messageType = {
COMMUNICATIONEND: 5, COMMUNICATIONEND: 5,
}; };
const userAPICmd = { const ChatRoomType = {
MYINFO: 9,
};
const chatRoomType = {
DM: "1", DM: "1",
GROUP: "0", GROUP: "0",
ALL: "2", ALL: "2",
}; };
const groupSearchFlg = { const CollaborationTypeKey = {
ROOT: "0",
};
const nameCardAreaId = {
MY: "myNamecard",
USER: "userNamecard",
};
const collaborationTypeKey = {
AUDIO: "audio", AUDIO: "audio",
CAMERA: "camera", CAMERA: "camera",
VIDEO: "video", VIDEO: "video",
...@@ -53,7 +40,7 @@ const COLLABORATION_TYPE = { ...@@ -53,7 +40,7 @@ const COLLABORATION_TYPE = {
BOARD: 5, BOARD: 5,
}; };
const makeRoomFlg = { const MakeRoomFlag = {
NAME_CARD: 0, NAME_CARD: 0,
MAKE_ROOM: 1, MAKE_ROOM: 1,
}; };
...@@ -62,7 +49,7 @@ const ANDROID_SDK_VERSION = { ...@@ -62,7 +49,7 @@ const ANDROID_SDK_VERSION = {
O: 26, O: 26,
}; };
const HOST_REQUEST_FLG = { const HostRequestFlag = {
DONE: 0, DONE: 0,
DOING: 1, DOING: 1,
}; };
......
...@@ -50,14 +50,14 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -50,14 +50,14 @@ document.addEventListener('DOMContentLoaded', function() {
$(document).on("click", ".coview_share_request", function () { $(document).on("click", ".coview_share_request", function () {
console.log("globalUserInfo", globalUserInfo); console.log("globalUserInfo", globalUserInfo);
if ($(this).hasClass(collaborationTypeKey.VIDEO) == true) { if ($(this).hasClass(CollaborationTypeKey.VIDEO) == true) {
globalUserInfo.coWorkType = collaborationTypeKey.VIDEO; globalUserInfo.coWorkType = CollaborationTypeKey.VIDEO;
$(".coview_share_title_name").text("LIVE"); $(".coview_share_title_name").text("LIVE");
} else if ($(this).hasClass(collaborationTypeKey.CAMERA) == true) { } else if ($(this).hasClass(CollaborationTypeKey.CAMERA) == true) {
globalUserInfo.coWorkType = collaborationTypeKey.CAMERA; globalUserInfo.coWorkType = CollaborationTypeKey.CAMERA;
$(".coview_share_title_name").text("ライブラリ"); $(".coview_share_title_name").text("ライブラリ");
} else if ($(this).hasClass(collaborationTypeKey.AUDIO) == true) { } else if ($(this).hasClass(CollaborationTypeKey.AUDIO) == true) {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO; globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
$(".coview_share_title_name").text("音声通話"); $(".coview_share_title_name").text("音声通話");
} }
...@@ -85,7 +85,7 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -85,7 +85,7 @@ document.addEventListener('DOMContentLoaded', function() {
$("#coviewSharePhotoCamera").on("click", function () { $("#coviewSharePhotoCamera").on("click", function () {
$(".coview_share_photo_select_bubble").hide(); $(".coview_share_photo_select_bubble").hide();
globalUserInfo.coWorkType = collaborationTypeKey.CAMERA; globalUserInfo.coWorkType = CollaborationTypeKey.CAMERA;
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
...@@ -322,13 +322,13 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -322,13 +322,13 @@ document.addEventListener('DOMContentLoaded', function() {
let loginIdList = new Array(); let loginIdList = new Array();
switch (json.api) { switch (json.api) {
case "LoginResponse": case "LoginResponse":
if (globalUserInfo.coWorkType == collaborationTypeKey.DOCUMENT) { if (globalUserInfo.coWorkType == CollaborationTypeKey.DOCUMENT) {
isDocument = true; isDocument = true;
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO; globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
} }
if (globalUserInfo.coWorkType == collaborationTypeKey.BOARD) { if (globalUserInfo.coWorkType == CollaborationTypeKey.BOARD) {
isBoard = true; isBoard = true;
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO; globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
} }
hostSearchInterval(); hostSearchInterval();
if (collaborationJoinFlg == "1") { if (collaborationJoinFlg == "1") {
...@@ -365,23 +365,23 @@ document.addEventListener('DOMContentLoaded', function() { ...@@ -365,23 +365,23 @@ document.addEventListener('DOMContentLoaded', function() {
coviewInviteMessage = coviewInviteMessage =
"" + "" +
messageSeperator + messageSeperator +
messageType.COMMUNICATIONSTART + MessageType.COMMUNICATIONSTART +
messageSeperator + messageSeperator +
CHAT_UTIL.getCollaborationType(collaborationTypeKey.DOCUMENT) + CHAT_UTIL.getCollaborationType(CollaborationTypeKey.DOCUMENT) +
messageSeperator + messageSeperator +
meetingId; meetingId;
} else if (isBoard) { } else if (isBoard) {
coviewInviteMessage = coviewInviteMessage =
"" + "" +
messageSeperator + messageSeperator +
messageType.COMMUNICATIONSTART + MessageType.COMMUNICATIONSTART +
messageSeperator + messageSeperator +
COLLABORATION_TYPE.BOARD; COLLABORATION_TYPE.BOARD;
} else { } else {
coviewInviteMessage = coviewInviteMessage =
"" + "" +
messageSeperator + messageSeperator +
messageType.COMMUNICATIONSTART + MessageType.COMMUNICATIONSTART +
messageSeperator + messageSeperator +
CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType); CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType);
} }
...@@ -576,7 +576,7 @@ function initCollaborationUI(changeCollaborationType) { ...@@ -576,7 +576,7 @@ function initCollaborationUI(changeCollaborationType) {
} }
if (CHAT_UTIL.isIOS) { if (CHAT_UTIL.isIOS) {
roomType = CHAT_DB.getRoomType(); roomType = CHAT_DB.getRoomType();
if (roomType == chatRoomType.DM) { if (roomType == ChatRoomType.DM) {
$(".add_user_btn").removeClass("none"); $(".add_user_btn").removeClass("none");
} }
} }
...@@ -733,7 +733,7 @@ function applyForHostChange() { ...@@ -733,7 +733,7 @@ function applyForHostChange() {
} }
function Coview_connect_audio_collaboration() { function Coview_connect_audio_collaboration() {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO; globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea(); 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