Commit e4851d0a by Kang Donghun

Merge branch 'features/release_sp3_collaboration_picture' into…

Merge branch 'features/release_sp3_collaboration_picture' into features/release_sp3_collaboration_audio
parents 94af5a3a 9a9ef3f9
......@@ -196,7 +196,6 @@
IS_MOBILE = isMobile;
IS_ONLINE = isOnline;
CHAT_UI.loadMessages(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.roomName);
};
</script>
</body>
......
......@@ -12,6 +12,9 @@ body {
a:hover {
text-decoration: none;
}
a:link {
color: black;
}
.none {
display: none !important;
}
......
......@@ -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();
}
......@@ -1091,7 +1093,10 @@ CHAT_UI.refreshRoomList = function(roomType) {
if (room.messageType == messageType.TEXT || room.messageType == messageType.TEXT) displayMsg = room.message;
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);
......@@ -1100,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,
......@@ -1107,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
});
......@@ -1291,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;
}
})
......
......@@ -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));
});
}
......
......@@ -422,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">
<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">
......
<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%;">
......
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