Commit 6638f5dd by Lee Munkyeong

Merge branch 'release_sp3' of gitlab.agentec.jp:abookCommunication/chat_webview…

Merge branch 'release_sp3' of gitlab.agentec.jp:abookCommunication/chat_webview into features/release_sp3_collaboration_picture

# Conflicts:
#	public_new/js/constant.js
parents fbb06052 5b59f0d6
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<div class="col-4 pr-0"> <div class="col-4 pr-0">
<div class="nav-item"> <div class="nav-item">
<div class="nav_prev"> <div class="nav_prev">
<a href="#"><span>ホーム</span></a> <a href="#" class="home_btn"><span>ホーム</span></a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -198,6 +198,8 @@ ...@@ -198,6 +198,8 @@
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); android.getGlobalParameter();
} else { } else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
} }
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
......
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
<!-- タブ --> <!-- タブ -->
<div class="content tabs"> <div class="content tabs">
<input id="tabMyGroupOnMakeRoom" type="radio" name="tab_item" checked> <input id="tabMyGroupOnAddUser" type="radio" name="tab_item" checked>
<label class="tab_item" for="tabMyGroupOnMakeRoom">マイグループ</label> <label class="tab_item" for="tabMyGroupOnAddUser">マイグループ</label>
<input id="tabAllGroupOnMakeRoom" type="radio" name="tab_item"> <input id="tabAllGroupOnAddUser" type="radio" name="tab_item">
<label class="tab_item" for="tabAllGroupOnMakeRoom">全グループ</label> <label class="tab_item" for="tabAllGroupOnAddUser">全グループ</label>
<div class="tab_content" id="tab1_content"> <div class="tab_content" id="tab1_content">
<div class="chat_list"> <div class="chat_list">
<!-- お気に入りグループ --> <!-- お気に入りグループ -->
...@@ -154,8 +154,14 @@ ...@@ -154,8 +154,14 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
android.getLoginParameter();
android.getGlobalParameter(); if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -85,8 +85,13 @@ ...@@ -85,8 +85,13 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
android.getLoginParameter(); if (typeof(android) != "undefined") {
android.getGlobalParameter(); android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -86,8 +86,13 @@ ...@@ -86,8 +86,13 @@
let IS_ONLINE = false; let IS_ONLINE = false;
let roomId = 0; let roomId = 0;
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
android.getLoginParameter(); if (typeof(android) != "undefined") {
android.getGlobalParameter(); android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -91,8 +91,14 @@ ...@@ -91,8 +91,14 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
android.getLoginParameter();
android.getGlobalParameter(); if (typeof(android) != "undefined") {
android.getLoginParameter();
android.getGlobalParameter();
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) { function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl; CHAT_SERVER_URL = chatServerUrl;
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
<nav> <nav>
<div class="chat_room_src_form none"> <div class="chat_room_src_form none">
<div class="d-flex flex-row h-100 align-items-center"> <div class="d-flex flex-row h-100 align-items-center">
<input type="search" name="search" placeholder="ユーザー検索"> <input type="search" name="search" id="searchMessage" placeholder="メッセージ検索">
<span class="src_icon"></span> <span class="src_icon"></span>
<a href="#" class="cancel">キャンセル</a> <a href="#" class="cancel" id="messageSearchCancle">キャンセル</a>
</div> </div>
</div> </div>
<div class="row nav_item_wrap h-100 align-items-center"> <div class="row nav_item_wrap h-100 align-items-center">
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!-- フィルター --> <!-- フィルター -->
<div id="filter" class="user_list filter d-flex flex-row none"></div> <div id="filter" class="user_list filter d-flex flex-row none"></div>
<div class="chat_list"> <div class="chat_list none" id="searchList">
<ul class="overlay_src_msg"> <ul class="overlay_src_msg">
</ul> </ul>
</div> </div>
......
...@@ -56,31 +56,30 @@ ...@@ -56,31 +56,30 @@
<input id="tabAllGroup" type="radio" name="tab_item"> <input id="tabAllGroup" type="radio" name="tab_item">
<label class="tab_item" for="tabAllGroup">全グループ</label> <label class="tab_item" for="tabAllGroup">全グループ</label>
<div class="content chat_list my_info_sell"> <!-- タブ -->
<ul class="p-0 chat_make_room_list"> <div class="tab_content" id="tab1_content">
<li class="d-flex align-items-center"> <div class="content chat_list my_info_sell">
<a href="#" style="width: 100%;"> <ul class="p-0 chat_make_room_list">
<div class="chat_item d-flex flex-row align-items-center"> <li class="d-flex align-items-center">
<div class="chat_item_l"> <a href="#" style="width: 100%;">
<div class="thumbnail"> <div class="chat_item d-flex flex-row align-items-center" style="background: none !important;">
<div class="img_wrap"><img id="myImg" src="img/noImage.png" onError="this.src='./img/noImage.png'" /></div> <div class="chat_item_l">
<div class="thumbnail">
<div class="img_wrap"><img id="myImg" src="img/noImage.png" onError="this.src='./img/noImage.png'" /></div>
</div>
</div> </div>
</div> <div class="chat_item_m px-0">
<div class="chat_item_m px-0"> <div class="d-flex flex-column">
<div class="d-flex flex-column"> <div class="chat_item_t">
<div class="chat_item_t"> <span class="chat_item_ttl" id="myName"></span>
<span class="chat_item_ttl" id="myName"></span> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </a>
</a> </li>
</li> </ul>
</ul> </div>
</div>
<!-- タブ -->
<div class="tab_content" id="tab1_content">
<div class="chat_list" id="myContactList"> <div class="chat_list" id="myContactList">
<!-- お気に入りグループ --> <!-- お気に入りグループ -->
<div class="category"><div class="category_name"><span>お気に入り</span></div></div> <div class="category"><div class="category_name"><span>お気に入り</span></div></div>
...@@ -204,6 +203,7 @@ ...@@ -204,6 +203,7 @@
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); android.getGlobalParameter();
......
...@@ -41,6 +41,11 @@ input[name="tab_item"] { ...@@ -41,6 +41,11 @@ input[name="tab_item"] {
display: block; display: block;
} }
#tabMyGroupOnAddUser:checked ~ #tab1_content,
#tabAllGroupOnAddUser:checked ~ #tab2_content{
display: block;
}
#tabMyGroup:checked ~ #tab1_content, #tabMyGroup:checked ~ #tab1_content,
#tabAllGroup:checked ~ #tab2_content{ #tabAllGroup:checked ~ #tab2_content{
display: block; display: block;
...@@ -94,6 +99,10 @@ input[name="tab_item"] { ...@@ -94,6 +99,10 @@ input[name="tab_item"] {
right: 0px; right: 0px;
} }
#searchList {
margin-bottom: 140px;
overflow: hidden;
}
/* リスト */ /* リスト */
.chat_list .chat_item:hover { .chat_list .chat_item:hover {
background: aliceblue; background: aliceblue;
...@@ -205,7 +214,10 @@ input[name="tab_item"] { ...@@ -205,7 +214,10 @@ input[name="tab_item"] {
.already_read { .already_read {
background-color: #f1f2f2; background-color: #f1f2f2;
} }
/* ダウンロードボタン*/
.fa-download {
width: 100%;
}
/**************************** make room *************************/ /**************************** make room *************************/
.chat_list .category { .chat_list .category {
text-align: left; text-align: left;
...@@ -220,8 +232,7 @@ input[name="tab_item"] { ...@@ -220,8 +232,7 @@ input[name="tab_item"] {
} }
.category_name { .category_name {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: scroll;
text-overflow: ellipsis;
width: 90%; width: 90%;
} }
.chat_list .category.open::after { .chat_list .category.open::after {
......
...@@ -16,4 +16,5 @@ ...@@ -16,4 +16,5 @@
} }
.my_info_sell { .my_info_sell {
clear: both; clear: both;
display: block;
} }
...@@ -58,7 +58,7 @@ CHAT_DB.getMessages = function(roomId) { ...@@ -58,7 +58,7 @@ CHAT_DB.getMessages = function(roomId) {
CHAT_DB.getFavoriteUsersNotInRoom = function() { CHAT_DB.getFavoriteUsersNotInRoom = function() {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getFavoriteUsersNotInRoom", {}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getFavoriteUsersNotInRoom()); return JSON.parse(android.getFavoriteUsersNotInRoom());
...@@ -101,9 +101,18 @@ CHAT_DB.getGroupInfo = function(groupId) { ...@@ -101,9 +101,18 @@ CHAT_DB.getGroupInfo = function(groupId) {
} }
}; };
CHAT_DB.getGroupInfoForAddUser = function(groupId) {
if (CHAT_UTIL.isIOS()) {
//TODO getGroupInfoの処理でユーザ情報にルーム参加者が入ってない処理。
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getGroupInfoForAddUser(groupId));
}
};
CHAT_DB.loadSelectedUsers = function() { CHAT_DB.loadSelectedUsers = function() {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getSelectedUserList", {}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
console.log(JSON.parse(android.getSelectedUserList())); console.log(JSON.parse(android.getSelectedUserList()));
...@@ -130,7 +139,7 @@ CHAT_DB.getMyGroupShopMemberByName = function(shopMemberName) { ...@@ -130,7 +139,7 @@ CHAT_DB.getMyGroupShopMemberByName = function(shopMemberName) {
CHAT_DB.getMyGroupShopMemberNotInRoomByName = function(shopMemberName) { CHAT_DB.getMyGroupShopMemberNotInRoomByName = function(shopMemberName) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getMyGroupShopMemberNotInRoomByName", {"shopMemberName": shopMemberName}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupShopMemberNotInRoomByName(shopMemberName)); return JSON.parse(android.getMyGroupShopMemberNotInRoomByName(shopMemberName));
...@@ -148,7 +157,7 @@ CHAT_DB.getAllGroupShopMemberByName = function(shopMemberName) { ...@@ -148,7 +157,7 @@ CHAT_DB.getAllGroupShopMemberByName = function(shopMemberName) {
CHAT_DB.getAllGroupShopMemberNotInRoomByName = function(shopMemberName) { CHAT_DB.getAllGroupShopMemberNotInRoomByName = function(shopMemberName) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getAllGroupShopMemberNotInRoomByName", {"shopMemberName": shopMemberName}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getAllGroupShopMemberNotInRoomByName(shopMemberName)); return JSON.parse(android.getAllGroupShopMemberNotInRoomByName(shopMemberName));
...@@ -210,7 +219,7 @@ CHAT_DB.getArchiveDetail = function(archiveId) { ...@@ -210,7 +219,7 @@ CHAT_DB.getArchiveDetail = function(archiveId) {
CHAT_DB.updateArchiveDetail = function(archiveId) { CHAT_DB.updateArchiveDetail = function(archiveId) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.updateArchiveDetail.postMessage({archiveId}); webkit.messageHandlers.updateArchiveDetail.postMessage(archiveId);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.updateArchiveDetail(archiveId); android.updateArchiveDetail(archiveId);
} }
...@@ -218,7 +227,7 @@ CHAT_DB.updateArchiveDetail = function(archiveId) { ...@@ -218,7 +227,7 @@ CHAT_DB.updateArchiveDetail = function(archiveId) {
CHAT_DB.searchMessages = function(keyword, userList) { CHAT_DB.searchMessages = function(keyword, userList) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
// TODO return JSON.parse(callNativeApp("searchMessages", {"keyWord": keyword, "userList": userList}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
return JSON.parse(android.searchMessages(keyword, userList)); return JSON.parse(android.searchMessages(keyword, userList));
} }
...@@ -226,7 +235,7 @@ CHAT_DB.searchMessages = function(keyword, userList) { ...@@ -226,7 +235,7 @@ CHAT_DB.searchMessages = function(keyword, userList) {
CHAT_DB.getMyGroupUsersNotInRoom = function() { CHAT_DB.getMyGroupUsersNotInRoom = function() {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getMyGroupUsersNotInRoom", {}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getMyGroupUsersNotInRoom()); return JSON.parse(android.getMyGroupUsersNotInRoom());
...@@ -235,9 +244,59 @@ CHAT_DB.getMyGroupUsersNotInRoom = function() { ...@@ -235,9 +244,59 @@ CHAT_DB.getMyGroupUsersNotInRoom = function() {
CHAT_DB.getUserInfo = function(shopMemberId) { CHAT_DB.getUserInfo = function(shopMemberId) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要 return JSON.parse(callNativeApp("getUserInfo", {"shopMemberId": shopMemberId}));
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn //String形式をJsonに変更してReturn
return JSON.parse(android.getUserInfo(shopMemberId)); return JSON.parse(android.getUserInfo(shopMemberId));
} }
} };
\ No newline at end of file
CHAT_DB.getBeforeRoomType = function() {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp("getBeforeRoomType", {});
}
};
CHAT_DB.getRoomType = function() {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return callNativeApp("getRoomType", {});
}
};
CHAT_DB.removeFavoriteUser = function(shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp("removeFavoriteUser", {"shopMemberId": shopMemberId});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.addFavoriteUser = function(shopMemberId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp("addFavoriteUser", {"shopMemberId": shopMemberId});
if (result == "true") {
return true;
} else {
return false;
}
}
};
CHAT_DB.addFavoriteGroup = function(groupId) {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
var result = callNativeApp("addFavoriteGroup", {"groupId": groupId});
if (result == "true") {
return true;
} else {
return false;
}
}
};
\ No newline at end of file
jQuery('#homeButton').on('click', function() { jQuery('#homeButton').on('click', function() {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO IOS処理追加必要。 webkit.messageHandlers.goHome.postMessage({});
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.goHome(); android.goHome();
} }
......
...@@ -15,7 +15,7 @@ $('#roomNameChangeBtn').click(function() { ...@@ -15,7 +15,7 @@ $('#roomNameChangeBtn').click(function() {
//TODO validation //TODO validation
var changeRoomName = $('#roomNameInput').val(); var changeRoomName = $('#roomNameInput').val();
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO webkit.messageHandlers.changeRoomName.postMessage(changeRoomName);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.changeRoomName(changeRoomName); android.changeRoomName(changeRoomName);
} }
......
...@@ -206,7 +206,7 @@ CHAT_UI.sendMessage = function(e) { ...@@ -206,7 +206,7 @@ CHAT_UI.sendMessage = function(e) {
, 0 , 0
); );
} }
$('.message_input_group').focus(); $('.message_input_form').focus();
} }
//メッセージ送信 //メッセージ送信
$('#messageInput').on('keypress', function(event) { $('#messageInput').on('keypress', function(event) {
...@@ -691,9 +691,9 @@ CHAT_UI.showConfirmView = function(isInvite) { ...@@ -691,9 +691,9 @@ CHAT_UI.showConfirmView = function(isInvite) {
//todo android create room api //todo android create room api
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.createChatRoom("1",userIdList.join(','),newRoomName); android.createChatRoom("1", userIdList.join(','), newRoomName, makeRoomFlg.MAKE_ROOM);
} else { } else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName}); webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.MAKE_ROOM});
} }
...@@ -784,8 +784,11 @@ CHAT_UI.showConfirmView = function(isInvite) { ...@@ -784,8 +784,11 @@ CHAT_UI.showConfirmView = function(isInvite) {
// ルーム名のtrimmingした後、URIencodingを行う // ルーム名のtrimmingした後、URIencodingを行う
const encodedRoomName = encodeURIComponent(trimmedRoomName); const encodedRoomName = encodeURIComponent(trimmedRoomName);
android.createChatRoom("1",userIdList.join(','),encodedRoomName); if (typeof(android) != "undefined") {
android.createChatRoom("1", userIdList.join(','), encodedRoomName, makeRoomFlg.MAKE_ROOM);
} else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.MAKE_ROOM});
}
} }
} }
} }
...@@ -1020,11 +1023,15 @@ CHAT_UI.refreshRoomList = function(roomType) { ...@@ -1020,11 +1023,15 @@ CHAT_UI.refreshRoomList = function(roomType) {
var beforeRoomType; var beforeRoomType;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
beforeRoomType = android.getBeforeRoomType(); beforeRoomType = android.getBeforeRoomType();
} else {
beforeRoomType = CHAT_DB.getBeforeRoomType();
} }
if (beforeRoomType != null) { if (beforeRoomType != null) {
roomType = beforeRoomType; roomType = beforeRoomType;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.clearBeforeRoomType(); android.clearBeforeRoomType();
} else {
webkit.messageHandlers.clearBeforeRoomType.postMessage({});
} }
} }
CHAT_UI.showLoadingIndicator(); CHAT_UI.showLoadingIndicator();
...@@ -1129,7 +1136,7 @@ CHAT_UI.joinRoom = function(roomId,roomName) { ...@@ -1129,7 +1136,7 @@ CHAT_UI.joinRoom = function(roomId,roomName) {
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.joinRoom(roomId,roomName); android.joinRoom(roomId,roomName);
} else { } else {
webkit.messageHandlers.roomInfosaveMessageHandlerId.postMessage({"roomId": roomId, "roomName": roomName}); webkit.messageHandlers.joinRoom.postMessage({"roomId": roomId, "roomName": roomName});
} }
}; };
...@@ -1139,12 +1146,17 @@ CHAT_UI.loadMessages = function(roomId, roomName) { ...@@ -1139,12 +1146,17 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.updateMessages(roomId); android.updateMessages(roomId);
} else { } else {
webkit.messageHandlers.updateMessages.postMessage({roomId}); webkit.messageHandlers.updateMessages.postMessage(roomId);
} }
} else { } else {
CHAT_UI.refreshForOffline(); CHAT_UI.refreshForOffline();
} }
var roomType = android.getRoomType(); var roomType;
if (typeof(android) != "undefined") {
roomType = android.getRoomType();
} else {
roomType = CHAT_DB.getRoomType();
}
if (roomType == chatRoomType.DM) { if (roomType == chatRoomType.DM) {
$('#roomMenu').removeClass('none'); $('#roomMenu').removeClass('none');
} }
...@@ -1319,18 +1331,39 @@ $('#tabAllGroupOnMakeRoom').on('click', function(e) { ...@@ -1319,18 +1331,39 @@ $('#tabAllGroupOnMakeRoom').on('click', function(e) {
CHAT_UI.refreshAllGroupForMakeRoom('0'); CHAT_UI.refreshAllGroupForMakeRoom('0');
}); });
$('#tabMyGroupOnAddUser').on('click', function(e) {
CHAT_UI.refreshMyGroupForAddUser();
});
$('#tabAllGroupOnAddUser').on('click', function(e) {
CHAT_UI.refreshAllGroupForAddUser('0');
});
$('#makeRoomConfirmBtn').on('click', function(e) { $('#makeRoomConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(",")); if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
}
$('#makeRoomForm').submit(); $('#makeRoomForm').submit();
}); });
$('#addUserConfirmBtn').on('click', function(e) { $('#addUserConfirmBtn').on('click', function(e) {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(",")); if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
}
$('#addUserForm').submit(); $('#addUserForm').submit();
}); });
CHAT_UI.roomDisplayOff = function() { CHAT_UI.roomDisplayOff = function() {
android.roomDisplayOff(); if (typeof(android) != "undefined") {
android.roomDisplayOff();
} else {
webkit.messageHandlers.roomDisplayOff.postMessage({});
}
} }
CHAT_UI.favoriteUserChange = function(shopMemberId, star) { CHAT_UI.favoriteUserChange = function(shopMemberId, star) {
...@@ -1353,17 +1386,16 @@ CHAT_UI.removeFavoriteUser = function(shopMemberId) { ...@@ -1353,17 +1386,16 @@ CHAT_UI.removeFavoriteUser = function(shopMemberId) {
CHAT_UI.showLoadingIndicator(); CHAT_UI.showLoadingIndicator();
$('#userNameCard').modal('hide'); $('#userNameCard').modal('hide');
$('#myNameCard').modal('hide'); $('#myNameCard').modal('hide');
var result;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
var result = android.removeFavoriteUser(shopMemberId); result = android.removeFavoriteUser(shopMemberId);
if (!result) { } else {
$('.shopmember_'+shopMemberId).addClass('active'); result = CHAT_DB.removeFavoriteUser(shopMemberId);
$('.shopmember_'+shopMemberId).removeClass('disable'); }
} else { if (!result) {
$('.shopmember_'+shopMemberId).removeClass('active'); $('.shopmember_'+shopMemberId).addClass('active');
$('.shopmember_'+shopMemberId).addClass('disable'); $('.shopmember_'+shopMemberId).removeClass('disable');
}
} else { } else {
webkit.messageHandlers.removeFavoriteUser.postMessage({shopMemberId});
$('.shopmember_'+shopMemberId).removeClass('active'); $('.shopmember_'+shopMemberId).removeClass('active');
$('.shopmember_'+shopMemberId).addClass('disable'); $('.shopmember_'+shopMemberId).addClass('disable');
} }
...@@ -1373,7 +1405,12 @@ CHAT_UI.removeFavoriteUser = function(shopMemberId) { ...@@ -1373,7 +1405,12 @@ CHAT_UI.removeFavoriteUser = function(shopMemberId) {
CHAT_UI.insertFavoriteUser = function(shopMemberId) { CHAT_UI.insertFavoriteUser = function(shopMemberId) {
$('#userNameCard').modal('hide'); $('#userNameCard').modal('hide');
$('#myNameCard').modal('hide'); $('#myNameCard').modal('hide');
var result = android.addFavoriteUser(shopMemberId); var result;
if (typeof(android) != "undefined") {
result = android.addFavoriteUser(shopMemberId);
} else {
result = CHAT_DB.addFavoriteUser(shopMemberId);
}
if (!result) { if (!result) {
$('.shopmember_'+shopMemberId).addClass('disable'); $('.shopmember_'+shopMemberId).addClass('disable');
$('.shopmember_'+shopMemberId).removeClass('active'); $('.shopmember_'+shopMemberId).removeClass('active');
...@@ -1390,7 +1427,7 @@ CHAT_UI.removeFavoriteGroup = function(groupId) { ...@@ -1390,7 +1427,7 @@ CHAT_UI.removeFavoriteGroup = function(groupId) {
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.removeFavoriteGroup(groupId); android.removeFavoriteGroup(groupId);
} else { } else {
webkit.messageHandlers.removeFavoriteGroup.postMessage({groupId}); webkit.messageHandlers.removeFavoriteGroup.postMessage(groupId);
} }
$('.group_'+groupId).removeClass('active'); $('.group_'+groupId).removeClass('active');
$('.group_'+groupId).addClass('disable'); $('.group_'+groupId).addClass('disable');
...@@ -1399,7 +1436,12 @@ CHAT_UI.removeFavoriteGroup = function(groupId) { ...@@ -1399,7 +1436,12 @@ CHAT_UI.removeFavoriteGroup = function(groupId) {
CHAT_UI.insertFavoriteGroup = function(groupId) { CHAT_UI.insertFavoriteGroup = function(groupId) {
CHAT_UI.showLoadingIndicator(); CHAT_UI.showLoadingIndicator();
var result = android.addFavoriteGroup(groupId); var result;
if (typeof(android) != "undefined") {
result = android.addFavoriteGroup(groupId);
} else {
result = CHAT_DB.addFavoriteGroup(groupId);
}
if (!result) { if (!result) {
$('.group_'+groupId).addClass('disable'); $('.group_'+groupId).addClass('disable');
$('.group_'+groupId).removeClass('active'); $('.group_'+groupId).removeClass('active');
...@@ -1425,7 +1467,7 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) { ...@@ -1425,7 +1467,7 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) {
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
$('#contactSearch').attr('placeholder', getLocalizedString('searchUserAndGroup')); $('#contactSearch').attr('placeholder', getLocalizedString('searchUserAndGroup'));
$('#tabAllGroup').prop('checked', true); $('#tabAllGroup').prop('checked', true);
//オンライン状態であればサーバから情報更新。 //オンライン状態であればサーバから情報更新。
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
...@@ -1526,9 +1568,9 @@ CHAT_UI.startChat = function(userShopMemberId,userName) { ...@@ -1526,9 +1568,9 @@ CHAT_UI.startChat = function(userShopMemberId,userName) {
// 参加ユーザ名でルーム名を生成 // 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' +userName; let newRoomName = CHAT.globalLoginParameter.loginId + ',' +userName;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.createChatRoom(chatRoomType.DM, userIdList.join(','),newRoomName); android.createChatRoom(chatRoomType.DM, userIdList.join(','),newRoomName, makeRoomFlg.NAME_CARD);
} else { } else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": chatRoomType.DM, "userIdList": userIdList.join(','), "roomName": newRoomName}); webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.NAME_CARD});
} }
CHAT_UI.hideNamecard(nameCardAreaId.USER); CHAT_UI.hideNamecard(nameCardAreaId.USER);
}; };
...@@ -1539,6 +1581,9 @@ CHAT_UI.startVoice = function() { ...@@ -1539,6 +1581,9 @@ CHAT_UI.startVoice = function() {
CHAT_UI.makeNameCard = function(shopMemberId) { CHAT_UI.makeNameCard = function(shopMemberId) {
if (CHAT.globalLoginParameter.shopMemberId == shopMemberId) {
return;
}
var nameCardInfo = CHAT_DB.getNameCardData(shopMemberId); var nameCardInfo = CHAT_DB.getNameCardData(shopMemberId);
var namecardTemplate; var namecardTemplate;
$.get({ url: "./template/template_user_name_card.html", async: false } $.get({ url: "./template/template_user_name_card.html", async: false }
...@@ -1678,7 +1723,7 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) { ...@@ -1678,7 +1723,7 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
case "2": // 音声 case "2": // 音声
case 2: case 2:
$('#archive_player').prepend('<audio class="archive_audio_player" src=' + archiveFilePath + ' controls></audio>'); $('#archive_player').prepend('<audio class="archive_audio_player" src=' + archiveFilePath + ' controls></audio>');
$('#archive_player').prepend('<img class="archive_player" src=' + "https://via.placeholder.com/1280x720" + ' />'); $('#archive_player').prepend('<img class="archive_player" src=' + "./img/capture.png" + ' />');
break; break;
case "3": // 文書 case "3": // 文書
case 3: case 3:
...@@ -1693,7 +1738,8 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) { ...@@ -1693,7 +1738,8 @@ CHAT_UI.refreshArchiveDetailScreen = function(archiveId) {
// 参加ユーザ情報を表示 // 参加ユーザ情報を表示
let attendUserList = archive.attendUserIds; let attendUserList = archive.attendUserIds;
if (CHAT_UTIL.isAndroid()) { if (typeof(android) != "undefined") {
// ios実装不要
attendUserList = JSON.parse(archive.attendUserIds); attendUserList = JSON.parse(archive.attendUserIds);
} }
...@@ -1755,10 +1801,17 @@ CHAT_UI.refreshMyGroupForMakeRoom = function() { ...@@ -1755,10 +1801,17 @@ CHAT_UI.refreshMyGroupForMakeRoom = function() {
}); });
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo('0'); if (typeof(android) != "undefined") {
android.updateMyInfo(); android.updateGroupInfo('0');
android.updateGroupUser(); android.updateMyInfo();
android.updateFavorite(); android.updateGroupUser();
android.updateFavorite();
} else {
webkit.messageHandlers.updateGroupInfo.postMessage("0");
webkit.messageHandlers.updateMyInfo.postMessage({});
webkit.messageHandlers.updateGroupUser.postMessage({});
webkit.messageHandlers.updateFavorite.postMessage({});
}
} }
//お気に入りグループ取得。 //お気に入りグループ取得。
...@@ -2000,8 +2053,11 @@ CHAT_UI.showMakeRoomConfirmView = function() { ...@@ -2000,8 +2053,11 @@ CHAT_UI.showMakeRoomConfirmView = function() {
// 参加ユーザ名でルーム名を生成 // 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' + userNameList.join(','); let newRoomName = CHAT.globalLoginParameter.loginId + ',' + userNameList.join(',');
android.createChatRoom("1",userIdList.join(','),newRoomName); if (typeof(android) != "undefined") {
android.createChatRoom("1", userIdList.join(','), newRoomName, makeRoomFlg.MAKE_ROOM);
} else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.MAKE_ROOM});
}
} else if(trimmedRoomName.includes(';') || trimmedRoomName.includes('/') || trimmedRoomName.includes('?') || trimmedRoomName.includes(':') || trimmedRoomName.includes("@") } else if(trimmedRoomName.includes(';') || trimmedRoomName.includes('/') || trimmedRoomName.includes('?') || trimmedRoomName.includes(':') || trimmedRoomName.includes("@")
|| trimmedRoomName.includes('&') || trimmedRoomName.includes('=') || trimmedRoomName.includes("+") || trimmedRoomName.includes('$') || trimmedRoomName.includes(",") || trimmedRoomName.includes('-') || trimmedRoomName.includes('&') || trimmedRoomName.includes('=') || trimmedRoomName.includes("+") || trimmedRoomName.includes('$') || trimmedRoomName.includes(",") || trimmedRoomName.includes('-')
|| trimmedRoomName.includes('_') || trimmedRoomName.includes('.') || trimmedRoomName.includes('!') || trimmedRoomName.includes('~') || trimmedRoomName.includes('*') || trimmedRoomName.includes("\'") || trimmedRoomName.includes('_') || trimmedRoomName.includes('.') || trimmedRoomName.includes('!') || trimmedRoomName.includes('~') || trimmedRoomName.includes('*') || trimmedRoomName.includes("\'")
...@@ -2044,8 +2100,11 @@ CHAT_UI.showMakeRoomConfirmView = function() { ...@@ -2044,8 +2100,11 @@ CHAT_UI.showMakeRoomConfirmView = function() {
// ルーム名のtrimmingした後、URIencodingを行う // ルーム名のtrimmingした後、URIencodingを行う
const encodedRoomName = encodeURIComponent(trimmedRoomName); const encodedRoomName = encodeURIComponent(trimmedRoomName);
android.createChatRoom("1",userIdList.join(','),encodedRoomName); if (typeof(android) != "undefined") {
android.createChatRoom("1", userIdList.join(','), trimmedRoomName, makeRoomFlg.MAKE_ROOM);
} else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.MAKE_ROOM});
}
} }
}); });
} }
...@@ -2079,7 +2138,11 @@ CHAT_UI.showAddUserConfirmView = function() { ...@@ -2079,7 +2138,11 @@ CHAT_UI.showAddUserConfirmView = function() {
selectedUserList.forEach(function(user){ selectedUserList.forEach(function(user){
userIdList.push(user.shopMemberId); userIdList.push(user.shopMemberId);
}) })
android.inviteUsers(userIdList.join(',')); if (typeof(android) != "undefined") {
android.inviteUsers(userIdList.join(','));
} else {
webkit.messageHandlers.inviteUsers.postMessage({"userIdList": userIdList.join(',')});
}
}); });
} }
...@@ -2112,10 +2175,17 @@ CHAT_UI.refreshMyGroupForAddUser = function() { ...@@ -2112,10 +2175,17 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
}); });
if (IS_ONLINE == 'true') { if (IS_ONLINE == 'true') {
android.updateGroupInfo('0'); if (typeof(android) != "undefined") {
android.updateMyInfo(); android.updateGroupInfo('0');
android.updateGroupUser(); android.updateMyInfo();
android.updateFavorite(); android.updateGroupUser();
android.updateFavorite();
} else {
webkit.messageHandlers.updateGroupInfo.postMessage("0");
webkit.messageHandlers.updateMyInfo.postMessage({});
webkit.messageHandlers.updateGroupUser.postMessage({});
webkit.messageHandlers.updateFavorite.postMessage({});
}
} }
//お気に入りグループ取得。 //お気に入りグループ取得。
...@@ -2170,6 +2240,116 @@ CHAT_UI.refreshMyGroupForAddUser = function() { ...@@ -2170,6 +2240,116 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
}) })
} }
CHAT_UI.refreshAllGroupForAddUser = 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();
$('#tabAllGroupOnAllUser').prop('checked', true);
//オンライン状態であればサーバから情報更新。
if (IS_ONLINE == 'true') {
if (typeof(android) != "undefined") {
android.updateGroupInfo(groupId);
} else {
webkit.messageHandlers.updateGroupInfo.postMessage(groupId);
}
}
//画面エリアを初期化。
$('#parentGroupBtnForMakeRoom').off();
$('#rootGroupBtnForMakeRoom').off();
$('#childGroupListAreaForMakeRoom').html('');
$('#userInGroupListForMakeRoom').html('');
$('#groupPathAreaForMakeRoom').html('');
//DBからグループ情報を取得。
var result = CHAT_DB.getGroupInfoForAddUser(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== 'undefined') {
$('#parentGroupBtnForMakeRoom').on('click', function() {
CHAT_UI.refreshAllGroupForAddUser(result.parentGroupId);
});
}
if (typeof result.rootGroupId !== 'undefined') {
if (paramGroupId == 0) { groupId = result.rootGroupId }
$('#rootGroupBtnForMakeRoom').on('click', function() {
CHAT_UI.refreshAllGroupForAddUser(result.rootGroupId);
});
}
if (groupId == result.rootGroupId || paramGroupId == '0') {
$('#rootGroupArea').addClass('none');
$('#parentGroupArea').addClass('none');
} else {
$('#rootGroupArea').removeClass('none');
$('#parentGroupArea').removeClass('none');
}
//該当グループのパースを表示。
var groupPathTemplate;
$.get({ url: "./template/template_make_room_group_path.html", async: false }
, function(text) {
groupPathTemplate = text;
});
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;
$.get({ url: "./template/template_make_room_group_list.html", async: false }
, function(text) {
groupTemplate = text;
});
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;
$.get({ url: "./template/template_make_room_user_list.html", async: false }
, function(text) {
userTemplate = text;
});
result.groupUserList.forEach(function(groupUser) {
groupUser.profileUrl = CHAT.getProfileImgUrl(groupUser.profileUrl)
let findObj = CHAT.globalSelectedUserList.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);
};
CHAT_UI.refreshForOnline = function() { CHAT_UI.refreshForOnline = function() {
IS_ONLINE = 'true'; IS_ONLINE = 'true';
$('.craeteRoomButton').show(); $('.craeteRoomButton').show();
...@@ -2179,6 +2359,7 @@ CHAT_UI.refreshForOnline = function() { ...@@ -2179,6 +2359,7 @@ CHAT_UI.refreshForOnline = function() {
$('#roomMenu').show(); $('#roomMenu').show();
$('.attach_file').show(); $('.attach_file').show();
$('.fa-download').show(); $('.fa-download').show();
$('.chat_room_footer').show();
if (typeof $('#roomTitle').val() != 'undefined') { if (typeof $('#roomTitle').val() != 'undefined') {
CHAT_SOCKET.connectSocket(); CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function() { socket.emit('join', CHAT.globalLoginParameter, function() {
...@@ -2195,4 +2376,12 @@ CHAT_UI.refreshForOffline = function() { ...@@ -2195,4 +2376,12 @@ CHAT_UI.refreshForOffline = function() {
$('#roomMenu').hide(); $('#roomMenu').hide();
$('.attach_file').hide(); $('.attach_file').hide();
$('.fa-download').hide(); $('.fa-download').hide();
$('.chat_room_footer').hide();
}
CHAT_UI.displayExistRoom = function(roomId) {
if (confirm('error_already_exist_same_user')) {
android.joinRoom(roomId, '');
}
return;
} }
\ No newline at end of file
...@@ -293,6 +293,10 @@ $(function() { ...@@ -293,6 +293,10 @@ $(function() {
// フィルタ表示 // フィルタ表示
$('#filter').removeClass('none'); $('#filter').removeClass('none');
$('#user_list').addClass('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(){ $('.chat_room_src_form .cancel').click(function(){
$('.nav_item_wrap').removeClass('none'); $('.nav_item_wrap').removeClass('none');
...@@ -303,10 +307,28 @@ $(function() { ...@@ -303,10 +307,28 @@ $(function() {
// ユーザーリスト表示 // ユーザーリスト表示
$('#filter').addClass('none'); $('#filter').addClass('none');
$('#user_list').removeClass('none'); $('#user_list').removeClass('none');
$('.chat_room_src_form input[type="search"]').blur();
$('#searchMessage').removeClass('onfocus');
$('.chat_list').addClass('none');
}); });
$('.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');
})
// フィルタ選択イベント // フィルタ選択イベント
$('#filter .img_wrap').click(function(){ $(document).on('click', '#filter .img_wrap', function(event) {
// チェックアイコン追加 // チェックアイコン追加
$(this).toggleClass("filter"); $(this).toggleClass("filter");
}); });
...@@ -494,12 +516,13 @@ $(function() { ...@@ -494,12 +516,13 @@ $(function() {
jQueryMessages.append(noResultMsg); jQueryMessages.append(noResultMsg);
} }
if (e.key == "Enter" || e.KeyCode == 13) { if (e.key == "Enter" || e.KeyCode == 13) {
$('#contact .search_form input[type="search"]').blur(); $('#searchMessage').removeClass('onfocus');
$('.chat_room_src_form input[type="search"]').blur();
return; return;
} }
}); });
$('.filter_img').on('click', function() { $(document).on('click', '.filter_img', function(event) {
let workVal = ""; let workVal = "";
var keyword = $('.chat_room_src_form input[type="search"]').val(); var keyword = $('.chat_room_src_form input[type="search"]').val();
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
......
...@@ -5,7 +5,11 @@ $('.category').on('click', function() { ...@@ -5,7 +5,11 @@ $('.category').on('click', function() {
}); });
$('.home_btn').on('click', function() { $('.home_btn').on('click', function() {
android.goHome(); if (CHAT_UTIL.isAndroid()) {
android.goHome();
} else if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.goHome.postMessage({});
}
}); });
$(function() { $(function() {
var h = $(window).height(); //画面の高さを取得 var h = $(window).height(); //画面の高さを取得
...@@ -42,7 +46,7 @@ $(function() { ...@@ -42,7 +46,7 @@ $(function() {
$('.craeteRoomButton').removeClass('none'); $('.craeteRoomButton').removeClass('none');
}); });
$('.message_input_form').click(function(){ $('.message_input_form').on('focus',function(e){
$('.message_input_send').removeClass('none'); $('.message_input_send').removeClass('none');
$('.attach_file').addClass('none'); $('.attach_file').addClass('none');
$('.footer_content_b').addClass('none'); $('.footer_content_b').addClass('none');
...@@ -51,9 +55,10 @@ $(function() { ...@@ -51,9 +55,10 @@ $(function() {
$('.message_input_form').on('focusout',function(e){ $('.message_input_form').on('focusout',function(e){
if($(e.relatedTarget).hasClass('message_input_send')){ if($(e.relatedTarget).hasClass('message_input_send')){
CHAT_UI.sendMessage(); CHAT_UI.sendMessage();
} else {
$('.message_input_send').addClass('none');
$('.attach_file').removeClass('none');
$('.footer_content_b').removeClass('none');
} }
$('.message_input_send').addClass('none');
$('.attach_file').removeClass('none');
$('.footer_content_b').removeClass('none');
}); });
}); });
...@@ -43,5 +43,10 @@ const collaborationTypeKey = { ...@@ -43,5 +43,10 @@ const collaborationTypeKey = {
VIDEO : "video" VIDEO : "video"
} }
const makeRoomFlg = {
NAME_CARD : 0,
MAKE_ROOM : 1
}
const messageSeperator = "<::split>"; const messageSeperator = "<::split>";
const dataMessageScheme = "::NOT_MESSAGE"; const dataMessageScheme = "::NOT_MESSAGE";
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