Commit 51d55f78 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/chat-ui.js
parents 73b58bf1 057364bb
......@@ -50,7 +50,7 @@
<main id="archive">
<!-- 検索 -->
<div class="search_form">
<input type="search" name="search" placeholder="検索">
<input type="search" name="search" placeholder="検索" maxlength="50">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</div>
......
......@@ -47,7 +47,7 @@
<main id="chat">
<!-- ユーザー検索 -->
<div class="search_form">
<input type="search" name="search" placeholder="ルーム検索">
<input type="search" name="search" placeholder="ルーム検索" maxlength="20">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</div>
......@@ -133,6 +133,7 @@
} else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({});
webkit.messageHandlers.saveSelectedUserList.postMessage("");
}
function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
CHAT_SERVER_URL = chatServerUrl;
......
......@@ -45,7 +45,7 @@
<form id="addUserForm" action="chat_add_user_confirm.html" method="post">
<!-- ユーザー検索 -->
<div class="search_form my-2">
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
<input type="input" name="hidden_for_prevent_submit" hidden>
......@@ -66,12 +66,12 @@
</div>
</div>
<div class="tab_content" id="tab2_content">
<div class="breadcrumb" id="groupPathAreaForMakeRoom"></div>
<div class="breadcrumb" id="groupPathAreaForAddUser"></div>
<div class="chat_list">
<!-- 全グループ -->
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center" id="rootGroupArea">
<a href="#" class="w-100" id="rootGroupBtnForMakeRoom">
<a href="#" class="w-100" id="rootGroupBtnForAddUser">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
......@@ -89,7 +89,7 @@
</a>
</li>
<li class="d-flex align-items-center" id="parentGroupArea">
<a href="#" class="w-100" id="parentGroupBtnForMakeRoom">
<a href="#" class="w-100" id="parentGroupBtnForAddUser">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
......@@ -106,8 +106,8 @@
</div>
</a>
</li>
<div id="childGroupListAreaForMakeRoom"></div>
<div id="userInGroupListForMakeRoom"></div>
<div id="childGroupListAreaForAddUser"></div>
<div id="userInGroupListForAddUser"></div>
</ul>
</div>
</div>
......
......@@ -45,7 +45,7 @@
<form id="makeRoomForm" action="chat_make_room_confirm.html" method="post">
<!-- ユーザー検索 -->
<div class="search_form my-2">
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
<input type="input" name="hidden_for_prevent_submit" hidden>
......
......@@ -44,7 +44,7 @@
<!-- ルーム名入力 -->
<div class="room_name">
<label><h2>ルーム名</h2></label>
<input type="text" class="input_name_room" name="room_name" id="newRoomName" placeholder="ルーム名を入力してください">
<input type="text" class="input_name_room" name="room_name" id="newRoomName" placeholder="ルーム名を入力してください" maxlength="20">
</div>
<!-- 参加者一覧 -->
......
......@@ -10,6 +10,7 @@
<!--<link rel="stylesheet" href="./css/notosansjp.css">-->
<link href="./fontawesome/css/all.css" rel="stylesheet">
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/jquery-ui.min.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/chat.css">
<link rel="stylesheet" href="./css/loading.css">
......@@ -22,7 +23,7 @@
<nav>
<div class="chat_room_src_form none">
<div class="d-flex flex-row h-100 align-items-center">
<input type="search" name="search" id="searchMessage" placeholder="メッセージ検索">
<input type="search" name="search" id="searchMessage" placeholder="メッセージ検索" maxlength="600">
<span class="src_icon"></span>
<a href="#" class="cancel" id="messageSearchCancle">キャンセル</a>
</div>
......@@ -93,7 +94,7 @@
<input class="d-none" type="file" name="image" id="videoInputTag" accept="video/mp4">
</form>
</div>
<input type="text" name="message" class="message_input_form" id="messageInput" placeholder="メッセージを入力してください">
<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>
</div>
</div>
......@@ -195,7 +196,6 @@
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
CHAT_UI.loadMessages(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.roomName);
};
</script>
</body>
......
......@@ -70,7 +70,7 @@
<!-- ユーザー検索 -->
<div class="search_form">
<form>
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</form>
......
......@@ -77,7 +77,7 @@
<!-- ユーザー検索 -->
<div class="search_form">
<form>
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</form>
......
......@@ -78,7 +78,7 @@
<!-- ユーザー検索 -->
<div class="search_form">
<form>
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</form>
......
......@@ -67,7 +67,7 @@
<!-- ユーザー検索 -->
<div class="search_form">
<form>
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</form>
......
......@@ -67,7 +67,7 @@
<!-- ユーザー検索 -->
<div class="search_form">
<form>
<input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</form>
......
......@@ -45,7 +45,7 @@
<main id="contact">
<!-- ユーザー検索 -->
<div class="search_form">
<input type="search" name="search" id="contactSearch" placeholder="ユーザー検索">
<input type="search" name="search" id="contactSearch" placeholder="ユーザー検索" maxlength="30">
<span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a>
</div>
......
......@@ -594,10 +594,10 @@ input[name="tab_item"] {
/* 既読エリア */
.room_left .date {
position: absolute;
width: 80px;
width: 110px;
text-align: left;
top: 30px;
right: -90px;
right: -120px;
font-size: 12px;
}
......@@ -635,7 +635,7 @@ input[name="tab_item"] {
background-color: #0070ca;
color: #fff;
margin: 0;
margin-left: 80px;
margin-left: 110px;
font-size: 18px;
word-break: break-word;
}
......@@ -653,7 +653,7 @@ input[name="tab_item"] {
/* 日付 */
.room_right .date {
position: absolute;
width: 80px;
width: 110px;
text-align: right;
top: 0px;
left: -10px;
......
......@@ -12,6 +12,9 @@ body {
a:hover {
text-decoration: none;
}
a:link {
color: black;
}
.none {
display: none !important;
}
......
......@@ -17,12 +17,9 @@ $(function() {
return;
}
$('.overlay_src_msg').empty();
if (CHAT_UTIL.isIOS()) {
CHAT_DB.callGetArchiveByName(keyword);
} else if (CHAT_UTIL.isAndroid()) {
ARCHIVE_UI.refreshSearchScreen(keyword);
}
ARCHIVE_UI.refreshSearchScreen(keyword);
if (e.KeyCode == 13 || e.key == "Enter") {
$('#archive .search_form input[type="search"]').blur();
return;
......
......@@ -103,7 +103,7 @@ CHAT_DB.getGroupInfo = function(groupId) {
CHAT_DB.getGroupInfoForAddUser = function(groupId) {
if (CHAT_UTIL.isIOS()) {
//TODO getGroupInfoの処理でユーザ情報にルーム参加者が入ってない処理。
return JSON.parse(callNativeApp("getGroupInfoForAddUser", {"groupId": groupId}));
} else if (CHAT_UTIL.isAndroid()) {
//String形式をJsonに変更してReturn
return JSON.parse(android.getGroupInfoForAddUser(groupId));
......
......@@ -554,7 +554,7 @@ CHAT_UI.scrollToBottom = function() {
const scrollHeight = messages.prop('scrollHeight');
//messages.scrollTop(scrollHeight);
$('html, body').animate({
scrollTop: scrollHeight
scrollTop: 9999999
}, 500);
};
......@@ -881,6 +881,7 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
// FIXME 追加読み込みの場合は差分の画像のみ監視すべきだが、現状新規入室時にしか対応出来ていない。
CHAT_UI.waitForLoadingImage = function(div, callback) {
var imgs = div.find("img");
console.log(imgs);
var count = imgs.length;
if (count==0)
callback();
......@@ -888,6 +889,7 @@ CHAT_UI.waitForLoadingImage = function(div, callback) {
imgs.one( "load" , function( e ) {
// イメージが読み込まれた
loaded++;
console.log('++');
if ( loaded === count ) {
callback();
}
......@@ -1020,6 +1022,11 @@ CHAT_UI.refreshContactScreen = function() {
}
CHAT_UI.refreshRoomList = function(roomType) {
if (IS_ONLINE == 'true') {
CHAT_UI.refreshForOnline();
} else {
CHAT_UI.refreshForOffline();
}
var beforeRoomType;
if (typeof(android) != "undefined") {
beforeRoomType = android.getBeforeRoomType();
......@@ -1084,8 +1091,12 @@ CHAT_UI.refreshRoomList = function(roomType) {
var displayMsg;
//TODO 協業の場合処理追加必要
if (room.messageType == messageType.TEXT || room.messageType == messageType.TEXT) displayMsg = room.message;
if (room.messageType == messageType.IMAGE || room.messageType == messageType.VIDEO) displayMsg = getLocalizedString("image");
if (room.messageType == messageType.IMAGE) displayMsg = getLocalizedString("image");
if (room.messageType == messageType.VIDEO) displayMsg = getLocalizedString("video");
if (room.messageType == messageType.COMMUNICATIONSTART) displayMsg = getLocalizedString("collaboration_start");
if (room.messageType == messageType.COMMUNICATIONEND) displayMsg = getLocalizedString("collaboration_end");
var attendUserName = [];
room.attendUsers.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
attendUserName.push(user.shopMemberName);
......@@ -1094,6 +1105,10 @@ CHAT_UI.refreshRoomList = function(roomType) {
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,
......@@ -1101,7 +1116,7 @@ CHAT_UI.refreshRoomList = function(roomType) {
profileImage: room.profileImagePath,
lastMessage: displayMsg ,
time: room.insertDate ? CHAT_UTIL.formatDate(room.insertDate).createdAt : '',
unreadMsgCnt: room.unreadCount == 0 ? '' : room.unreadCount,
unreadMsgCnt: unreadMessageCount,
userCnt: room.attendUsers.length + 1,
attendUsers: room.attendUsers
});
......@@ -1123,10 +1138,7 @@ CHAT_UI.refreshRoomList = function(roomType) {
default:
}
});
if (CHAT_UI.isLandscapeMode()) {
$(".chat_list").removeClass("col-12").addClass("col-6");
}
console.log('DONE');
CHAT_UI.dismissLoadingIndicator();
};
......@@ -1141,6 +1153,7 @@ CHAT_UI.joinRoom = function(roomId,roomName) {
};
CHAT_UI.loadMessages = function(roomId, roomName) {
var now = new Date();
if (IS_ONLINE == 'true') {
CHAT_UI.refreshForOnline();
if (typeof(android) != "undefined") {
......@@ -1250,11 +1263,14 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
message.message = replacePath;
/* if (message.message contain) {
}*/
var isOtherYear = false;
var isToday = false;
if (messageTime.createdAt.includes(':')) {
isToday = true;
}
if (now.getFullYear() != message.insertDate.substring(0,4)) {
isOtherYear = true;
}
if (messageTime.createdAtDay != checkBeforeDate && checkBeforeDate != "") {
let messageDay = CHAT_UTIL.systemDay(beforeDate);
let html = Mustache.render(systemMessageTemplate, {
......@@ -1268,6 +1284,7 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
}
checkBeforeDate = messageTime.createdAtDay;
beforeDate = message.insertDate;
if (message.messageType == messageType.COMMUNICATIONSTART || message.messageType == messageType.COMMUNICATIONEND) {
var collaborationInfo = JSON.parse(message.message);
var userInCollaboration = JSON.parse(android.getUserInfoList(collaborationInfo.userList));
......@@ -1283,23 +1300,27 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
collaborationType: collaborationInfo.collaborationType,
isToday: isToday,
createdAtDay: messageTime.createdAtDay,
createdAtTime: messageTime.createdAtTime
});
html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html;
workVal = html + workVal;
} else {
let html = Mustache.render(template, {
text: message.message,
from: message.loginId,
shopMemberId: message.shopMemberId,
profileImage: message.profileUrl,
createdAtDay: messageTime.createdAtDay,
createdAtTime: messageTime.createdAtTime,
unreadCount: message.unreadCount,
isToday: isToday
createdAtYear: message.insertDate.substring(0,4) + getLocalizedString('year') + ' ',
isOtherYear: isOtherYear
});
html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html;
workVal = html + workVal;
} else {
let html = Mustache.render(template, {
text: message.message,
from: message.loginId,
shopMemberId: message.shopMemberId,
profileImage: message.profileUrl,
createdAtDay: messageTime.createdAtDay,
createdAtTime: messageTime.createdAtTime,
createdAtYear: message.insertDate.substring(0,4) + getLocalizedString('year') + ' ',
unreadCount: message.unreadCount,
isOtherYear: isOtherYear,
isToday: isToday
});
html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html;
workVal = html + workVal;
}
})
......@@ -1363,8 +1384,7 @@ $('#makeRoomConfirmBtn').on('click', function(e) {
if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
webkit.messageHandlers.saveSelectedUserList.postMessage(CHAT.globalSelectedUserList.join(","));
}
$('#makeRoomForm').submit();
});
......@@ -1373,8 +1393,7 @@ $('#addUserConfirmBtn').on('click', function(e) {
if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
var userList = CHAT.globalSelectedUserList.join(",");
webkit.messageHandlers.saveSelectedUserList.postMessage(userList);
webkit.messageHandlers.saveSelectedUserList.postMessage(CHAT.globalSelectedUserList.join(","));
}
$('#addUserForm').submit();
});
......@@ -1445,13 +1464,20 @@ CHAT_UI.insertFavoriteUser = function(shopMemberId) {
};
CHAT_UI.removeFavoriteGroup = function(groupId) {
CHAT_UI.showLoadingIndicator();
var result;
if (typeof(android) != "undefined") {
android.removeFavoriteGroup(groupId);
result = android.removeFavoriteGroup(groupId);
} else {
result = webkit.messageHandlers.removeFavoriteGroup.postMessage(groupId);
}
if (!result) {
$('.group_'+groupId).addClass('active');
$('.group_'+groupId).removeClass('disable');
} else {
webkit.messageHandlers.removeFavoriteGroup.postMessage(groupId);
$('.group_'+groupId).removeClass('active');
$('.group_'+groupId).addClass('disable');
}
$('.group_'+groupId).removeClass('active');
$('.group_'+groupId).addClass('disable');
CHAT_UI.dismissLoadingIndicator();
};
......@@ -1466,8 +1492,6 @@ CHAT_UI.insertFavoriteGroup = function(groupId) {
if (!result) {
$('.group_'+groupId).addClass('disable');
$('.group_'+groupId).removeClass('active');
CHAT_UI.dismissLoadingIndicator();
return;
} else {
$('.group_'+groupId).removeClass('disable');
$('.group_'+groupId).addClass('active');
......@@ -2124,7 +2148,7 @@ CHAT_UI.showMakeRoomConfirmView = function() {
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});
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": trimmedRoomName, "screenFlg": makeRoomFlg.MAKE_ROOM});
}
}
});
......@@ -2177,20 +2201,20 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
// グループの様式を読み込む
var groupTemplate;
$.get({ url: "./template/template_make_room_group_list.html", async: false }
$.get({ url: "./template/template_add_user_group_list.html", async: false }
, function(text) {
groupTemplate = text;
});
// ユーザの様式を読み込む
var userTemplate;
$.get({ url: "./template/template_make_room_user_list.html", async: false }
$.get({ url: "./template/template_add_user_user_list.html", async: false }
, function(text) {
userTemplate = text;
});
var groupUserTemplate;
$.get({ url: "./template/template_make_room_group_user_list.html", async: false }
$.get({ url: "./template/template_add_user_group_user_list.html", async: false }
, function(text) {
groupUserTemplate = text;
});
......@@ -2270,7 +2294,7 @@ CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) {
$('.content').removeClass('none');
$('.overlay_src_msg').empty();
$('#tabAllGroupOnAllUser').prop('checked', true);
$('#tabAllGroupOnAddUser').prop('checked', true);
//オンライン状態であればサーバから情報更新。
if (IS_ONLINE == 'true') {
......@@ -2282,24 +2306,24 @@ CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) {
}
//画面エリアを初期化。
$('#parentGroupBtnForMakeRoom').off();
$('#rootGroupBtnForMakeRoom').off();
$('#childGroupListAreaForMakeRoom').html('');
$('#userInGroupListForMakeRoom').html('');
$('#groupPathAreaForMakeRoom').html('');
$('#parentGroupBtnForAddUser').off();
$('#rootGroupBtnForAddUser').off();
$('#childGroupListAreaForAddUser').html('');
$('#userInGroupListForAddUser').html('');
$('#groupPathAreaForAddUser').html('');
//DBからグループ情報を取得。
var result = CHAT_DB.getGroupInfoForAddUser(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== 'undefined') {
$('#parentGroupBtnForMakeRoom').on('click', function() {
$('#parentGroupBtnForAddUser').on('click', function() {
CHAT_UI.refreshAllGroupForAddUser(result.parentGroupId);
});
}
if (typeof result.rootGroupId !== 'undefined') {
if (paramGroupId == 0) { groupId = result.rootGroupId }
$('#rootGroupBtnForMakeRoom').on('click', function() {
$('#rootGroupBtnForAddUser').on('click', function() {
CHAT_UI.refreshAllGroupForAddUser(result.rootGroupId);
});
}
......@@ -2312,7 +2336,7 @@ CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) {
}
//該当グループのパースを表示。
var groupPathTemplate;
$.get({ url: "./template/template_make_room_group_path.html", async: false }
$.get({ url: "./template/template_add_user_group_path.html", async: false }
, function(text) {
groupPathTemplate = text;
});
......@@ -2325,14 +2349,14 @@ CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) {
id: groupPath.groupId
});
let obj = jQuery.parseHTML(html);
$('#groupPathAreaForMakeRoom').append(obj);
$('#groupPathAreaForAddUser').append(obj);
}
groupPathCount++;
})
//該当グループの下位グループ表示。
var groupTemplate;
$.get({ url: "./template/template_make_room_group_list.html", async: false }
$.get({ url: "./template/template_add_user_group_list.html", async: false }
, function(text) {
groupTemplate = text;
});
......@@ -2346,12 +2370,12 @@ CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) {
let obj = $(jQuery.parseHTML(html)).on('click', function() {
});
$('#childGroupListAreaForMakeRoom').append(obj);
$('#childGroupListAreaForAddUser').append(obj);
})
//該当グループの所属ユーザを表示。
var userTemplate;
$.get({ url: "./template/template_make_room_user_list.html", async: false }
$.get({ url: "./template/template_add_user_user_list.html", async: false }
, function(text) {
userTemplate = text;
});
......@@ -2368,19 +2392,21 @@ CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) {
userList: result.groupUserList
});
let obj = jQuery.parseHTML(html);
$('#userInGroupListForMakeRoom').append(obj);
$('#userInGroupListForAddUser').append(obj);
};
CHAT_UI.refreshForOnline = function() {
IS_ONLINE = 'true';
$('.craeteRoomButton').show();
$('#messageSend').removeClass('disabled');
$('#messageSend').attr('disabled', false);
$('#favoriteButton').attr('disabled', false);
$('.footer_item a').removeClass('ui-state-disabled');
$('#videoUploadButton').removeClass('ui-state-disabled');
$('#imageInputButton').removeClass('ui-state-disabled');
$('#messageSend').prop('disabled', false);
$('#messageInput').prop('disabled', false);
$('#messageInput').prop('placeholder', 'メッセージを入力してください');
$('#favoriteButton').prop('disabled', false);
$('#roomMenu').show();
$('.attach_file').show();
$('.fa-download').show();
$('.chat_room_footer').show();
if (typeof $('#roomTitle').val() != 'undefined') {
CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function() {
......@@ -2391,13 +2417,15 @@ CHAT_UI.refreshForOnline = function() {
CHAT_UI.refreshForOffline = function() {
IS_ONLINE = 'false';
$('.craeteRoomButton').hide();
$('#messageSend').addClass('disabled');
$('#messageSend').attr('disabled', true);
$('#favoriteButton').attr('disabled', true);
$('.footer_item a').addClass('ui-state-disabled');
$('#videoUploadButton').addClass('ui-state-disabled');
$('#imageInputButton').addClass('ui-state-disabled');
$('#messageSend').prop('disabled', true);
$('#messageInput').prop('disabled', true);
$('#messageInput').prop('placeholder', 'ネットワークに接続できません');
$('#favoriteButton').prop('disabled', true);
$('#roomMenu').hide();
$('.attach_file').hide();
$('.fa-download').hide();
$('.chat_room_footer').hide();
}
CHAT_UI.displayExistRoom = function(roomId) {
......
......@@ -104,7 +104,6 @@ function msToTime(s) {
function updateDuration() {
var now = new Date();
$('.collaboration_duration').each(function(index, item) {
console.log(now);
var insertDateString = $(item).data('insertdate');
insertDateString = insertDateString.toString();
var year = insertDateString.substring(0,4);
......@@ -114,7 +113,6 @@ function updateDuration() {
var min = insertDateString.substring(10,12);
var sec = insertDateString.substring(12,14);
var insertDate = new Date(year, month-1 , day, hour, min, sec);
console.log(insertDate);
$(item).html(msToTime(now - insertDate));
});
}
......
......@@ -263,14 +263,6 @@ CHAT.leaveRoom = function() {
}
$(function() {
// ルーム人数選択確認イベント
$('.make_room_btn button').click(function(){
$('form').submit();
});
// ルーム人数選択イベント
$('.make_room_confirm_btn button').click(function(){
$('form').submit();
});
// ユーザー追加確認イベント
$('.add_user_confirm_btn button').click(function(){
$('form').submit();
......@@ -383,8 +375,9 @@ $(function() {
room.message = getLocalizedString("noMessages")
}
var displayMsg;
if (room.messageType == messageType.TEXT || room.messageType == messageType.TEXT) displayMsg = room.message;
if (room.messageType == messageType.IMAGE || room.messageType == messageType.SYSTEM) displayMsg = getLocalizedString("image");
if (room.messageType == messageType.TEXT || room.messageType == messageType.SYSTEM) displayMsg = room.message;
if (room.messageType == messageType.IMAGE) displayMsg = getLocalizedString("image");
if (room.messageType == messageType.VIDEO) displayMsg = getLocalizedString("video");
var attendUserName = [];
room.attendUsers.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
......@@ -429,6 +422,7 @@ $(function() {
var beforeHeight;
var beforeScroll;
window.addEventListener("resize", function() {
console.log('aaaa');
var afterHeight = window.innerHeight;
if (beforeHeight > afterHeight) {
//キーボード表示時
......
......@@ -47,18 +47,23 @@ $(function() {
});
$('.message_input_form').on('focus',function(e){
$('.message_input_send').removeClass('none');
$('.attach_file').addClass('none');
$('.footer_content_b').addClass('none');
setTimeout(function() {
$('.message_input_send').removeClass('none');
$('.attach_file').addClass('none');
$('.footer_content_b').addClass('none');
}, 10);
});
$('.message_input_form').on('focusout',function(e){
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');
}
$('.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);
});
});
......@@ -88,5 +88,7 @@ $.lang.en = {
"thursday":"thursday",
"friday":"friday",
"saturday":"saturday",
"sunday":"sunday"
"sunday":"sunday",
"collaboration_start":"collaboration start",
"collaboration_end":"collaboration end"
}
......@@ -88,5 +88,7 @@ $.lang.ja = {
"thursday":"木曜日",
"friday":"金曜日",
"saturday":"土曜日",
"sunday":"日曜日"
"sunday":"日曜日",
"collaboration_start":"協業中",
"collaboration_end":"協業終了"
}
......@@ -88,5 +88,7 @@ $.lang.ko = {
"thursday":"목요일",
"friday":"금요일",
"saturday":"토요일",
"sunday":"일요일"
"sunday":"일요일",
"collaboration_start":"협업중",
"collaboration_end":"협업종료"
}
<li class="d-flex align-items-center">
<a href="#" class="w-100" onclick="CHAT_UI.refreshAllGroupForAddUser({{id}});">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
<img src="icon/icon_folder.png" alt="フォルダ" />
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{name}}</span>
</div>
</div>
</div>
</div>
</a>
</li>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="CHAT_UI.refreshAllGroupForAddUser({{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>
<ul class="p-0 chat_make_room_list">
{{#groupUserList}}
<li class="d-flex align-items-center">
<div class="chat_item d-flex flex-row align-items-center w-100" onclick="CHAT_UI.checkForMakeChat({{shopMemberId}});" >
<div class="chat_item_l_chk">
<div class="checkbox">
<label>
<input type="checkbox" id="checkbox{{shopMemberId}}" name="checkbox[]" class="checkbox-input checkbox{{shopMemberId}}" onclick="CHAT_UI.checkForMakeChat({{shopMemberId}});" {{checked}}>
<span class="checkbox-parts"></span>
</label>
</div>
</div>
<div class="chat_item_l">
<div class="thumbnail">
<div class="img_wrap"><img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/></div>
</div>
</div>
<div class="chat_item_m">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{shopMemberName}}</span>
</div>
</div>
</div>
</div>
</li>
{{/groupUserList}}
</ul>
\ No newline at end of file
<li class="d-flex align-items-center">
<li class="d-flex align-items-center" style="border-bottom: 1px solid #e2e8f0;">
<a href="#" class="w-100" onclick="CHAT_UI.refreshAllGroupSearch({{id}});">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
......
......@@ -4,7 +4,12 @@
<div class="date d-flex flex-column"><span></span><span>{{createdAtTime}}</span></div>
{{/isToday}}
{{^isToday}}
{{#isOtherYear}}
<div class="date d-flex flex-column"><span>{{createdAtYear}} {{createdAtDay}}</span><span>{{createdAtTime}}</span></div>
{{/isOtherYear}}
{{^isOtherYear}}
<div class="date d-flex flex-column"><span>{{createdAtDay}}</span><span>{{createdAtTime}}</span></div>
{{/isOtherYear}}
{{/isToday}}
{{#unreadCount}}
<div class="unread d-flex align-items-end"><span>{{unreadCount}}</span></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%;">
......
......@@ -12,7 +12,12 @@
<div class="date d-flex flex-column"><span></span><span>{{createdAtTime}}</span></div>
{{/isToday}}
{{^isToday}}
{{#isOtherYear}}
<div class="date d-flex flex-column"><span>{{createdAtYear}} {{createdAtDay}}</span><span>{{createdAtTime}}</span></div>
{{/isOtherYear}}
{{^isOtherYear}}
<div class="date d-flex flex-column"><span>{{createdAtDay}}</span><span>{{createdAtTime}}</span></div>
{{/isOtherYear}}
{{/isToday}}
{{#unreadCount}}
<div class="unread d-flex align-items-end"><span>{{unreadCount}}</span></div>
......
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