Commit 6e009873 by Kim Peace

Removed CHAT_UI and CHAT js

parent 51b89259
......@@ -18,7 +18,7 @@
<script>
window.addEventListener('DOMContentLoaded', function () {
CHAT_UI.refreshArchiveScreen();
ArchiveUI.refreshArchiveScreen();
});
</script>
</head>
......@@ -149,12 +149,8 @@
$("#loadingArea").load("./loading.html");
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
ArchiveUI.refreshArchiveScreen();
function getGlobalParam() {
CHAT_UI.refreshArchiveScreen();
};
</script>
</body>
......
......@@ -100,7 +100,7 @@
<h2 class="ttl" id="archiveSaveUser">SaveUser</h2>
<div class="d-flex flex-row">
<div class="d-flex flex-column">
<img src="{{profileImage}}" alt="プロフィール画像" onclick="CHAT_UI.makeNameCard({{userId}})" >
<img src="{{profileImage}}" alt="プロフィール画像" onclick="Namecard.makeNameCard({{userId}})" >
<p>{{userName}}</p>
</div>
</div>
......@@ -124,12 +124,7 @@
<script>
var archiveId;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
function getGlobalParam() {
CHAT_UI.refreshArchiveDetailScreen(archiveId);
};
ArchiveUI.refreshArchiveDetailScreen(archiveId);
window.addEventListener('DOMContentLoaded', function () {
var urlPrm = new Object;
......@@ -140,7 +135,7 @@
if (typeof (android) != "undefined") {
} else {
CHAT_UI.refreshArchiveDetailScreen(urlPrm.archiveId);
ArchiveUI.refreshArchiveDetailScreen(urlPrm.archiveId);
}
});
</script>
......
......@@ -132,11 +132,6 @@
$("#loadingArea").load("./loading.html");
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
NativeBridgeDelegate.saveSelectedUserList("");
function getGlobalParam() {
if (deviceInfo.isAndroid()) {
var needHostAlert = android.getExitHostAlert();
if (needHostAlert) {
......@@ -144,8 +139,9 @@
}
}
ChatList.refreshRoomList(ChatRoomType.GROUP);
NativeBridgeDelegate.saveSelectedUserList("");
Common.dismissLoadingIndicator();
};
</script>
</body>
......
......@@ -160,10 +160,6 @@
return this.split(org).join(dest);
}
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
function getGlobalParam() {
const selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
if (selectedUsers != "") {
selectedUsers.forEach(function (user) {
......@@ -176,8 +172,8 @@
} else {
$('.select_member_num').text('0');
}
CHAT_UI.refreshMyGroupForAddUser();
};
ChatAddUser.refreshMyGroupForAddUser();
</script>
</body>
......
......@@ -88,12 +88,9 @@
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
function getGlobalParam() {
ChatManagementCommon.showAddUserConfirmView();
};
</script>
</body>
......
......@@ -89,10 +89,6 @@
}
let roomId = 0;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
function getGlobalParam() { };
</script>
</body>
......
......@@ -161,10 +161,6 @@
return this.split(org).join(dest);
}
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
function getGlobalParam() {
if (NativeBridgeDataSource.loadSelectedUsers() != "") {
let selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
selectedUsers.forEach(function (user) {
......@@ -177,8 +173,7 @@
} else {
$('.select_member_num').text('0');
}
CHAT_UI.refreshMyGroupForMakeRoom();
};
ChatMakeRoom.refreshMyGroupForMakeRoom();
</script>
</body>
......
......@@ -96,14 +96,9 @@
return this.split(org).join(dest);
}
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
ChatManagementCommon.showMakeRoomConfirmView();
$("#newRoomName").attr("placeholder", getLocalizedString("newRoomName"));
function getGlobalParam() {
ChatManagementCommon.showMakeRoomConfirmView();
};
</script>
</body>
......
......@@ -92,39 +92,39 @@
<input type="text" name="message" class="message_input_form" id="messageInput" placeholder="メッセージを入力してください"
maxlength="600">
<button type="button" name="button" class="message_input_send none" id="messageSend"
onclick="CHAT_UI.sendMessage(this);">送信</button>
onclick="ChatRoom.sendMessage(this);">送信</button>
</div>
</div>
<!-- フッター下 -->
<div class="footer_content_b">
<div class="d-flex flex-row justify-content-around h-100">
<div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.AUDIO);">
<a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.AUDIO);">
<img src="icon/icon_phone.png" alt="通話アイコン">
<p>通話</p>
</a>
</div>
<div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.DOCUMENT);">
<a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.DOCUMENT);">
<img src="icon/icon_paste.png" alt="文書アイコン">
<p>文書</p>
</a>
</div>
<div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.CAMERA);">
<a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.CAMERA);">
<img src="icon/icon_photo.png" alt="画像アイコン">
<p>画像</p>
</a>
</div>
<div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.VIDEO);">
<a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.VIDEO);">
<img src="icon/icon_movie.png" alt="動画アイコン">
<p>動画</p>
</a>
</div>
<!--リリース後開発予定-->
<div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.BOARD);">
<a href="javascript:ChatRoom.startCollaboration(COLLABORATION_TYPE.BOARD);">
<img src="icon/icon_whiteboard_gray.png" alt="ホワイトボードアイコン">
<p>ボード</p>
</a>
......@@ -187,24 +187,20 @@
$("#chatMenuModal").load("./modal_chat_menu.html");
$("#loadingArea").load("./loading.html");
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
if (deviceInfo.isAndroid()) {
const needHostAlert = android.getExitHostAlert();
if (needHostAlert) {
alert(getLocalizedString("inform_exit_host_collaboration"));
}
}
ChatRoom.loadMessages(roomInfo.roomID, roomInfo.roomName);
NativeBridgeDelegate.saveSelectedUserList("");
if (typeof (android) != "undefined") {
androidVersion = android.getAndroidVersion();
}
function getGlobalParam() {
if (deviceInfo.isAndroid()) {
var needHostAlert = android.getExitHostAlert();
if (needHostAlert) {
alert(getLocalizedString("inform_exit_host_collaboration"));
}
}
CHAT_UI.loadMessages(roomInfo.roomID, roomInfo.roomName);
};
</script>
</body>
......
......@@ -179,24 +179,11 @@
let joinMeetingId = 0;
let androidVersion = 0;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
function startPipMode() {
NativeBridgeDelegate.startPIPMode();
}
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
async function getGlobalParam() {
joinCollaborationType = NativeBridgeDataSource.getJoinCollaborationType();
collaborationJoinFlg = NativeBridgeDataSource.getCollaborationJoinFlg();
......@@ -217,7 +204,14 @@
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.initialJoin();
}
};
function startPipMode() {
NativeBridgeDelegate.startPIPMode();
}
String.prototype.replaceAll = function (org, dest) {
return this.split(org).join(dest);
}
</script>
</body>
......
......@@ -115,19 +115,15 @@
let collaborationJoinFlg = 0;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
collaborationJoinFlg = NativeBridgeDataSource.getCollaborationJoinFlg();
globalUserInfo.coWorkType = CollaborationTypeKey.DOCUMENT;
CHAT_SOCKET.initialJoin();
function finishPipMode() {
NativeBridgeDelegate.finishPIPMode();
}
async function getGlobalParam() {
collaborationJoinFlg = NativeBridgeDataSource.getCollaborationJoinFlg();
globalUserInfo.coWorkType = CollaborationTypeKey.DOCUMENT;
CHAT_SOCKET.initialJoin();
};
</script>
</body>
......
......@@ -2,7 +2,8 @@
<div class="user_list d-flex flex-wrap">
{{#joinedUserList}}
<div class="user_item " id="collaboration_user_{{loginId}}">
<a href="#" data-toggle="modal" data-target="#profileModal1" onclick="CHAT_UI.makeNameCardInCollaboration({{shopMemberId}})">
<a href="#" data-toggle="modal" data-target="#profileModal1"
onclick="Namecard.makeNameCardInCollaboration({{shopMemberId}})">
<div class="img_wrap"><img src="{{profileUrl}}" alt="this.src='./img/noImage.png'" /></div>
<span class="name">{{shopMemberName}}</span>
</a>
......
......@@ -178,22 +178,18 @@
let collaborationJoinFlg = 0;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam() {
collaborationJoinFlg = NativeBridgeDataSource.getCollaborationJoinFlg();
globalUserInfo.coWorkType = CollaborationTypeKey.CAMERA;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.initialJoin();
}
};
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
</script>
</body>
......
......@@ -168,22 +168,18 @@
let collaborationJoinFlg = 0;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam() {
collaborationJoinFlg = NativeBridgeDataSource.getCollaborationJoinFlg();
globalUserInfo.coWorkType = CollaborationTypeKey.VIDEO;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.initialJoin();
}
};
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
</script>
</html>
\ No newline at end of file
......@@ -109,25 +109,17 @@
$("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html");
$("#add_user_list").load("./modal_add_user_list.html");
let collaborationJoinFlg = 0;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam() {
collaborationJoinFlg = NativeBridgeDataSource.getCollaborationJoinFlg();
globalUserInfo.coWorkType = CollaborationTypeKey.AUDIO;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.initialJoin();
}
};
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
</script>
</body>
......
......@@ -169,23 +169,17 @@
let collaborationJoinFlg = 0;
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
async function getGlobalParam() {
collaborationJoinFlg = NativeBridgeDataSource.getCollaborationJoinFlg();
globalUserInfo.coWorkType = CollaborationTypeKey.BOARD;
if (collaborationJoinFlg != '2') {
CHAT_SOCKET.initialJoin();
}
};
const roomType = NativeBridgeDataSource.getRoomType();
if (roomType == ChatRoomType.DM) {
$('.add_user_btn').removeClass('none');
}
</script>
</body>
......
......@@ -210,20 +210,15 @@
$("#loadingArea").load("./loading.html");
NativeBridgeDelegate.getLoginParameter();
NativeBridgeDelegate.getGlobalParameter();
function getGlobalParam() {
const groupID = NativeBridgeDataSource.getToMoveGroupId();
if (groupID != "" && groupID != undefined) {
CHAT_UI.refreshAllGroupSearch(groupID);
Contact.refreshAllGroupSearch(groupID);
NativeBridgeDelegate.setToMoveGroupId("");
} else {
CHAT_UI.refreshContactScreen();
Contact.refreshContactScreen();
}
};
</script>
</body>
......
......@@ -18,7 +18,7 @@
</a>
</div>
<div class="footer_item mx-md-3 collaboration_contents picture_contents video_contents document_contents board_contents">
<a href="javascript:eraserToggle();">
<a href="javascript:toggleEraser();">
<div class="d-flex flex-column justify-content-center" id="eraserBtn">
<div class="t-icon delete my-0"></div>
<span class="text-white txt">削除</span>
......@@ -26,7 +26,7 @@
</a>
</div>
<div class="footer_item mx-md-3 collaboration_contents video_contents_host">
<a href="javascript:captureToggle();">
<a href="javascript:toggleCapture();">
<div class="d-flex flex-column justify-content-center" id="captureBtn">
<div class="t-icon capture my-0"></div>
<span class="text-white txt">キャプチャ</span>
......@@ -34,7 +34,7 @@
</a>
</div>
<div class="footer_item mx-md-3 collaboration_contents video_contents_user">
<a href="javascript:captureRequestToggle();">
<a href="javascript:toggleCaptureRequest();">
<div class="d-flex flex-column justify-content-center" id="captureRequestBtn">
<div class="t-icon capture my-0"></div>
<span class="text-white txt">キャプチャリクエスト</span>
......@@ -42,7 +42,7 @@
</a>
</div>
<div class="footer_item mx-md-3">
<a href="javascript:micTogle();">
<a href="javascript:toggleMic();">
<div class="d-flex flex-column justify-content-center" id="micBtn">
<div class="t-icon voice my-0"></div>
<span class="text-white txt">マイク</span>
......@@ -50,7 +50,7 @@
</a>
</div>
<div class="footer_item mx-md-3 none host_contents">
<a href="javascript:recordTogle();">
<a href="javascript:toggleRecord();">
<div class="d-flex flex-column justify-content-center" id="recordBtn">
<div class="t-icon record my-0"></div>
<span class="text-white txt">録音</span>
......
......@@ -74,22 +74,45 @@ var Common = {};
//loadingIndicatorを表示
Common.showLoadingIndicator = function () {
var h = $(window).height();
const h = $(window).height();
$("#loader-bg ,#loader").height(h).css("display", "block");
};
//loadingIndicatorを表示しない
Common.dismissLoadingIndicator = function () {
var h = $(window).height();
const h = $(window).height();
$("#loader-bg ,#loader").height(h).css("display", "none");
};
Common.refreshForOnline = function () {
serverInfo.isOnline = "true";
$(".footer_item a").removeClass("ui-state-disabled");
if (ChatList != "undefined") {
ChatList.refreshForOnline();
}
if (ChatRoom != "undefined") {
ChatRoom.refreshForOnline();
}
if (Namecard != "undefined") {
Namecard.refreshForOnline();
}
};
Common.refreshForOffline = function () {
serverInfo.isOnline = "false";
$(".footer_item a").addClass("ui-state-disabled");
if (ChatList != "undefined") {
ChatList.refreshForOffline();
}
if (ChatRoom != "undefined") {
ChatRoom.refreshForOffline();
}
if (CollaborationUI != "undefined") {
CollaborationUI.refreshForOffline();
}
if (Namecard != "undefined") {
Namecard.refreshForOffline();
}
};
// #36170 画像パスが存在しない場合はデフォルトの画像を返す
......@@ -99,7 +122,7 @@ Common.getProfileImgUrl = function (path) {
return "./img/noImage.png";
} else {
if (path.includes("/mnt")) {
var userInfo = path.split("/").reverse();
const userInfo = path.split("/").reverse();
return (
serverInfo.cmsURL +
"/chatapi/user?profileFileName=" +
......
......@@ -124,22 +124,6 @@ NativeBridgeDelegate.inviteUsers = function (userIDList) {
}
};
NativeBridgeDelegate.getLoginParameter = function () {
if (typeof android != "undefined") {
android.getLoginParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
}
};
NativeBridgeDelegate.getGlobalParameter = function () {
if (typeof android != "undefined") {
android.getGlobalParameter();
} else {
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
};
NativeBridgeDelegate.saveSelectedUserList = function (selectedUserList) {
if (typeof android != "undefined") {
android.saveSelectedUserList(selectedUserList);
......@@ -377,14 +361,8 @@ ReverseDelegate.leaveRoom = function () {
CHAT_SOCKET.emitLeaveRoom();
};
// 該当チャットルームに参加するためログイン情報をサーバに渡す
getLoginParameter = function () {
Common.dismissLoadingIndicator();
};
// for android call
CHAT_UI.displayExistRoom = function (roomId) {
ReverseDelegate.displayExistRoom = function (roomId) {
if (confirm("error_already_exist_same_user")) {
NativeBridgeDelegate.joinRoom(roomId);
}
......
......@@ -37,7 +37,7 @@ var bindOnNewMessage = function () {
// 画像、動画の描画を待ってからスクロール
setTimeout(function () {
CHAT_UI.scrollToBottom();
ChatRoom.scrollToBottom();
}, 300);
});
};
......
......@@ -49,10 +49,6 @@ var bindOnConnect = function () {
socket.on(SOCKET_KEY.CONNECT, function () {
// socketが接続されたらチャット画面で画面を更新する
$(".overlay").removeClass("active undismissable");
// loadingIndicatorを表示
Common.showLoadingIndicator();
NativeBridgeDelegate.getLoginParameter();
Common.dismissLoadingIndicator();
});
};
......@@ -135,13 +131,9 @@ var bindOnShowServerError = function () {
var bindOnRetryJoinProcess = function () {
socket.on(SOCKET_KEY.RETRY_JOIN_PROCESS, function () {
if (deviceInfo.isiOS() || deviceInfo.isAndroid()) {
NativeBridgeDelegate.getLoginParameter();
} else {
currentUserInfo.configureLanguage();
// webでのsocket connect
CHAT_SOCKET.emitJoin(params, true, true);
}
});
};
......@@ -215,7 +207,7 @@ CHAT_SOCKET.saveRoomInfo = function (roomID, roomName) {
NativeBridgeDelegate.saveVisitRoomInfo(roomID, roomName);
};
CHAT_SOCKET.initialJoin = function() {
CHAT_SOCKET.initialJoin = function () {
CHAT_SOCKET.connectSocket();
const joinInfo = new JoinInfo(
currentUserInfo.sid,
......@@ -226,4 +218,4 @@ CHAT_SOCKET.initialJoin = function() {
currentUserInfo.shopMembeID
);
CHAT_SOCKET.emitJoin(joinInfo, false, false);
}
};
var chatMediaHandler = {};
var ChatMediaHandler = {};
/**
* Image Upload
......@@ -25,7 +25,7 @@ $("#image-form").on("submit", function (e) {
var fd = new FormData($(this)[0]);
console.log($(this)[0]);
//画像の大きさが500pixelより大きかったら、thumbnailを生成
CHAT.createThumbnailAndUpload(
ChatMediaHandler.createThumbnailAndUpload(
file,
function (resizeFile, thumbnailCreated) {
if (resizeFile && thumbnailCreated) {
......@@ -34,7 +34,7 @@ $("#image-form").on("submit", function (e) {
}
// イメージをアップロード
CHAT.uploadImage(fd);
ChatMediaHandler.uploadImage(fd);
}
);
}
......@@ -66,27 +66,27 @@ $("#video-form").on("submit", function (e) {
if (!file.type.includes("image")) {
// video 保存
// CHAT.createVideoThumbnailAndUpload(file, function(resizeFile, thumbnailCreated) {
// ChatMediaHandler.createVideoThumbnailAndUpload(file, function(resizeFile, thumbnailCreated) {
// if(resizeFile && thumbnailCreated) {
// //ただ、画像の大きさが500pixel以下の場合はthumbnailは生成されない
// fd.append('thumb', resizeFile)
// }
// CHAT.uploadImage(fd);
// ChatMediaHandler.uploadImage(fd);
// })
CHAT.uploadImage(fd);
ChatMediaHandler.uploadImage(fd);
return;
}
}
});
// this method call from android only for now
CHAT_UI.videoEncodeFail = function () {
ChatMediaHandler.videoEncodeFail = function () {
alert(getLocalizedString("error_send_video"));
Common.dismissLoadingIndicator();
};
// this method call from android only for now
CHAT_UI.videoEncodeEnd = function (encodedUri) {
ChatMediaHandler.videoEncodeEnd = function (encodedUri) {
var fileName = encodedUri.split("/")[encodedUri.split("/").length - 1];
var fileURL = "file:" + encodedUri;
var xhr = new XMLHttpRequest();
......@@ -182,7 +182,7 @@ CHAT_UI.videoEncodeEnd = function (encodedUri) {
// Video のサムネイルファイル生成する
CHAT.createVideoThumbnailAndUpload = function (sourceImage, callback) {
ChatMediaHandler.createVideoThumbnailAndUpload = function (sourceImage, callback) {
var fileReader = new FileReader();
fileReader.onload = function () {
......@@ -241,7 +241,7 @@ CHAT.createVideoThumbnailAndUpload = function (sourceImage, callback) {
// Ajaxでイメージをアップロードする
CHAT.uploadImage = function (formData) {
ChatMediaHandler.uploadImage = function (formData) {
formData.append("roomId", roomInfo.roomID);
formData.append("sid", currentUserInfo.sid);
jQuery
......@@ -381,7 +381,7 @@ CHAT.uploadImage = function (formData) {
// Thumbnailのファイルを生成する。
CHAT.createThumbnailAndUpload = function (sourceImage, callback) {
ChatMediaHandler.createThumbnailAndUpload = function (sourceImage, callback) {
const fileReader = new FileReader();
const img = new Image();
fileReader.onloadend = function () {
......
// 名前空間
var ARCHIVE_UI = {};
var ArchiveUI = {};
document.addEventListener("DOMContentLoaded", function () {
// アーカイブ検索
......@@ -8,7 +8,7 @@ document.addEventListener("DOMContentLoaded", function () {
bindiOSKeyBoardEvent();
});
ARCHIVE_UI.refreshSearchScreen = function (keyword) {
ArchiveUI.refreshSearchScreen = function (keyword) {
const archiveList = NativeBridgeDataSource.getArchiveByName(keyword);
const typeImage = getArchiveTypeIconURL(archive.archiveType);
......@@ -77,7 +77,7 @@ var bindArchiveSearch = function () {
}
$(".overlay_src_msg").empty();
ARCHIVE_UI.refreshSearchScreen(keyword);
ArchiveUI.refreshSearchScreen(keyword);
if (enterKeyPressed) {
searchInput.blur();
......@@ -93,7 +93,7 @@ var bindiOSKeyBoardEvent = function () {
if (deviceInfo.isiOS()) {
var keyword = searchInput.val();
$(".overlay_src_msg").empty();
ARCHIVE_UI.refreshSearchScreen(keyword);
ArchiveUI.refreshSearchScreen(keyword);
}
});
};
......@@ -113,26 +113,60 @@ var renderArchiveTemplate = function (
});
};
// アーカイブ詳細
CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
/*****************
* アーカイブ詳細
****************/
ArchiveUI.refreshArchiveDetailScreen = function (archiveId) {
// loadingIndicatorを表示
Common.showLoadingIndicator();
// 初期化
$("#archiveDetail").html("");
// アーカイブ詳細の様式を読み込む
const archiveDetailTemplate = $("#archive-detail-template").html();
if (serverInfo.isOnline == "true") {
NativeBridgeDelegate.updateArchiveDetail(archiveId);
}
// アーカイブ詳細取得
const archive = NativeBridgeDataSource.getArchiveDetail(archiveId);
// template archive detail
appendArchiveDetailScreen(archive);
// setup player
appendPlayer(archive);
// append attended users
appendAttendUsers(archive.attendUserIds);
// set languages
currentUserInfo.configureLanguage();
// TODO: peacekim:: check localization works or not
$(".ttl_detail").text(getLocalizedString("detail"));
$("#archiveFileName").text(getLocalizedString("archiveFileName"));
$("#archiveInsertDate").text(getLocalizedString("archiveInsertDate"));
$("#archiveRoomName").text(getLocalizedString("archiveRoomName"));
$("#archiveSaveUser").text(getLocalizedString("archiveSaveUser"));
$("#archiveAttendUser").text(getLocalizedString("archiveAttendUser"));
// チャットルームへのリンク付け
document.getElementById("joinChatRoom").onclick = function () {
NativeBridgeDelegate.joinRoom(archive.roomId, archive.roomName);
};
// loadingIndicatorを非表示
Common.dismissLoadingIndicator();
};
var appendArchiveDetailScreen = function (archive) {
// 保存ユーザ情報を取得
const userInfo = NativeBridgeDataSource.getUserInfo(archive.saveUserId);
userInfo.profileUrl = Common.getProfileImgUrl(userInfo.profileUrl);
// アーカイブ詳細の様式を読み込む
const archiveDetailTemplate = $("#archive-detail-template").html();
// アーカイブ情報を表示
const html = Mustache.render(archiveDetailTemplate, {
fileName: archive.archiveName,
......@@ -146,9 +180,11 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
var obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#archiveDetail").append(obj);
};
var appendPlayer = function (archive) {
// プレイヤーの切り替え
const archiveFilePath = CHAT.createGetDataUrl(
const archiveFilePath = ArchiveUI.createGetDataUrl(
archive.filePath,
archive.roomId
);
......@@ -156,59 +192,73 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
switch (archive.archiveType) {
case "0": // 画像
case 0:
$("#archive_player").prepend(
'<img class="archive_player" src="' + archiveFilePath + '" />'
);
appendImageTypePlayer(archiveFilePath);
break;
case "1": // 動画
case 1:
appendVideoTypePlayer(archiveFilePath);
break;
case "2": // 音声
case 2:
appendVoiceTypePlayer(archiveFilePath);
break;
case "3": // 文書
case 3:
// リリースに文書とその他は含めないため今回は非表示
break;
default:
// リリースに文書とその他は含めないため今回は非表示
}
};
var appendImageTypePlayer = function (filePath) {
$("#archive_player").prepend(
'<img class="archive_player" src="' + filePath + '" />'
);
};
var appendVideoTypePlayer = function (filePath) {
if (deviceInfo.isiOS()) {
$("#archive_player").prepend(
'<video class="archive_player" controls autoplay muted playsinline controlsList="nodownload"><source src="' +
archiveFilePath +
filePath +
'" type="video/mp4"><source src="' +
archiveFilePath +
filePath +
'" type="video/ogv"><source src="' +
archiveFilePath +
filePath +
'" type="video/webm"></video>'
);
} else {
$("#archive_player").prepend(
'<video class="archive_player" src=' +
archiveFilePath +
filePath +
' controls autoplay muted playsinline controlsList="nodownload"></video>'
);
}
break;
case "2": // 音声
case 2:
};
var appendVoiceTypePlayer = function (filePath) {
if (deviceInfo.isiOS()) {
$("#archive_player").prepend(
'<audio class="archive_audio_player" controls controlsList="nodownload"><source src="' +
archiveFilePath +
filePath +
'" type="audio/wav"><source src="' +
archiveFilePath +
filePath +
'" type="audio/ogg"></audio>'
);
} else {
$("#archive_player").prepend(
'<audio class="archive_audio_player" src=' +
archiveFilePath +
filePath +
' controls controlsList="nodownload"></audio>'
);
}
$("#archive_player").prepend(
'<img class="archive_player" src=' + "./img/capture.png" + " />"
);
break;
case "3": // 文書
case 3:
// リリースに文書とその他は含めないため今回は非表示
break;
default:
// リリースに文書とその他は含めないため今回は非表示
}
};
var appendAttendUsers = function (attendedUserList) {
// ユーザの様式を読み込む
const archiveUserTemplate = $("#archive-user-template").html();
......@@ -232,31 +282,14 @@ CHAT_UI.refreshArchiveDetailScreen = function (archiveId) {
const obj = $(jQuery.parseHTML(html)).on("click", function () {
// ネームカード表示
CHAT_UI.makeNameCard(user);
Namecard.makeNameCard(user);
});
$("#attendUser").append(obj);
});
currentUserInfo.configureLanguage();
// TODO: peacekim:: check localization works or not
$(".ttl_detail").text(getLocalizedString("detail"));
$("#archiveFileName").text(getLocalizedString("archiveFileName"));
$("#archiveInsertDate").text(getLocalizedString("archiveInsertDate"));
$("#archiveRoomName").text(getLocalizedString("archiveRoomName"));
$("#archiveSaveUser").text(getLocalizedString("archiveSaveUser"));
$("#archiveAttendUser").text(getLocalizedString("archiveAttendUser"));
// チャットルームへのリンク付け
document.getElementById("joinChatRoom").onclick = function () {
NativeBridgeDelegate.joinRoom(archive.roomId, archive.roomName);
};
// loadingIndicatorを非表示
Common.dismissLoadingIndicator();
};
CHAT.createGetDataUrl = function (fileName, roomId) {
ArchiveUI.createGetDataUrl = function (fileName, roomId) {
var filePath =
serverInfo.cmsURL +
"/chatapi/file/getImage?sid=" +
......@@ -269,7 +302,7 @@ CHAT.createGetDataUrl = function (fileName, roomId) {
};
// アーカイブ一覧
CHAT_UI.refreshArchiveScreen = function () {
ArchiveUI.refreshArchiveScreen = function () {
// loadingIndicatorを表示
Common.showLoadingIndicator();
......
......@@ -9,6 +9,10 @@ $("#tabGroup").on("click", function (e) {
});
document.addEventListener("DOMContentLoaded", function () {
bindChatSearch();
});
var bindChatSearch = function () {
const chatSearchInput = $('#chat .search_form input[type="search"]');
const chatSearchCancel = $("#chat .search_form .cancel");
chatSearchInput.click(function () {
......@@ -25,7 +29,8 @@ document.addEventListener("DOMContentLoaded", function () {
chatSearchInput.keyup(function (e) {
var rooms;
var keyword = chatSearchInput.val();
if (e.KeyCode == 13 || e.key == "Enter") {
const enterKeyPressed = e.KeyCode == 13 || e.key == "Enter";
if (enterKeyPressed) {
if (keyword.length != 0 && keyword != "") {
chatSearchInput.blur();
return;
......@@ -34,24 +39,22 @@ document.addEventListener("DOMContentLoaded", function () {
$(".overlay_src_msg").empty();
return;
}
CHAT.searchRoom(keyword, rooms);
if (e.KeyCode == 13 || e.key == "Enter") {
ChatList.searchRoom(keyword, rooms);
if (enterKeyPressed) {
chatSearchInput.blur();
return;
}
});
// iOSキーボード変換検知用
chatSearchInput.on(
"compositionend",
function () {
chatSearchInput.on("compositionend", function () {
if (deviceInfo.isIOS()) {
var rooms;
var keyword = chatSearchInput.val();
CHAT.searchRoom(keyword, rooms);
}
ChatList.searchRoom(keyword, rooms);
}
);
});
});
};
ChatList.refreshRoomList = function (roomType) {
if (serverInfo.isOnline == "true") {
......@@ -81,82 +84,15 @@ ChatList.refreshRoomList = function (roomType) {
$("#dmChatList").empty();
let roomListTitle = getLocalizedString("roomListTitle");
$("#chatTitle").text(roomListTitle);
if (rooms.length === 0) {
// 検索結果がない場合のメッセージを追加
let emptyListString = getLocalizedString("roomListEmptyString");
switch (roomType) {
case ChatRoomType.GROUP:
$("#groupChatList").append(
`<center class="text-secondary">${emptyListString}</center>`
);
break;
case ChatRoomType.DM:
$("#dmChatList").append(
`<center class="text-secondary">${emptyListString}</center>`
);
break;
default:
}
addEmptyRoomListLabel(roomType);
}
var template = getTemplate(TemplateURL.ROOM_LIST);
const template = getTemplate(TemplateURL.ROOM_LIST);
rooms.forEach(function (room) {
room.profileImagePath = "./images/user-profile.png";
if (room.message) {
room.message = room.message.toString();
} else {
room.message = getLocalizedString("noMessages");
}
var displayMsg;
//TODO 協業の場合処理追加必要
switch (room.messageType) {
case MessageType.TEXT:
displayMsg = room.message;
break;
case MessageType.IMAGE:
displayMsg = getLocalizedString("image");
break;
case MessageType.VIDEO:
displayMsg = getLocalizedString("video");
break;
case MessageType.COMMUNICATIONSTART:
displayMsg = getLocalizedString("collaboration_start");
break;
case MessageType.COMMUNICATIONEND:
displayMsg = getLocalizedString("collaboration_end");
break;
default:
break;
}
var attendUserName = [];
room.attendUsers.forEach(function (user) {
user.profileUrl = Common.getProfileImgUrl(user.profileUrl);
attendUserName.push(user.shopMemberName);
});
var thumbnailCount =
room.attendUsers.length > 4 ? 4 : room.attendUsers.length;
if (room.chatRoomName == "") {
room.chatRoomName = attendUserName.join(", ");
}
var unreadMessageCount = room.unreadCount == 0 ? "" : room.unreadCount;
if (unreadMessageCount > 999) {
unreadMessageCount = "999+";
}
let html = Mustache.render(template, {
thumbnailCount: thumbnailCount,
roomName: room.chatRoomName,
roomId: room.chatRoomId,
profileImage: room.profileImagePath,
lastMessage: displayMsg,
time: room.insertDate
? CHAT_UTIL.formatDate(room.insertDate).createdAt
: "",
unreadMsgCnt: unreadMessageCount,
userCnt: room.attendUsers.length + 1,
attendUsers: room.attendUsers,
});
let html = renderRoom(template, room);
// Click event
let obj = $(jQuery.parseHTML(html)).on("click", function () {
//TODO ルームに入る処理追加必要
......@@ -170,15 +106,52 @@ ChatList.refreshRoomList = function (roomType) {
$("#dmChatList").append(obj);
break;
default:
break;
}
});
console.log("DONE");
Common.dismissLoadingIndicator();
};
var addEmptyRoomListLabel = function (roomType) {
// 検索結果がない場合のメッセージを追加
const emptyListString = getLocalizedString("roomListEmptyString");
switch (roomType) {
case ChatRoomType.GROUP:
$("#groupChatList").append(
`<center class="text-secondary">${emptyListString}</center>`
);
break;
case ChatRoomType.DM:
$("#dmChatList").append(
`<center class="text-secondary">${emptyListString}</center>`
);
break;
default:
}
};
var getDefaultChatRoomName = function (roomAttendUsers) {
let attendUserName = [];
roomAttendUsers.forEach(function (user) {
user.profileUrl = Common.getProfileImgUrl(user.profileUrl);
attendUserName.push(user.shopMemberName);
});
return attendUserName.join(", ");
};
var getUnreadCount = function (roomUnreadCount) {
if (roomUnreadCount == 0) {
return "";
} else if (roomUnreadCount > 999) {
return "999+";
}
return roomUnreadCount;
};
// チャットルーム検索
CHAT.searchRoom = function (keyword, rooms) {
ChatList.searchRoom = function (keyword, rooms) {
const overlayMessage = $(".overlay_src_msg");
overlayMessage.empty();
rooms = NativeBridgeDataSource.getRoomList(ChatRoomType.ALL, keyword);
......@@ -187,11 +160,7 @@ CHAT.searchRoom = function (keyword, rooms) {
var template = getTemplate(TemplateURL.ROOM_LIST);
rooms.forEach(function (room) {
room.profileImagePath = "./images/user-profile.png";
const roomMessage = getRoomMessage(room.message);
const displayMessage = getDisplayMessage(room.messageType, roomMessage);
let html = renderRoom(template, room, displayMessage);
let html = renderRoom(template, room);
// Click event
let obj = jQuery.parseHTML(html);
......@@ -227,24 +196,25 @@ var getDisplayMessage = function (messageType, roomMessage) {
case MessageType.COMMUNICATIONEND:
return getLocalizedString("collaboration_end");
default:
return "";
return roomMessage;
}
};
var renderRoom = function (template, room, displayMessage) {
var attendUserName = [];
room.attendUsers.forEach(function (user) {
user.profileUrl = Common.getProfileImgUrl(user.profileUrl);
attendUserName.push(user.shopMemberName);
});
var renderRoom = function (template, room) {
room.profileImagePath = "./images/user-profile.png";
const roomMessage = getRoomMessage(room.message);
const displayMessage = getDisplayMessage(room.messageType, roomMessage);
const thumbnailCount =
room.attendUsers.length > 4 ? 4 : room.attendUsers.length;
const time = room.insertDate
? CHAT_UTIL.formatDate(room.insertDate).createdAt
: "";
if (room.chatRoomName == "") {
room.chatRoomName = attendUserName.join(", ");
room.chatRoomName = getDefaultChatRoomName(room.attendUsers);
}
const messageUnreadCount = getUnreadCount(room.unreadCount);
return Mustache.render(template, {
thumbnailCount: thumbnailCount,
roomName: room.chatRoomName,
......@@ -252,24 +222,22 @@ var renderRoom = function (template, room, displayMessage) {
profileImage: room.profileImagePath,
lastMessage: displayMessage,
time: time,
unreadMsgCnt: room.unreadCount == 0 ? "" : room.unreadCount,
unreadMsgCnt: messageUnreadCount,
userCnt: room.attendUsers.length + 1,
attendUsers: room.attendUsers,
});
};
CHAT_UI.refreshForOnline = function () {
serverInfo.isOnline = "true";
$(".craeteRoomButton").off("click", CHAT_UI.offlineHandler);
ChatList.refreshForOnline = function () {
$(".craeteRoomButton").off("click", ChatList.offlineHandler);
$(".craeteRoomButton").css("opacity", "1.0");
};
CHAT_UI.refreshForOffline = function () {
serverInfo.isOnline = "false";
$(".craeteRoomButton").on("click", CHAT_UI.offlineHandler);
ChatList.refreshForOffline = function () {
$(".craeteRoomButton").on("click", ChatList.offlineHandler);
$(".craeteRoomButton").css("opacity", "0.3");
}
};
CHAT_UI.offlineHandler = function (e) {
ChatList.offlineHandler = function (e) {
e.preventDefault();
};
var lastscrollvalue;
var beforeHeight = window.innerHeight;
var beforeWidth = window.innerWidth;
var beforeScroll;
var ChatRoom = {};
window.onscroll = function () {
if (beforeScroll == window.scrollY) {
return;
......@@ -19,7 +20,7 @@ window.onscroll = function () {
const messageId = $($(".chat_message").get(0)).data("messageid");
NativeBridgeDelegate.updatePreMessage(messageId);
let messages = NativeBridgeDataSource.getMessagesWithMessageId(messageId);
CHAT_UI.prependMessage(messages);
ChatRoom.prependMessage(messages);
loader.remove();
var afterHeight = $(".room_container").height();
window.scroll(0, afterHeight - beforeHeight);
......@@ -28,80 +29,24 @@ window.onscroll = function () {
};
document.addEventListener("DOMContentLoaded", function () {
// 検索アイコン押下イベント
$(".nav_item_wrap .search_menu").click(function () {
$(".nav_item_wrap").addClass("none");
$(".footer-wrap").addClass("none");
$(".chat_room_src_form").removeClass("none");
$(".room_container").addClass("none");
$(".overlay_src_msg").removeClass("none");
// フィルタ表示
$("#filter").removeClass("none");
$("#user_list").addClass("none");
$('.chat_room_src_form input[type="search"]').focus();
$("#searchMessage").addClass("onfocus");
$(".chat_list").removeClass("none");
});
$(".chat_room_src_form .cancel").click(function () {
$(".nav_item_wrap").removeClass("none");
$(".footer-wrap").removeClass("none");
$(".chat_room_src_form").addClass("none");
$(".chat_room_src_form input").val("");
$(".room_container").removeClass("none");
$(".overlay_src_msg").empty();
// ユーザーリスト表示
$("#filter").addClass("none");
$("#user_list").removeClass("none");
$('.chat_room_src_form input[type="search"]').blur();
$("#searchMessage").removeClass("onfocus");
$(".chat_list").addClass("none");
CHAT_UI.scrollToBottom();
});
$('.chat_room_src_form input[type="search"]').click(function () {
if ($("#searchMessage").hasClass("onfocus")) {
$("#searchMessage").removeClass("onfocus");
$("#searchMessage").blur();
} else {
$("#searchMessage").addClass("onfocus");
$("#searchMessage").focus();
}
});
$("#searchMessage").blur(function () {
$("#searchMessage").removeClass("onfocus");
});
// フィルタ選択イベント
$(document).on("click", "#filter .img_wrap", function (event) {
// チェックアイコン追加
$(this).toggleClass("filter");
});
bindSearchUI();
var footerHeight = $(".footer-wrap").height();
window.addEventListener("resize", function () {
var afterHeight = window.innerHeight;
var afterWidth = window.innerWidth;
var moreScroll = beforeHeight - afterHeight;
const footerHeight = $(".footer_content_b").height();
if (beforeHeight > afterHeight && beforeHeight - afterHeight > 50) {
if (deviceInfo.isiOS()) {
window.scrollTo(0, beforeScroll + moreScroll);
} else if (beforeWidth == afterWidth) {
//キーボード表示時
$(".room_container").css("margin-bottom", 0);
window.scrollTo(
0,
beforeScroll + moreScroll - $(".footer_content_b").height()
);
window.scrollTo(0, beforeScroll + moreScroll - footerHeight);
} else {
//画面回転時
window.scrollTo(
0,
beforeScroll + moreScroll * 2 - $(".footer_content_b").height()
);
window.scrollTo(0, beforeScroll + moreScroll * 2 - footerHeight);
}
} else if (beforeHeight < afterHeight) {
$(".room_container").css("margin-bottom", footerHeight);
......@@ -109,16 +54,10 @@ document.addEventListener("DOMContentLoaded", function () {
window.scrollTo(0, beforeScroll + moreScroll);
} else if (beforeWidth == afterWidth) {
//キーボード非表示
window.scrollTo(
0,
beforeScroll + moreScroll + $(".footer_content_b").height()
);
window.scrollTo(0, beforeScroll + moreScroll + footerHeight);
} else {
//画面回転時
window.scrollTo(
0,
beforeScroll + moreScroll * 2 + $(".footer_content_b").height()
);
window.scrollTo(0, beforeScroll + moreScroll * 2 + footerHeight);
}
}
beforeHeight = window.innerHeight;
......@@ -131,42 +70,115 @@ document.addEventListener("DOMContentLoaded", function () {
beforeScroll = window.scrollY;
});
$(".message_input_form").on("focus", function (e) {
setTimeout(function () {
$(".message_input_send").removeClass("none");
$(".attach_file").addClass("none");
$(".footer_content_b").addClass("none");
}, 10);
});
$(".message_input_form").on("focusout", function (e) {
setTimeout(function () {
if ($(e.relatedTarget).hasClass("message_input_send")) {
ChatRoom.sendMessage();
} else {
$(".message_input_send").addClass("none");
$(".attach_file").removeClass("none");
$(".footer_content_b").removeClass("none");
}
}, 10);
});
});
var bindSearchUI = function () {
const chatSearchForm = $(".chat_room_src_form");
const chatSearchInput = $('.chat_room_src_form input[type="search"]');
const searchMessage = $("#searchMessage");
// 検索アイコン押下イベント
$(".nav_item_wrap .search_menu").click(function () {
$(".nav_item_wrap").addClass("none");
$(".footer-wrap").addClass("none");
chatSearchForm.removeClass("none");
$(".room_container").addClass("none");
$(".overlay_src_msg").removeClass("none");
// フィルタ表示
$("#filter").removeClass("none");
$("#user_list").addClass("none");
chatSearchInput.focus();
searchMessage.addClass("onfocus");
$(".chat_list").removeClass("none");
});
$(".chat_room_src_form .cancel").click(function () {
$(".nav_item_wrap").removeClass("none");
$(".footer-wrap").removeClass("none");
chatSearchForm.addClass("none");
$(".chat_room_src_form input").val("");
$(".room_container").removeClass("none");
$(".overlay_src_msg").empty();
// ユーザーリスト表示
$("#filter").addClass("none");
$("#user_list").removeClass("none");
chatSearchInput.blur();
searchMessage.removeClass("onfocus");
$(".chat_list").addClass("none");
ChatRoom.scrollToBottom();
});
chatSearchInput.click(function () {
if (searchMessage.hasClass("onfocus")) {
searchMessage.removeClass("onfocus");
searchMessage.blur();
} else {
searchMessage.addClass("onfocus");
searchMessage.focus();
}
});
searchMessage.blur(function () {
searchMessage.removeClass("onfocus");
});
// チャットルーム
// メッセージ検索イベント
$('.chat_room_src_form input[type="search"]').keyup(function (e) {
chatSearchInput.keyup(function (e) {
let workVal = "";
var keyword = $('.chat_room_src_form input[type="search"]').val();
if (e.key == "Enter" || e.KeyCode == 13) {
const keyword = chatSearchInput.val();
const enterKeyPressed = e.key == "Enter" || e.KeyCode == 13;
if (enterKeyPressed) {
if (keyword != "" && keyword.length != 0) {
$('.chat_room_src_form input[type="search"]').blur();
chatSearchInput.blur();
return;
}
} else if (keyword == "" || keyword.length < 2) {
$(".overlay_src_msg").empty();
return;
}
CHAT.searchMessage(keyword, workVal);
if (e.key == "Enter" || e.KeyCode == 13) {
$("#searchMessage").removeClass("onfocus");
$('.chat_room_src_form input[type="search"]').blur();
ChatRoom.searchMessage(keyword, workVal);
if (enterKeyPressed) {
searchMessage.removeClass("onfocus");
chatSearchInput.blur();
return;
}
});
// iOSキーボード変換検知用
$('.chat_room_src_form input[type="search"]').on(
"compositionend",
function () {
chatSearchInput.on("compositionend", function () {
if (deviceInfo.isIOS()) {
let workVal = "";
var keyword = $('.chat_room_src_form input[type="search"]').val();
CHAT.searchMessage(keyword, workVal);
}
var keyword = chatSearchInput.val();
ChatRoom.searchMessage(keyword, workVal);
}
);
});
$(document).on("click", ".filter_img", function (event) {
let workVal = "";
var keyword = $('.chat_room_src_form input[type="search"]').val();
var keyword = chatSearchInput.val();
$(".overlay_src_msg").empty();
let checkedUserList = getCheckedUserList();
if (keyword.length == 1) {
......@@ -176,8 +188,8 @@ document.addEventListener("DOMContentLoaded", function () {
keyword,
checkedUserList.join(",")
);
var userMessageTemplate = getTemplate(TemplateURL.USER_MESSAGE);
var myMessageTemplate = getTemplate(TemplateURL.MY_MESSAGE);
const userMessageTemplate = getTemplate(TemplateURL.USER_MESSAGE);
const myMessageTemplate = getTemplate(TemplateURL.MY_MESSAGE);
let jQueryMessages = $(".overlay_src_msg");
messages.forEach(function (message) {
......@@ -222,26 +234,12 @@ document.addEventListener("DOMContentLoaded", function () {
jQueryMessages.prepend(workVal);
});
$(".message_input_form").on("focus", function (e) {
setTimeout(function () {
$(".message_input_send").removeClass("none");
$(".attach_file").addClass("none");
$(".footer_content_b").addClass("none");
}, 10);
});
$(".message_input_form").on("focusout", function (e) {
setTimeout(function () {
if ($(e.relatedTarget).hasClass("message_input_send")) {
CHAT_UI.sendMessage();
} else {
$(".message_input_send").addClass("none");
$(".attach_file").removeClass("none");
$(".footer_content_b").removeClass("none");
}
}, 10);
// フィルタ選択イベント
$(document).on("click", "#filter .img_wrap", function (event) {
// チェックアイコン追加
$(this).toggleClass("filter");
});
});
};
var getCheckedUserList = function () {
let checkedUserList = [];
......@@ -253,7 +251,7 @@ var getCheckedUserList = function () {
};
// メッセージ検索
CHAT.searchMessage = function (keyword, workVal) {
ChatRoom.searchMessage = function (keyword, workVal) {
$(".overlay_src_msg").empty();
var checkedUserList = [];
$(".img_wrap.filter").each(function (user) {
......@@ -350,7 +348,7 @@ $("#messages").scroll(function () {
}
});
CHAT_UI.startCollaboration = function (collaborationType) {
ChatRoom.startCollaboration = function (collaborationType) {
if (deviceInfo.isAndroid()) {
if (
collaborationType == COLLABORATION_TYPE.DOCUMENT &&
......@@ -373,7 +371,7 @@ CHAT_UI.startCollaboration = function (collaborationType) {
NativeBridgeDelegate.startCollaboration(collaborationType);
};
CHAT_UI.sendMessage = function (e) {
ChatRoom.sendMessage = function (e) {
const messageTextBox = $("#messageInput");
const message =
messageTextBox.val().length > 0
......@@ -388,7 +386,7 @@ CHAT_UI.sendMessage = function (e) {
$(".message_input_form").focus();
};
CHAT_UI.loadMessages = function (roomId, joinRoomName) {
ChatRoom.loadMessages = function (roomId, joinRoomName) {
roomName = joinRoomName;
if (serverInfo.isOnline == "true") {
Common.refreshForOnline();
......@@ -405,10 +403,6 @@ CHAT_UI.loadMessages = function (roomId, joinRoomName) {
$("#roomTitle").text(roomName).data("roomName", roomName);
let jQueryMessages = $("#messages");
// スクロールの変化を防ぐため以前画面の高さを保存する
let beforeHeight = jQueryMessages.prop("scrollHeight");
var userTemplate = getTemplate(TemplateURL.USER_LIST);
var topUserListTemplate = getTemplate(TemplateURL.CHATROOM_USER_LIST);
......@@ -431,27 +425,24 @@ CHAT_UI.loadMessages = function (roomId, joinRoomName) {
let filterObj = jQuery.parseHTML(filterHtml);
$("#filter").append(filterObj);
CHAT_UI.prependMessage(messages);
ChatRoom.prependMessage(messages);
CHAT_UI.waitForLoadingImage(jQueryMessages, CHAT_UI.scrollToBottom);
CHAT_UI.waitForLoadingVideo(jQueryMessages, CHAT_UI.scrollToBottom);
ChatRoom.waitForLoadingImage(jQueryMessages, ChatRoom.scrollToBottom);
ChatRoom.waitForLoadingVideo(jQueryMessages, ChatRoom.scrollToBottom);
if (deviceInfo.isiOS()) {
$(window).on("load", function () {
CHAT_UI.scrollToBottom();
ChatRoom.scrollToBottom();
});
}
};
CHAT_UI.prependMessage = function (messages) {
ChatRoom.prependMessage = function (messages) {
var now = new Date();
let jQueryMessages = $("#messages");
// スクロールの変化を防ぐため以前画面の高さを保存する
let beforeHeight = jQueryMessages.prop("scrollHeight");
// メッセージ文字列の生成
let workVal = "";
var userTemplate = getTemplate(TemplateURL.USER_LIST);
var userMessageTemplate = getTemplate(TemplateURL.USER_MESSAGE);
......@@ -589,7 +580,7 @@ CHAT_UI.prependMessage = function (messages) {
// 画像の読み込みが全て終わったタイミングでコールバック実行
// FIXME 追加読み込みの場合は差分の画像のみ監視すべきだが、現状新規入室時にしか対応出来ていない。
CHAT_UI.waitForLoadingVideo = function (div, callback) {
ChatRoom.waitForLoadingVideo = function (div, callback) {
Common.showLoadingIndicator();
// var imgs = document.getElementsByTagName("video");
var video = div.find("video");
......@@ -607,7 +598,7 @@ CHAT_UI.waitForLoadingVideo = function (div, callback) {
});
};
CHAT_UI.waitForLoadingImage = function (div, callback) {
ChatRoom.waitForLoadingImage = function (div, callback) {
var imgs = div.find("img");
var count = imgs.length;
if (count == 0) callback();
......@@ -627,7 +618,7 @@ CHAT_UI.waitForLoadingImage = function (div, callback) {
});
};
CHAT_UI.scrollToBottom = function () {
ChatRoom.scrollToBottom = function () {
const messages = $(".room_contents");
const scrollHeight = messages.prop("scrollHeight");
//messages.scrollTop(scrollHeight);
......@@ -639,8 +630,7 @@ CHAT_UI.scrollToBottom = function () {
);
};
CHAT_UI.refreshForOnline = function () {
serverInfo.isOnline = "true";
ChatRoom.refreshForOnline = function () {
$("#videoUploadButton").removeClass("ui-state-disabled");
$("#imageInputButton").removeClass("ui-state-disabled");
$("#messageSend").prop("disabled", false);
......@@ -655,8 +645,7 @@ CHAT_UI.refreshForOnline = function () {
}
};
CHAT_UI.refreshForOffline = function () {
serverInfo.isOnline = "false";
ChatRoom.refreshForOffline = function () {
$("#videoUploadButton").addClass("ui-state-disabled");
$("#imageInputButton").addClass("ui-state-disabled");
$("#messageSend").prop("disabled", true);
......
......@@ -146,21 +146,20 @@ var renderUserTemplate = function (userTemplate, userList) {
};
$("#addUserConfirmBtn").on("click", function (e) {
const selectedUserList =
ChatManagementCommon.selectedUserList.join(",");
const selectedUserList = ChatManagementCommon.selectedUserList.join(",");
NativeBridgeDelegate.saveSelectedUserList(selectedUserList);
$("#addUserForm").submit();
});
$("#tabAllGroupOnAddUser").on("click", function (e) {
CHAT_UI.refreshAllGroupForAddUser("0");
ChatAddUser.refreshAllGroupForAddUser("0");
});
$("#tabMyGroupOnAddUser").on("click", function (e) {
CHAT_UI.refreshMyGroupForAddUser();
ChatAddUser.refreshMyGroupForAddUser();
});
CHAT_UI.refreshMyGroupForAddUser = function () {
ChatAddUser.refreshMyGroupForAddUser = function () {
$(".modal-backdrop").remove();
$("#favoriteListForMakeRoom").html("");
$("#myGroupListForMakeRoom").html("");
......@@ -168,17 +167,21 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
let contactListTitle = getLocalizedString("userSearch");
$("#title").text(contactListTitle);
// グループの様式を読み込む
var groupTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_LIST);
// ユーザの様式を読み込む
var userTemplate = getTemplate(TemplateURL.ADD_USER_USER_LIST);
var groupUserTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_USER_LIST);
NativeBridgeDelegate.updateContactInfo();
//お気に入りグループ取得。
var favoriteGroupList = NativeBridgeDataSource.getFavoriteGroups();
// お気に入りグループ表示
ChatAddUser.appendFavoriteGroup();
// お気に入りユーザー表示
ChatAddUser.appendFavoriteUser();
// マイグループ表示
ChatAddUser.appendMyGroupList();
};
ChatAddUser.appendFavoriteGroup = function () {
// グループの様式を読み込む
const groupTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_LIST);
// お気に入りグループ取得。
const favoriteGroupList = NativeBridgeDataSource.getFavoriteGroups();
favoriteGroupList.forEach(function (favoriteGroup) {
let html = Mustache.render(groupTemplate, {
name: favoriteGroup.groupName,
......@@ -188,8 +191,13 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#favoriteListForMakeRoom").append(obj);
});
};
ChatAddUser.appendFavoriteUser = function () {
// ユーザの様式を読み込む
const userTemplate = getTemplate(TemplateURL.ADD_USER_USER_LIST);
//お気に入りユーザ取得。
var favoriteUserList = NativeBridgeDataSource.getFavoriteUsersNotInRoom();
const favoriteUserList = NativeBridgeDataSource.getFavoriteUsersNotInRoom();
favoriteUserList.forEach(function (favoriteUser) {
favoriteUser.profileUrl = Common.getProfileImgUrl(favoriteUser.profileUrl);
let findObj = ChatManagementCommon.selectedUserList.find(function (
......@@ -206,8 +214,11 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
});
let obj = jQuery.parseHTML(html);
$("#favoriteListForMakeRoom").append(obj);
};
var myGroupList = NativeBridgeDataSource.getMyGroupUsersNotInRoom();
ChatAddUser.appendMyGroupList = function () {
const groupUserTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_USER_LIST);
const myGroupList = NativeBridgeDataSource.getMyGroupUsersNotInRoom();
myGroupList.forEach(function (myGroup) {
myGroup.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = Common.getProfileImgUrl(groupUser.profileUrl);
......@@ -230,44 +241,40 @@ CHAT_UI.refreshMyGroupForAddUser = function () {
});
};
CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
var groupId = paramGroupId;
ChatAddUser.refreshAllGroupForAddUser = function (paramGroupId) {
$(".cancel").addClass("none");
$(".search_form input").removeClass("focus");
$(".search_form input").val("");
$(".search_form form").removeClass();
$(".content").removeClass("none");
$(".overlay_src_msg").empty();
$("#tabAllGroupOnAddUser").prop("checked", true);
let groupId = paramGroupId;
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate.updateGroupInfo(groupId);
//画面エリアを初期化。
$("#parentGroupBtnForAddUser").off();
$("#rootGroupBtnForAddUser").off();
$("#childGroupListAreaForAddUser").html("");
$("#userInGroupListForAddUser").html("");
$("#groupPathAreaForAddUser").html("");
initialzScreen();
//DBからグループ情報を取得。
var result = NativeBridgeDataSource.getGroupInfoForAddUser(groupId);
const result = NativeBridgeDataSource.getGroupInfoForAddUser(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
$("#parentGroupBtnForAddUser").on("click", function () {
CHAT_UI.refreshAllGroupForAddUser(result.parentGroupId);
ChatAddUser.refreshAllGroupForAddUser(result.parentGroupId);
});
}
if (typeof result.rootGroupId !== "undefined") {
if (paramGroupId == 0) {
groupId = result.rootGroupId;
}
$("#rootGroupBtnForAddUser").on("click", function () {
CHAT_UI.refreshAllGroupForAddUser(result.rootGroupId);
ChatAddUser.refreshAllGroupForAddUser(result.rootGroupId);
});
}
if (groupId == result.rootGroupId || paramGroupId == "0") {
$("#rootGroupArea").addClass("none");
$("#parentGroupArea").addClass("none");
......@@ -275,11 +282,30 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
$("#rootGroupArea").removeClass("none");
$("#parentGroupArea").removeClass("none");
}
//該当グループのパースを表示。
var groupPathTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_PATH);
var groupPathCount = 0;
result.groupPathList.forEach(function (groupPath) {
if (!(groupPathCount < result.groupPathList.length - 3)) {
appendGroupPath(result.groupPathList);
//該当グループの下位グループ表示。
appendGroupInGroup(result.childGroupList);
//該当グループの所属ユーザを表示。
appendUserInGroup(result.groupUserList);
};
var initialzScreen = function () {
$("#parentGroupBtnForAddUser").off();
$("#rootGroupBtnForAddUser").off();
$("#childGroupListAreaForAddUser").html("");
$("#userInGroupListForAddUser").html("");
$("#groupPathAreaForAddUser").html("");
};
var appendGroupPath = function (groupPathList) {
const groupPathTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_PATH);
let groupPathCount = 0;
groupPathList.forEach(function (groupPath) {
if (!(groupPathCount < groupPathList.length - 3)) {
let html = Mustache.render(groupPathTemplate, {
name: groupPath.groupName,
id: groupPath.groupId,
......@@ -289,11 +315,12 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
}
groupPathCount++;
});
};
//該当グループの下位グループ表示。
var groupTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_LIST);
var appendGroupInGroup = function (childGroupList) {
const groupTemplate = getTemplate(TemplateURL.ADD_USER_GROUP_LIST);
result.childGroupList.forEach(function (childGroup) {
childGroupList.forEach(function (childGroup) {
let html = Mustache.render(groupTemplate, {
name: childGroup.groupName,
id: childGroup.groupId,
......@@ -302,10 +329,11 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#childGroupListAreaForAddUser").append(obj);
});
};
//該当グループの所属ユーザを表示。
var appendUserInGroup = function (groupUserList) {
const userTemplate = getTemplate(TemplateURL.ADD_USER_USER_LIST);
result.groupUserList.forEach(function (groupUser) {
groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = Common.getProfileImgUrl(groupUser.profileUrl);
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberId
......@@ -317,7 +345,7 @@ CHAT_UI.refreshAllGroupForAddUser = function (paramGroupId) {
}
});
let html = Mustache.render(userTemplate, {
userList: result.groupUserList,
userList: groupUserList,
});
let obj = jQuery.parseHTML(html);
$("#userInGroupListForAddUser").append(obj);
......
// 名前空間
var CHAT_MAKE_ROOM = {};
var ChatMakeRoom = {};
document.addEventListener("DOMContentLoaded", function () {
// メンバー検索
......@@ -12,7 +12,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
// メンバー検索
CHAT_MAKE_ROOM.searchUser = function (keyword) {
ChatMakeRoom.searchUser = function (keyword) {
const overlayMessage = $(".overlay_src_msg");
const isAllGroup = $("#tabAllGroupOnMakeRoom").is(":checked");
let hasNoData = false;
......@@ -31,15 +31,15 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
});
//ユーザデータ検索
var userList = NativeBridgeDataSource.getAllGroupShopMemberByName(keyword);
const userList = NativeBridgeDataSource.getAllGroupShopMemberByName(keyword);
searchUserData(userList);
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
let html = renderUser(userTemplate, userList);
let obj = jQuery.parseHTML(html);
overlayMessage.append(obj);
hasNoData = groupList.length == 0 && userList.length == 0;
//連絡先画面
} else {
} else { // 連絡先画面
const userList = NativeBridgeDataSource.getMyGroupShopMemberByName(keyword);
searchUserData(userList);
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
......@@ -79,7 +79,7 @@ var searchMember = function () {
$(".overlay_src_msg").empty();
return false;
}
CHAT_MAKE_ROOM.searchUser(keyword);
ChatMakeRoom.searchUser(keyword);
if (enterKeyPressed) {
searchInput.blur();
return;
......@@ -92,7 +92,7 @@ var bindiOSKeyBoardEvent = function () {
searchInput.on("compositionend", function () {
if (deviceInfo.isiOS()) {
var keyword = searchInput.val();
CHAT_MAKE_ROOM.searchUser(keyword);
ChatMakeRoom.searchUser(keyword);
}
});
};
......@@ -139,14 +139,14 @@ $("#makeRoomConfirmBtn").on("click", function (e) {
});
$("#tabAllGroupOnMakeRoom").on("click", function (e) {
ChatManagementCommon.refreshAllGroupForMakeRoom("0");
ChatMakeRoom.refreshAllGroupForMakeRoom("0");
});
$("#tabMyGroupOnMakeRoom").on("click", function (e) {
CHAT_UI.refreshMyGroupForMakeRoom();
ChatMakeRoom.refreshMyGroupForMakeRoom();
});
CHAT_UI.refreshMyGroupForMakeRoom = function () {
ChatMakeRoom.refreshMyGroupForMakeRoom = function () {
$(".modal-backdrop").remove();
$("#favoriteListForMakeRoom").html("");
$("#myGroupListForMakeRoom").html("");
......@@ -216,3 +216,99 @@ CHAT_UI.refreshMyGroupForMakeRoom = function () {
$("#myGroupListForMakeRoom").append(obj);
});
};
ChatMakeRoom.refreshAllGroupForMakeRoom = function (paramGroupId) {
var groupId = paramGroupId;
$(".cancel").addClass("none");
$(".search_form input").removeClass("focus");
$(".search_form input").val("");
$(".search_form form").removeClass();
$(".content").removeClass("none");
$(".overlay_src_msg").empty();
$("#tabAllGroupOnMakeRoom").prop("checked", true);
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate.updateGroupInfo(groupId);
//画面エリアを初期化。
$("#parentGroupBtnForMakeRoom").off();
$("#rootGroupBtnForMakeRoom").off();
$("#childGroupListAreaForMakeRoom").html("");
$("#userInGroupListForMakeRoom").html("");
$("#groupPathAreaForMakeRoom").html("");
//DBからグループ情報を取得。
var result = NativeBridgeDataSource.getGroupInfo(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
$("#parentGroupBtnForMakeRoom").on("click", function () {
ChatMakeRoom.refreshAllGroupForMakeRoom(result.parentGroupId);
});
}
if (typeof result.rootGroupId !== "undefined") {
if (paramGroupId == 0) {
groupId = result.rootGroupId;
}
$("#rootGroupBtnForMakeRoom").on("click", function () {
ChatMakeRoom.refreshAllGroupForMakeRoom(result.rootGroupId);
});
}
if (groupId == result.rootGroupId || paramGroupId == "0") {
$("#rootGroupArea").addClass("none");
$("#parentGroupArea").addClass("none");
} else {
$("#rootGroupArea").removeClass("none");
$("#parentGroupArea").removeClass("none");
}
//該当グループのパースを表示。
var groupPathTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_PATH);
var groupPathCount = 0;
result.groupPathList.forEach(function (groupPath) {
if (!(groupPathCount < result.groupPathList.length - 3)) {
let html = Mustache.render(groupPathTemplate, {
name: groupPath.groupName,
id: groupPath.groupId,
});
let obj = jQuery.parseHTML(html);
$("#groupPathAreaForMakeRoom").append(obj);
}
groupPathCount++;
});
//該当グループの下位グループ表示。
var groupTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
result.childGroupList.forEach(function (childGroup) {
let html = Mustache.render(groupTemplate, {
name: childGroup.groupName,
id: childGroup.groupId,
});
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#childGroupListAreaForMakeRoom").append(obj);
});
//該当グループの所属ユーザを表示。
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
result.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = Common.getProfileImgUrl(groupUser.profileUrl);
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberId
) {
return shopMemberId == groupUser.shopMemberId;
});
if (findObj) {
groupUser.checked = "checked";
}
});
let html = Mustache.render(userTemplate, {
userList: result.groupUserList,
});
let obj = jQuery.parseHTML(html);
$("#userInGroupListForMakeRoom").append(obj);
};
\ No newline at end of file
......@@ -155,101 +155,6 @@ ChatManagementCommon.showAddUserConfirmView = function () {
});
};
ChatManagementCommon.refreshAllGroupForMakeRoom = function (paramGroupId) {
var groupId = paramGroupId;
$(".cancel").addClass("none");
$(".search_form input").removeClass("focus");
$(".search_form input").val("");
$(".search_form form").removeClass();
$(".content").removeClass("none");
$(".overlay_src_msg").empty();
$("#tabAllGroupOnMakeRoom").prop("checked", true);
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate.updateGroupInfo(groupId);
//画面エリアを初期化。
$("#parentGroupBtnForMakeRoom").off();
$("#rootGroupBtnForMakeRoom").off();
$("#childGroupListAreaForMakeRoom").html("");
$("#userInGroupListForMakeRoom").html("");
$("#groupPathAreaForMakeRoom").html("");
//DBからグループ情報を取得。
var result = NativeBridgeDataSource.getGroupInfo(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
$("#parentGroupBtnForMakeRoom").on("click", function () {
ChatManagementCommon.refreshAllGroupForMakeRoom(result.parentGroupId);
});
}
if (typeof result.rootGroupId !== "undefined") {
if (paramGroupId == 0) {
groupId = result.rootGroupId;
}
$("#rootGroupBtnForMakeRoom").on("click", function () {
CHAChatManagementCommon_UI.refreshAllGroupForMakeRoom(result.rootGroupId);
});
}
if (groupId == result.rootGroupId || paramGroupId == "0") {
$("#rootGroupArea").addClass("none");
$("#parentGroupArea").addClass("none");
} else {
$("#rootGroupArea").removeClass("none");
$("#parentGroupArea").removeClass("none");
}
//該当グループのパースを表示。
var groupPathTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_PATH);
var groupPathCount = 0;
result.groupPathList.forEach(function (groupPath) {
if (!(groupPathCount < result.groupPathList.length - 3)) {
let html = Mustache.render(groupPathTemplate, {
name: groupPath.groupName,
id: groupPath.groupId,
});
let obj = jQuery.parseHTML(html);
$("#groupPathAreaForMakeRoom").append(obj);
}
groupPathCount++;
});
//該当グループの下位グループ表示。
var groupTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
result.childGroupList.forEach(function (childGroup) {
let html = Mustache.render(groupTemplate, {
name: childGroup.groupName,
id: childGroup.groupId,
});
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#childGroupListAreaForMakeRoom").append(obj);
});
//該当グループの所属ユーザを表示。
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
result.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = Common.getProfileImgUrl(groupUser.profileUrl);
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberId
) {
return shopMemberId == groupUser.shopMemberId;
});
if (findObj) {
groupUser.checked = "checked";
}
});
let html = Mustache.render(userTemplate, {
userList: result.groupUserList,
});
let obj = jQuery.parseHTML(html);
$("#userInGroupListForMakeRoom").append(obj);
};
ChatManagementCommon.checkForMakeChat = function (checkMemberId) {
let findObj = ChatManagementCommon.selectedUserList.find(function (
shopMemberId
......
var CollaborationUI = {};
document.addEventListener("DOMContentLoaded", function () {
no_scroll();
disableScroll();
// メニューオーバーレイ表示
$(".menu_btn").click(function () {
......@@ -19,17 +21,17 @@ document.addEventListener("DOMContentLoaded", function () {
.css({ transform: "translateX(" & -w & ")" });
if ($(this).hasClass("hide")) {
return_scroll();
enableScroll();
} else {
scrollTo(0, 0);
no_scroll();
disableScroll();
}
});
// モーダルonモーダル(前のモーダルを非表示に)
// ホスト変更ボタン押下イベント
$(".ch_host_btn").click(function () {
var target = $(this).val();
const target = $(this).val();
changeModal(target, "changeHostModal");
});
......@@ -42,7 +44,7 @@ document.addEventListener("DOMContentLoaded", function () {
// 閉じるイベント
$(".close_btn").click(function () {
$("#overlay_add_user_list").addClass("none");
no_scroll();
disableScroll();
});
// ユーザー追加イベント
......@@ -52,10 +54,10 @@ document.addEventListener("DOMContentLoaded", function () {
// ユーザー招待メンバー検索
$(".add_user_btn").click(function () {
return_scroll();
enableScroll();
Common.showLoadingIndicator();
ChatManagementCommon.selectedUserList = [];
CHAT_UI.refreshMyGroupForAddUserInCollaboration();
CollaborationUI.refreshMyGroupForAddUserInCollaboration();
$("#addUserConfirmBtnInCollaboration")
.off()
.on("click", function () {
......@@ -63,7 +65,7 @@ document.addEventListener("DOMContentLoaded", function () {
const selectedUserList =
ChatManagementCommon.selectedUserList.join(",");
NativeBridgeDelegate.saveSelectedUserList(selectedUserList);
CHAT_UI.confirmInviteUserListInCollaboration();
CollaborationUI.confirmInviteUserListInCollaboration();
});
});
});
......@@ -75,12 +77,12 @@ function penOff() {
}
}
function no_scroll() {
function disableScroll() {
document.addEventListener("mousewheel", scroll_control, { passive: false });
document.addEventListener("touchmove", scroll_control, { passive: false });
}
// スクロール禁止解除
function return_scroll() {
function enableScroll() {
document.removeEventListener("mousewheel", scroll_control, {
passive: false,
});
......@@ -92,13 +94,12 @@ function scroll_control(event) {
}
}
CHAT_UI.confirmInviteUserListInCollaboration = function () {
var selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
CollaborationUI.confirmInviteUserListInCollaboration = function () {
const selectedUsers = NativeBridgeDataSource.loadSelectedUsers();
if (selectedUsers != "") {
$("#selectedUserListinCollaboration").html("");
var selectedUserList = NativeBridgeDataSource.loadSelectedUsers();
selectedUserList.forEach(function (user) {
selectedUsers.forEach(function (user) {
user.profileUrl = Common.getProfileImgUrl(user.profileUrl);
});
......@@ -110,13 +111,13 @@ CHAT_UI.confirmInviteUserListInCollaboration = function () {
}
);
let html = Mustache.render(modalTemplate, {
userList: selectedUserList,
userList: selectedUsers,
});
let obj = jQuery.parseHTML(html);
$("#modal_add_user_confirm").html(obj);
$("#modalAddUserConfirm").modal("show");
} else {
}
$("#cancelAddUserBtn")
.off()
.on("click", function () {
......@@ -129,11 +130,11 @@ CHAT_UI.confirmInviteUserListInCollaboration = function () {
.off()
.on("click", function () {
Common.showLoadingIndicator();
let userIdList = new Array();
selectedUserList.forEach(function (user) {
userIdList.push(user.shopMemberId);
let userIDList = selectedUsers.map((user) => user.shopMemberId);
selectedUsers.forEach(function (user) {
userIDList.push(user.shopMemberId);
});
const commaJoinedUserIDList = userIdList.join(",");
const commaJoinedUserIDList = userIDList.join(",");
const collaborationType = CHAT_UTIL.getCollaborationType(
globalUserInfo.coWorkType
);
......@@ -149,18 +150,16 @@ CHAT_UI.confirmInviteUserListInCollaboration = function () {
};
$("#tabMyGroupOnAddUserInCollaboration").on("click", function (e) {
CHAT_UI.refreshMyGroupForAddUserInCollaboration();
CollaborationUI.refreshMyGroupForAddUserInCollaboration();
});
$("#tabAllGroupOnAddUserInCollaboration").on("click", function (e) {
CHAT_UI.refreshAllGroupForAddUserInCollaboration("0");
CollaborationUI.refreshAllGroupForAddUserInCollaboration("0");
});
CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
CollaborationUI.refreshMyGroupForAddUserInCollaboration = function () {
if (ChatManagementCommon.selectedUserList.length > 0) {
$(".select_member_num").text(
ChatManagementCommon.selectedUserList.length
);
$(".select_member_num").text(ChatManagementCommon.selectedUserList.length);
} else {
$(".select_member_num").text("0");
}
......@@ -240,7 +239,9 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
Common.dismissLoadingIndicator();
};
CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
CollaborationUI.refreshAllGroupForAddUserInCollaboration = function (
paramGroupId
) {
var groupId = paramGroupId;
$(".content").removeClass("none");
......@@ -260,7 +261,9 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
$("#parentGroupBtnForAddUserInCollaboration").on("click", function () {
CHAT_UI.refreshAllGroupForAddUserInCollaboration(result.parentGroupId);
CollaborationUI.refreshAllGroupForAddUserInCollaboration(
result.parentGroupId
);
});
}
if (typeof result.rootGroupId !== "undefined") {
......@@ -268,7 +271,9 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
groupId = result.rootGroupId;
}
$("#rootGroupBtnForAddUserInCollaboration").on("click", function () {
CHAT_UI.refreshAllGroupForAddUserInCollaboration(result.rootGroupId);
CollaborationUI.refreshAllGroupForAddUserInCollaboration(
result.rootGroupId
);
});
}
if (groupId == result.rootGroupId || paramGroupId == "0") {
......@@ -334,7 +339,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
$("#userInGroupListForAddUserInCollaboration").append(obj);
};
CHAT_UI.makeNameCardInCollaboration = function (shopMemberId) {
Namecard.makeNameCardInCollaboration = function (shopMemberId) {
if (currentUserInfo.shopMemberId == shopMemberId) {
return;
}
......@@ -371,20 +376,20 @@ CHAT_UI.makeNameCardInCollaboration = function (shopMemberId) {
$("#userNameCardInCollaboration").modal("show");
};
CHAT_UI.removeFavoriteUserInCollaboration = function (shopMemberId) {
CollaborationUI.removeFavoriteUserInCollaboration = function (shopMemberId) {
Common.showLoadingIndicator();
$("#userNameCardInCollaboration").modal("hide");
NativeBridgeDataSource.removeFavoriteUser(shopMemberId);
Common.dismissLoadingIndicator();
};
CHAT_UI.insertFavoriteUserInCollaboration = function (shopMemberId) {
CollaborationUI.insertFavoriteUserInCollaboration = function (shopMemberId) {
$("#userNameCardInCollaboration").modal("hide");
NativeBridgeDataSource.addFavoriteUser(shopMemberId);
Common.dismissLoadingIndicator();
};
CHAT_UI.refreshJoinedCollaboration = function (loginIdList) {
CollaborationUI.refreshJoinedCollaboration = function (loginIdList) {
for (var count = 0; count < loginIdList.length; count++) {
loginIdList[count] = loginIdList[count].replaceAll(
globalUserInfo.shopName + "_",
......@@ -428,12 +433,12 @@ CHAT_UI.refreshJoinedCollaboration = function (loginIdList) {
Common.dismissLoadingIndicator();
};
CHAT_UI.toggleCategory = function (category) {
CollaborationUI.toggleCategory = function (category) {
$(category).toggleClass("open");
$(category).next().slideToggle();
};
CHAT_UI.refreshForOffline = function () {
CollaborationUI.refreshForOffline = function () {
serverInfo.isOnline = "false";
if (typeof coview_api == "undefined") {
return;
......
......@@ -449,7 +449,6 @@ document.addEventListener("DOMContentLoaded", function () {
CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType);
}
CHAT_SOCKET.emitCreateMessage(coviewInviteMessage, 0);
} else {
}
break;
case "joinRoomInfoResponse":
......@@ -468,7 +467,7 @@ document.addEventListener("DOMContentLoaded", function () {
for (let key in g_participants) {
loginIdList.push(key);
}
CHAT_UI.refreshJoinedCollaboration(loginIdList);
CollaborationUI.refreshJoinedCollaboration(loginIdList);
} else {
}
break;
......@@ -476,13 +475,13 @@ document.addEventListener("DOMContentLoaded", function () {
for (let key in g_participants) {
loginIdList.push(key);
}
CHAT_UI.refreshJoinedCollaboration(loginIdList);
CollaborationUI.refreshJoinedCollaboration(loginIdList);
break;
case "RoomMemberLeavedEvent":
for (let key in g_participants) {
loginIdList.push(key);
}
CHAT_UI.refreshJoinedCollaboration(loginIdList);
CollaborationUI.refreshJoinedCollaboration(loginIdList);
break;
case "HostRequest":
// to be called by
......@@ -625,22 +624,18 @@ async function initCollaborationUI(changeCollaborationType) {
$(".collaboration_contents").addClass("none");
$(".voice_contents").removeClass("none");
break;
case COLLABORATION_TYPE.CAMERA:
$(".collaboration_contents").addClass("none");
$(".picture_contents").removeClass("none");
break;
case COLLABORATION_TYPE.VIDEO:
$(".collaboration_contents").addClass("none");
$(".video_contents").removeClass("none");
break;
case COLLABORATION_TYPE.DOCUMENT:
$(".collaboration_contents").addClass("none");
$(".document_contents").removeClass("none");
break;
case COLLABORATION_TYPE.BOARD:
$(".collaboration_contents").addClass("none");
$(".board_contents").removeClass("none");
......@@ -690,7 +685,7 @@ function Coview_changeHost(userId) {
function Coview_addLoginId(loginId) {
console.log("addUser loginId = " + loginId);
var url = "https://biztaskyell.abookcloud.com/auth/getuser";
const url = "https://biztaskyell.abookcloud.com/auth/getuser";
$.ajax({
url: url,
method: "post",
......@@ -819,8 +814,8 @@ function captureAndShareImage(urls, changeHostName) {
addCaptureEffect();
$(this).removeClass("on");
var w, h;
var video = document.getElementById("localVideo");
var canvas = document.createElement("canvas");
const video = document.getElementById("localVideo");
const canvas = document.createElement("canvas");
if (clientOrientaionState == 1) {
canvas.width = w = 680;
canvas.height = h = 515;
......@@ -829,10 +824,11 @@ function captureAndShareImage(urls, changeHostName) {
canvas.height = h = 515;
}
if (canvas.getContext) {
var ctx = canvas.getContext("2d");
const ctx = canvas.getContext("2d");
ctx.drawImage(video, 0, 0, w, h);
ctx.drawImage(document.getElementById("canvasRemote"), 0, 0, w, h);
}
canvas.toBlob(function (blob) {
var newImg = document.createElement("img");
var url = URL.createObjectURL(blob);
......@@ -915,14 +911,6 @@ function captureAndShareImage(urls, changeHostName) {
});
}
function toolToggle() {
if ($("#collabo_footer_menu").hasClass("hide")) {
$("#collabo_footer_menu").removeClass("hide");
} else {
$("#collabo_footer_menu").addClass("hide");
}
}
function micOn() {
coview_api.MicMuteControl("off");
$("#micBtn .voice").removeClass("disable");
......@@ -933,7 +921,7 @@ function micOff() {
$("#micBtn .voice").addClass("disable");
}
function micTogle() {
function toggleMic() {
if ($("#micBtn .voice").hasClass("disable")) {
micOn();
} else {
......@@ -955,7 +943,7 @@ function recordFinished() {
delete_dom_obj("screenLock");
}
function recordTogle() {
function toggleRecord() {
if (!$("#recordBtn .record").hasClass("disable")) {
recordStart();
} else {
......@@ -975,14 +963,14 @@ function recordStop(callback) {
screenLock();
// アーカイブ保存処理
MainManRecordWithCollaboration(
mainManRecordWithCollaboration(
"stop",
serverInfo.cmsURL + "/chatapi/file/uploadArchive",
callback
);
}
function MainManRecordWithCollaboration(action, url, callback) {
function mainManRecordWithCollaboration(action, url, callback) {
try {
mediaRecorder.stop();
} catch (exeption) {
......@@ -995,7 +983,7 @@ function MainManRecordWithCollaboration(action, url, callback) {
console.log("Recoding File upload..");
const blob = new Blob(recordedBlobs, { type: "video/webm" });
console.log(blob);
var uploadFileName = "record_" + g_webroom + "_" + g_shareCount + ".webm";
const uploadFileName = "record_" + g_webroom + "_" + g_shareCount + ".webm";
g_shareCount++;
var formData = new FormData();
formData.append("fileData", blob, uploadFileName);
......@@ -1031,7 +1019,7 @@ function MainManRecordWithCollaboration(action, url, callback) {
function screenLock() {
// ロック用のdivを生成
var element = document.createElement("div");
const element = document.createElement("div");
element.id = "screenLock";
// ロック用のスタイル
......@@ -1043,14 +1031,14 @@ function screenLock() {
element.style.zIndex = "9999";
element.style.opacity = "0";
var objBody = document.getElementsByTagName("body").item(0);
const objBody = document.getElementsByTagName("body").item(0);
objBody.appendChild(element);
}
// div削除関数
function delete_dom_obj(id_name) {
var dom_obj = document.getElementById(id_name);
var dom_obj_parent = dom_obj.parentNode;
const dom_obj = document.getElementById(id_name);
const dom_obj_parent = dom_obj.parentNode;
dom_obj_parent.removeChild(dom_obj);
}
......@@ -1073,13 +1061,16 @@ function penToggle() {
$("#penBtn .pen").addClass("disable");
}
}
function photo_open_place_holderToggle() {
$("#open_file_upload").trigger("click");
}
function eraserToggle() {
function toggleEraser() {
$("#coviewEraserCtrBtn").click();
}
function captureToggle() {
function toggleCapture() {
if ($("#recordBtn").hasClass("bg_red")) {
screenLock();
recordStop(function () {
......@@ -1090,7 +1081,8 @@ function captureToggle() {
coview_api.Capture(serverInfo.cmsURL + "/chatapi/file/uploadArchive");
}
}
function captureRequestToggle() {
function toggleCaptureRequest() {
fw.sendToMsg("others", "CAPTURE_REQUEST", {
name: currentUserInfo.loginId,
});
......
// 名前空間
var CONTACT = {};
var Contact = {};
document.addEventListener("DOMContentLoaded", function () {
// メンバー検索
......@@ -10,7 +10,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
// ユーザー検索
CONTACT.searchUser = function (keyword) {
Contact.searchUser = function (keyword) {
const overlayMessage = $(".overlay_src_msg");
const isAllGroup = $("#tabAllGroup").is(":checked");
let hasNoData = false;
......@@ -20,18 +20,18 @@ CONTACT.searchUser = function (keyword) {
if (isAllGroup) {
//グループデータ検索
const groupList = NativeBridgeDataSource.getGroupByName(keyword);
groupDataSearch(groupList);
appendGroupList(groupList);
//ユーザデータ検索
const userList =
NativeBridgeDataSource.getAllGroupShopMemberByName(keyword);
userDataSearch(userList);
appendUserList(userList);
hasNoData = userList.length == 0 && groupList.length == 0;
//連絡先画面
} else {
const userList = NativeBridgeDataSource.getMyGroupShopMemberByName(keyword);
userDataSearch(userList);
appendUserList(userList);
hasNoData = userList.length == 0;
}
......@@ -49,7 +49,7 @@ var bindiOSKeyBoardEvent = function () {
searchInput.on("compositionend", function () {
if (deviceInfo.isiOS()) {
var keyword = searchInput.val();
CONTACT.searchUser(keyword);
Contact.searchUser(keyword);
}
});
};
......@@ -71,7 +71,7 @@ var bindMemeberSearch = function () {
$(".overlay_src_msg").empty();
return;
}
CONTACT.searchUser(keyword);
Contact.searchUser(keyword);
if (enterKeyPressed) {
searchInput.blur();
return;
......@@ -79,7 +79,7 @@ var bindMemeberSearch = function () {
});
};
var groupDataSearch = function (groupList) {
var appendGroupList = function (groupList) {
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
groupList.forEach(function (group) {
......@@ -103,7 +103,7 @@ var renderGroupList = function (url, groupName, groupID, isFavorite) {
});
};
var userDataSearch = function (userList) {
var appendUserList = function (userList) {
userList.forEach(function (user) {
user.profileUrl = Common.getProfileImgUrl(user.profileUrl);
});
......@@ -121,42 +121,49 @@ var renderUserList = function (url, userList) {
$("#tabMyGroup").on("click", function (e) {
$("#contactSearch").attr("placeholder", getLocalizedString("userSearch"));
CHAT_UI.refreshContactScreen();
Contact.refreshContactScreen();
});
$("#tabAllGroup").on("click", function (e) {
CHAT_UI.refreshAllGroupSearch("0");
Contact.refreshAllGroupSearch("0");
});
CHAT_UI.refreshContactScreen = function () {
Contact.refreshContactScreen = function () {
Common.showLoadingIndicator();
$("#userNameCard").modal("hide");
$("#favoriteList").html("");
$("#myGroupList").html("");
//画面タイトル設定
let contactListTitle = getLocalizedString("contactListTitle");
$("#title").text(contactListTitle);
// グループの様式を読み込む
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
// ユーザの様式を読み込む
var userTemplate = getTemplate(TemplateURL.USER_LIST);
NativeBridgeDelegate.updateContactInfo();
var myNamecardTemplate = getTemplate(TemplateURL.MY_NAME_CARD);
Contact.appendMyNamecard();
var groupUserTemplate = getTemplate(TemplateURL.GROUP_USER_LIST);
NativeBridgeDelegate.updateContactInfo();
Contact.appendFavoritGroupList();
Contact.appendFavoritUsers();
Contact.appendMyGroupList();
Common.dismissLoadingIndicator();
};
var myInfo = NativeBridgeDataSource.getMyInfo();
Contact.appendMyNamecard = function () {
const myInfo = NativeBridgeDataSource.getMyInfo();
myInfo.profileImagePath = Common.getProfileImgUrl(myInfo.profileUrl);
let myNamecardHtml = Mustache.render(myNamecardTemplate, {
const myNamecardTemplate = getTemplate(TemplateURL.MY_NAME_CARD);
const myNamecardHtml = Mustache.render(myNamecardTemplate, {
loginId: myInfo.shopMemberId,
profileImage: myInfo.profileImagePath,
name: myInfo.shopMemberName,
groupPathList: myInfo.groupPathList,
});
let myNamecardObj = $(jQuery.parseHTML(myNamecardHtml)).on(
const myNamecardObj = $(jQuery.parseHTML(myNamecardHtml)).on(
"click",
function () {}
);
......@@ -164,7 +171,11 @@ CHAT_UI.refreshContactScreen = function () {
$("#myProfileModal").html(myNamecardObj);
$("#myName").text(myInfo.shopMemberName);
$("#myImg").attr("src", myInfo.profileImagePath);
};
Contact.appendFavoritGroupList = function () {
// グループの様式を読み込む
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
//お気に入りグループ取得。
var favoriteGroupList = NativeBridgeDataSource.getFavoriteGroups();
favoriteGroupList.forEach(function (favoriteGroup) {
......@@ -177,8 +188,11 @@ CHAT_UI.refreshContactScreen = function () {
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#favoriteList").append(obj);
});
//お気に入りユーザ取得。
var favoriteUserList = NativeBridgeDataSource.getFavoriteUsers();
};
Contact.appendFavoritUsers = function () {
const userTemplate = getTemplate(TemplateURL.USER_LIST);
const favoriteUserList = NativeBridgeDataSource.getFavoriteUsers();
favoriteUserList.forEach(function (favoriteUser) {
favoriteUser.profileUrl = Common.getProfileImgUrl(favoriteUser.profileUrl);
favoriteUser.isFavorite = true;
......@@ -188,8 +202,11 @@ CHAT_UI.refreshContactScreen = function () {
});
let obj = jQuery.parseHTML(html);
$("#favoriteList").append(obj);
};
var myGroupList = NativeBridgeDataSource.getMyGroupUsers();
Contact.appendMyGroupList = function () {
const groupUserTemplate = getTemplate(TemplateURL.GROUP_USER_LIST);
const myGroupList = NativeBridgeDataSource.getMyGroupUsers();
myGroupList.forEach(function (myGroup) {
myGroup.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = Common.getProfileImgUrl(groupUser.profileUrl);
......@@ -199,44 +216,178 @@ CHAT_UI.refreshContactScreen = function () {
groupUserList: myGroup.groupUserList,
});
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#myGroupList").append(obj);
});
Common.dismissLoadingIndicator();
};
// template_group_list.html (GROUP_LIST)
// >> contact.js
CHAT_UI.favoriteGroupChange = function (groupId, star) {
Contact.favoriteGroupChange = function (groupID, star) {
if ($(star).hasClass("active")) {
CHAT_UI.removeFavoriteGroup(groupId);
Contact.removeFavoriteGroup(groupID);
} else if ($(star).hasClass("disable")) {
CHAT_UI.insertFavoriteGroup(groupId);
Contact.insertFavoriteGroup(groupID);
}
};
CHAT_UI.removeFavoriteGroup = function (groupId) {
Contact.removeFavoriteGroup = function (groupID) {
Common.showLoadingIndicator();
var result = NativeBridgeDataSource.removeFavoriteGroup(groupId);
var result = NativeBridgeDataSource.removeFavoriteGroup(groupID);
if (result) {
$(".group_" + groupId).removeClass("active");
$(".group_" + groupId).addClass("disable");
$(".group_" + groupID).removeClass("active");
$(".group_" + groupID).addClass("disable");
} else {
$(".group_" + groupId).addClass("active");
$(".group_" + groupId).removeClass("disable");
$(".group_" + groupID).addClass("active");
$(".group_" + groupID).removeClass("disable");
}
Common.dismissLoadingIndicator();
};
CHAT_UI.insertFavoriteGroup = function (groupId) {
Contact.insertFavoriteGroup = function (groupID) {
Common.showLoadingIndicator();
const result = NativeBridgeDataSource.addFavoriteGroup(groupID);
if (result) {
$(".group_" + groupId).removeClass("disable");
$(".group_" + groupId).addClass("active");
$(".group_" + groupID).removeClass("disable");
$(".group_" + groupID).addClass("active");
} else {
$(".group_" + groupId).addClass("disable");
$(".group_" + groupId).removeClass("active");
$(".group_" + groupID).addClass("disable");
$(".group_" + groupID).removeClass("active");
}
Common.dismissLoadingIndicator();
};
// contact.html
// contact.js
// template_group_list.html (GROUP_LIST)
// >> contact.js
// template_group_path.html (GROUP_PATH)
// >> self
// template_user_name_card.html(USER_NAME_CARD)
// >> Namecard.makeNameCard
//全グループ検索画面表示。
Contact.refreshAllGroupSearch = function (paramGroupId) {
var groupId = paramGroupId;
if (window.location.pathname.includes("chat_room")) {
if (groupId == "") return;
NativeBridgeDelegate.setToMoveGroupId(groupId);
window.location.href = "contact.html";
}
Common.showLoadingIndicator();
Contact.initialzeForAllGroupSearch();
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate.updateGroupInfo(groupId);
//DBからグループ情報を取得。
const result = NativeBridgeDataSource.getGroupInfo(groupId);
Contact.bindGroupCellClick(
result.paramGroupId,
result.rootGroupId,
paramGroupId,
groupId
);
Contact.appendGroupPathList(result.groupPathList);
Contact.appendSubGroupsInGroup(result.childGroupList);
Contact.appendUsersInGroup(result.groupUserList);
Common.dismissLoadingIndicator();
};
Contact.initialzeForAllGroupSearch = function () {
$("#userNameCard").modal("hide");
$(".cancel").addClass("none");
$(".search_form input").removeClass("focus");
$(".search_form input").val("");
$(".search_form form").removeClass();
$(".content").removeClass("none");
$(".overlay_src_msg").empty();
$("#contactSearch").attr(
"placeholder",
getLocalizedString("searchUserAndGroup")
);
$("#tabAllGroup").prop("checked", true);
//画面エリアを初期化。
$("#rootGroupBtn").off();
$("#parentGroupBtn").off();
$("#childGroupListArea").html("");
$("#userInGroupList").html("");
$("#groupPathArea").html("");
};
Contact.bindGroupCellClick = function (
parentGroupID,
rootGroupID,
paramGroupID,
groupID
) {
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof parentGroupID !== "undefined") {
$("#parentGroupBtn").on("click", function () {
Contact.refreshAllGroupSearch(parentGroupID);
});
}
if (typeof rootGroupID !== "undefined") {
if (paramGroupID == 0) {
groupID = rootGroupID;
}
$("#rootGroupBtn").on("click", function () {
Contact.refreshAllGroupSearch(rootGroupID);
});
}
if (groupID == rootGroupID || paramGroupID == "0") {
$("#rootGroupArea").addClass("none");
$("#parentGroupArea").addClass("none");
} else {
$("#rootGroupArea").removeClass("none");
$("#parentGroupArea").removeClass("none");
}
};
Contact.appendGroupPathList = function (groupPathList) {
//該当グループのパースを表示。
const groupPathTemplate = getTemplate(TemplateURL.GROUP_PATH);
groupPathList.forEach(function (groupPath) {
let html = Mustache.render(groupPathTemplate, {
name: groupPath.groupName,
id: groupPath.groupId,
});
let obj = jQuery.parseHTML(html);
$("#groupPathArea").append(obj);
});
};
Contact.appendSubGroupsInGroup = function (groupList) {
//該当グループの下位グループ表示。
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
groupList.forEach(function (childGroup) {
let html = Mustache.render(groupTemplate, {
name: childGroup.groupName,
id: childGroup.groupId,
isFavorite: childGroup.isFavorite,
});
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#childGroupListArea").append(obj);
});
};
Contact.appendUsersInGroup = function (userList) {
//該当グループの所属ユーザを表示。
const userTemplate = getTemplate(TemplateURL.USER_LIST);
userList.forEach(function (user) {
user.profileUrl = Common.getProfileImgUrl(user.profileUrl);
});
let html = Mustache.render(userTemplate, {
userList: userList,
});
let obj = jQuery.parseHTML(html);
$("#userInGroupList").append(obj);
};
var Namecard = {};
// archive_detail.html
// collaboration_overlay_user_list.html
// >> collaboration.js
// archive.js
// collaboration.js
// template_chatroom_user_list.html (CHATROOM_USER_LIST)
// >> chat-room.js
// template_group_user_list.html (GROUP_USER_LIST)
// >> contact.js
// template_user_list.html
// >> chat-room.js, contact.js
// template_user_message.html
// >> chat-websocket-message.js
// >> chat-room.js
CHAT_UI.makeNameCard = function (shopMemberId) {
Namecard.makeNameCard = function (shopMemberId) {
if (currentUserInfo.shopMemberId == shopMemberId) {
return;
}
var nameCardInfo = NativeBridgeDataSource.getNameCardData(shopMemberId);
var namecardTemplate = getTemplate(TemplateURL.USER_NAME_CARD);
const nameCardInfo = NativeBridgeDataSource.getNameCardData(shopMemberId);
const namecardTemplate = getTemplate(TemplateURL.USER_NAME_CARD);
nameCardInfo.profileUrl = Common.getProfileImgUrl(nameCardInfo.profileUrl);
let namecardHtml = Mustache.render(namecardTemplate, {
let namecardHTML = Mustache.render(namecardTemplate, {
shopMemberId: nameCardInfo.shopMemberId,
profileUrl: nameCardInfo.profileUrl,
name: nameCardInfo.shopMemberName,
......@@ -33,7 +19,7 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
isFavorite: nameCardInfo.isFavorite,
});
let namecardObj = $(jQuery.parseHTML(namecardHtml)).on(
let namecardObj = $(jQuery.parseHTML(namecardHTML)).on(
"click",
function () {}
);
......@@ -43,7 +29,7 @@ CHAT_UI.makeNameCard = function (shopMemberId) {
};
// template_user_name_card.html
CHAT_UI.startChat = function (userShopMemberId, userName) {
Namecard.startChat = function (userShopMemberId, userName) {
Common.showLoadingIndicator();
var userIdList = [];
userIdList.push(userShopMemberId);
......@@ -60,16 +46,16 @@ CHAT_UI.startChat = function (userShopMemberId, userName) {
};
// template_user_name_card.html
CHAT_UI.startVoice = function (userShopMemberId, userName) {
Namecard.startVoice = function (userShopMemberId, userName) {
Common.showLoadingIndicator();
var userIdList = [];
userIdList.push(userShopMemberId);
let userIDList = [];
userIDList.push(userShopMemberId);
// 参加ユーザ名でルーム名を生成
let newRoomName = currentUserInfo.loginId + "," + userName;
NativeBridgeDelegate.createChatRoom(
ChatRoomType.DM,
userIdList.join(","),
userIDList.join(","),
newRoomName,
MakeRoomFlag.NAME_CARD,
true
......@@ -80,18 +66,18 @@ CHAT_UI.startVoice = function (userShopMemberId, userName) {
// >> chat-room.js
// >> contact.js
// template_user_list.html
CHAT_UI.favoriteUserChange = function (shopMemberId, star) {
Namecard.favoriteUserChange = function (shopMemberId, star) {
if ($(star).hasClass("active")) {
CHAT_UI.removeFavoriteUser(shopMemberId);
Namecard.removeFavoriteUser(shopMemberId);
} else if ($(star).hasClass("disable")) {
CHAT_UI.insertFavoriteUser(shopMemberId);
Namecard.insertFavoriteUser(shopMemberId);
}
};
// modal_collabo_profile.html
// collaboration.js
// template_user_name_card.html
CHAT_UI.removeFavoriteUser = function (shopMemberId) {
Namecard.removeFavoriteUser = function (shopMemberId) {
Common.showLoadingIndicator();
$("#userNameCard").modal("hide");
$("#myNameCard").modal("hide");
......@@ -106,10 +92,9 @@ CHAT_UI.removeFavoriteUser = function (shopMemberId) {
Common.dismissLoadingIndicator();
};
// modal_collabo_profile.html
// collaboration.js
// template_user_name_card.html
CHAT_UI.insertFavoriteUser = function (shopMemberId) {
// template_user_name_card.html (USER_NAME_CARD)
// >> Namecard.makeNameCard()
Namecard.insertFavoriteUser = function (shopMemberId) {
$("#userNameCard").modal("hide");
$("#myNameCard").modal("hide");
const result = NativeBridgeDataSource.addFavoriteUser(shopMemberId);
......@@ -123,114 +108,10 @@ CHAT_UI.insertFavoriteUser = function (shopMemberId) {
Common.dismissLoadingIndicator();
};
// contact.html
// contact.js
// template_group_list.html (GROUP_LIST)
// >> contact.js
// template_group_path.html (GROUP_PATH)
// >> self
// template_user_name_card.html
// >> CHAT_UI.makeNameCard
//全グループ検索画面表示。
CHAT_UI.refreshAllGroupSearch = function (paramGroupId) {
var groupId = paramGroupId;
if (window.location.pathname.includes("chat_room")) {
if (groupId == "") return;
NativeBridgeDelegate.setToMoveGroupId(groupId);
window.location.href = "contact.html";
}
Common.showLoadingIndicator();
$("#userNameCard").modal("hide");
$(".cancel").addClass("none");
$(".search_form input").removeClass("focus");
$(".search_form input").val("");
$(".search_form form").removeClass();
$(".content").removeClass("none");
$(".overlay_src_msg").empty();
$("#contactSearch").attr(
"placeholder",
getLocalizedString("searchUserAndGroup")
);
$("#tabAllGroup").prop("checked", true);
//オンライン状態であればサーバから情報更新。
NativeBridgeDelegate.updateGroupInfo(groupId);
//画面エリアを初期化。
$("#rootGroupBtn").off();
$("#parentGroupBtn").off();
$("#childGroupListArea").html("");
$("#userInGroupList").html("");
$("#groupPathArea").html("");
//DBからグループ情報を取得。
var result = NativeBridgeDataSource.getGroupInfo(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== "undefined") {
$("#parentGroupBtn").on("click", function () {
CHAT_UI.refreshAllGroupSearch(result.parentGroupId);
});
}
if (typeof result.rootGroupId !== "undefined") {
if (paramGroupId == 0) {
groupId = result.rootGroupId;
}
$("#rootGroupBtn").on("click", function () {
CHAT_UI.refreshAllGroupSearch(result.rootGroupId);
});
}
if (groupId == result.rootGroupId || paramGroupId == "0") {
$("#rootGroupArea").addClass("none");
$("#parentGroupArea").addClass("none");
} else {
$("#rootGroupArea").removeClass("none");
$("#parentGroupArea").removeClass("none");
}
//該当グループのパースを表示。
const groupPathTemplate = getTemplate(TemplateURL.GROUP_PATH);
result.groupPathList.forEach(function (groupPath) {
let html = Mustache.render(groupPathTemplate, {
name: groupPath.groupName,
id: groupPath.groupId,
});
let obj = jQuery.parseHTML(html);
$("#groupPathArea").append(obj);
});
//該当グループの下位グループ表示。
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
result.childGroupList.forEach(function (childGroup) {
let html = Mustache.render(groupTemplate, {
name: childGroup.groupName,
id: childGroup.groupId,
isFavorite: childGroup.isFavorite,
});
let obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#childGroupListArea").append(obj);
});
//該当グループの所属ユーザを表示。
const userTemplate = getTemplate(TemplateURL.USER_LIST);
result.groupUserList.forEach(function (groupUser) {
groupUser.profileUrl = Common.getProfileImgUrl(groupUser.profileUrl);
});
let html = Mustache.render(userTemplate, {
userList: result.groupUserList,
});
let obj = jQuery.parseHTML(html);
$("#userInGroupList").append(obj);
Common.dismissLoadingIndicator();
};
CHAT_UI.refreshForOnline = function () {
Namecard.refreshForOnline = function () {
$("#favoriteButton").prop("disabled", false);
};
CHAT_UI.refreshForOffline = function () {
Namecard.refreshForOffline = function () {
$("#favoriteButton").prop("disabled", true);
};
......@@ -20,14 +20,14 @@
</div><!-- .row -->
</nav><!-- nav -->
<div class="content tabs">
<input id="tabMyGroupOnAddUserInCollaboration" type="radio" name="tab_item" checked onclick="CHAT_UI.refreshMyGroupForAddUserInCollaboration();">
<input id="tabMyGroupOnAddUserInCollaboration" type="radio" name="tab_item" checked onclick="CollaborationUI.refreshMyGroupForAddUserInCollaboration();">
<label class="tab_item m-0" for="tabMyGroupOnAddUserInCollaboration">マイグループ</label>
<input id="tabAllGroupOnAddUserInCollaboration" type="radio" name="tab_item" onclick="CHAT_UI.refreshAllGroupForAddUserInCollaboration('0');">
<input id="tabAllGroupOnAddUserInCollaboration" type="radio" name="tab_item" onclick="CollaborationUI.refreshAllGroupForAddUserInCollaboration('0');">
<label class="tab_item m-0" for="tabAllGroupOnAddUserInCollaboration">全グループ</label>
<div class="tab_content" id="tab1_content" style="height: 100vh; overflow:scroll;">
<div class="chat_list">
<!-- お気に入りグループ -->
<div class="category" onclick="CHAT_UI.toggleCategory(this);"><div class="category_name"><span>お気に入り</span></div></div>
<div class="category" onclick="CollaborationUI.toggleCategory(this);"><div class="category_name"><span>お気に入り</span></div></div>
<div id="favoriteListForAddUserInCollaboration"></div>
<div id="myGroupListForAddUserInCollaboration"></div>
</div>
......
......@@ -19,7 +19,7 @@
<div class="modal-footer border-0 justify-content-center">
{{#isFavorite}}
<button type="button" class="border-0 bg_navy"
onclick="CHAT_UI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_favorite.png" alt="お気に入り">
......@@ -30,7 +30,7 @@
{{/isFavorite}}
{{^isFavorite}}
<button type="button" class="border-0 bg_navy"
onclick="CHAT_UI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_favorite_white.png" alt="お気に入り">
......
<li class="d-flex align-items-center" style="border-bottom: 1px solid #e2e8f0;">
<a href="#" class="w-100" onclick="CHAT_UI.refreshAllGroupForAddUser({{id}});">
<a href="#" class="w-100" onclick="ChatAddUser.refreshAllGroupForAddUser({{id}});">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
......
<li class="d-flex align-items-center">
<a href="#" class="w-100" onclick="CHAT_UI.refreshAllGroupForAddUserInCollaboration({{id}});">
<a href="#" class="w-100" onclick="CollaborationUI.refreshAllGroupForAddUserInCollaboration({{id}});">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
......
<a href="#" class="breadcrumb_item" onclick="CHAT_UI.refreshAllGroupForAddUser({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="ChatAddUser.refreshAllGroupForAddUser({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="CHAT_UI.refreshAllGroupForAddUserInCollaboration({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="CollaborationUI.refreshAllGroupForAddUserInCollaboration({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<div class="category" onclick="CHAT_UI.toggleCategory(this);">
<div class="category" onclick="CollaborationUI.toggleCategory(this);">
<div class="category_name"><span>{{groupName}}</span></div>
</div>
<ul class="p-0 chat_make_room_list">
......
<div class="category" onclick="CHAT_UI.toggleCategory(this);">
<div class="category" onclick="CollaborationUI.toggleCategory(this);">
<div class="category_name"><span>{{groupName}}</span></div>
</div>
<ul class="p-0 chat_make_room_list">
......
{{#userList}}
<div class="user_item">
<a href="javascript:return false;" onclick="CHAT_UI.makeNameCard({{shopMemberId}})">
<a href="javascript:return false;" onclick="Namecard.makeNameCard({{shopMemberId}})">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="{{profileUrl}}" onError="this.src='./img/noImage.png'">
......
<li class="d-flex align-items-center" style="border-bottom: 1px solid #e2e8f0;">
<a href="#" class="w-100" onclick="CHAT_UI.refreshAllGroupSearch({{id}});">
<a href="#" class="w-100" onclick="Contact.refreshAllGroupSearch({{id}});">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
......@@ -18,10 +18,10 @@
<div class="chat_item_r">
<div class="d-flex flex-column">
{{#isFavorite}}
<span class="star active group_{{id}}" onclick="CHAT_UI.favoriteGroupChange({{id}},this)"></span>
<span class="star active group_{{id}}" onclick="Contact.favoriteGroupChange({{id}},this)"></span>
{{/isFavorite}}
{{^isFavorite}}
<span class="star disable group_{{id}}" onclick="CHAT_UI.favoriteGroupChange({{id}},this)"></span>
<span class="star disable group_{{id}}" onclick="Contact.favoriteGroupChange({{id}},this)"></span>
{{/isFavorite}}
</div>
</div>
......
<a href="#" class="breadcrumb_item" onclick="CHAT_UI.refreshAllGroupSearch({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="Contact.refreshAllGroupSearch({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<div class="category" onclick="CHAT_UI.toggleCategory(this);"><div class="category_name"><span>{{groupName}}</span></div></div>
<div class="category" onclick="CollaborationUI.toggleCategory(this);"><div class="category_name"><span>{{groupName}}</span></div></div>
<ul class="p-0 chat_make_room_list">
{{#groupUserList}}
<li class="d-flex align-items-center">
<a href="javascript:return false;" onclick="CHAT_UI.makeNameCard({{shopMemberId}})" style="width: 100%;">
<a href="javascript:return false;" onclick="Namecard.makeNameCard({{shopMemberId}})" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
......@@ -21,10 +21,10 @@
<div class="chat_item_r">
<div class="d-flex flex-column">
{{#isFavorite}}
<span class="star active shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
<span class="star active shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}}
{{^isFavorite}}
<span class="star disable shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
<span class="star disable shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}}
</div>
</div>
......
<li class="d-flex align-items-center" style="border-bottom: 1px solid #e2e8f0;">
<a href="#" class="w-100" onclick="ChatManagementCommon.refreshAllGroupForMakeRoom({{id}});">
<a href="#" class="w-100" onclick="ChatMakeRoom.refreshAllGroupForMakeRoom({{id}});">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
......
<a href="#" class="breadcrumb_item" onclick="ChatManagementCommon.refreshAllGroupForMakeRoom({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="ChatMakeRoom.refreshAllGroupForMakeRoom({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<div class="category" onclick="CHAT_UI.toggleCategory(this);">
<div class="category" onclick="CollaborationUI.toggleCategory(this);">
<div class="category_name"><span>{{groupName}}</span></div>
</div>
<ul class="p-0 chat_make_room_list">
......
<ul class="p-0 chat_make_room_list" style="margin-top: 0px !important;border-top: none !important;">
{{#userList}}
<li class="d-flex align-items-center">
<a href="javascript:return false;" onclick="CHAT_UI.makeNameCard({{shopMemberId}})" style="width: 100%;">
<a href="javascript:return false;" onclick="Namecard.makeNameCard({{shopMemberId}})" style="width: 100%;">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
......@@ -20,10 +20,10 @@
<div class="chat_item_r">
<div class="d-flex flex-column">
{{#isFavorite}}
<span class="star active shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
<span class="star active shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}}
{{^isFavorite}}
<span class="star disable shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange({{shopMemberId}},this)"></span>
<span class="star disable shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange({{shopMemberId}},this)"></span>
{{/isFavorite}}
</div>
</div>
......
<div class="room_left chat_message" data-messageid="{{messageId}}">
<figure>
<a href="#" data-toggle="modal" data-target="#profileModal1">
<img src="{{profileImage}}" onError="this.src='./img/noImage.png'" onclick="CHAT_UI.makeNameCard({{shopMemberId}})">
<img src="{{profileImage}}" onError="this.src='./img/noImage.png'" onclick="Namecard.makeNameCard({{shopMemberId}})">
</a>
</figure>
<div class="room_left-text">
......
......@@ -13,12 +13,12 @@
</div>
<div class="modal-body" id="userNameCard-scroll">
{{#groupPathList}}
<li onclick="CHAT_UI.refreshAllGroupSearch({{groupId}});"><b>{{groupPath}}</b></li>
<li onclick="Contact.refreshAllGroupSearch({{groupId}});"><b>{{groupPath}}</b></li>
{{/groupPathList}}
</div>
<div class="modal-footer border-0 justify-content-center">
{{#isFavorite}}
<button type="button" class="border-0 bg_navy" onclick="CHAT_UI.removeFavoriteUser({{shopMemberId}})"
<button type="button" class="border-0 bg_navy" onclick="Namecard.removeFavoriteUser({{shopMemberId}})"
id="favoriteButton">
<div class="d-flex flex-column">
<div class="img_wrap">
......@@ -29,7 +29,7 @@
</button>
{{/isFavorite}}
{{^isFavorite}}
<button type="button" class="border-0 bg_navy" onclick="CHAT_UI.insertFavoriteUser({{shopMemberId}})"
<button type="button" class="border-0 bg_navy" onclick="Namecard.insertFavoriteUser({{shopMemberId}})"
id="favoriteButton">
<div class="d-flex flex-column">
<div class="img_wrap">
......@@ -39,7 +39,7 @@
</div>
</button>
{{/isFavorite}}
<button type="button" class="border-0 bg_green" onclick="CHAT_UI.startVoice('{{shopMemberId}}','{{name}}');">
<button type="button" class="border-0 bg_green" onclick="Namecard.startVoice('{{shopMemberId}}','{{name}}');">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_phone.png" alt="通話">
......@@ -47,7 +47,7 @@
<span>通話</span>
</div>
</button>
<button type="button" class="border-0 bg_blue" onclick="CHAT_UI.startChat('{{shopMemberId}}','{{name}}');">
<button type="button" class="border-0 bg_blue" onclick="Namecard.startChat('{{shopMemberId}}','{{name}}');">
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_profile_chat.png" alt="チャット">
......
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