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 @@ ...@@ -196,7 +196,6 @@
IS_MOBILE = isMobile; IS_MOBILE = isMobile;
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
CHAT_UI.loadMessages(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.roomName); CHAT_UI.loadMessages(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.roomName);
}; };
</script> </script>
</body> </body>
......
...@@ -12,6 +12,9 @@ body { ...@@ -12,6 +12,9 @@ body {
a:hover { a:hover {
text-decoration: none; text-decoration: none;
} }
a:link {
color: black;
}
.none { .none {
display: none !important; display: none !important;
} }
......
...@@ -554,7 +554,7 @@ CHAT_UI.scrollToBottom = function() { ...@@ -554,7 +554,7 @@ CHAT_UI.scrollToBottom = function() {
const scrollHeight = messages.prop('scrollHeight'); const scrollHeight = messages.prop('scrollHeight');
//messages.scrollTop(scrollHeight); //messages.scrollTop(scrollHeight);
$('html, body').animate({ $('html, body').animate({
scrollTop: scrollHeight scrollTop: 9999999
}, 500); }, 500);
}; };
...@@ -881,6 +881,7 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) { ...@@ -881,6 +881,7 @@ CHAT_UI.htmlElementTextInitialize = function(languageCode) {
// FIXME 追加読み込みの場合は差分の画像のみ監視すべきだが、現状新規入室時にしか対応出来ていない。 // FIXME 追加読み込みの場合は差分の画像のみ監視すべきだが、現状新規入室時にしか対応出来ていない。
CHAT_UI.waitForLoadingImage = function(div, callback) { CHAT_UI.waitForLoadingImage = function(div, callback) {
var imgs = div.find("img"); var imgs = div.find("img");
console.log(imgs);
var count = imgs.length; var count = imgs.length;
if (count==0) if (count==0)
callback(); callback();
...@@ -888,6 +889,7 @@ CHAT_UI.waitForLoadingImage = function(div, callback) { ...@@ -888,6 +889,7 @@ CHAT_UI.waitForLoadingImage = function(div, callback) {
imgs.one( "load" , function( e ) { imgs.one( "load" , function( e ) {
// イメージが読み込まれた // イメージが読み込まれた
loaded++; loaded++;
console.log('++');
if ( loaded === count ) { if ( loaded === count ) {
callback(); callback();
} }
...@@ -1091,7 +1093,10 @@ CHAT_UI.refreshRoomList = function(roomType) { ...@@ -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.TEXT || room.messageType == messageType.TEXT) displayMsg = room.message;
if (room.messageType == messageType.IMAGE) displayMsg = getLocalizedString("image"); if (room.messageType == messageType.IMAGE) displayMsg = getLocalizedString("image");
if (room.messageType == messageType.VIDEO) displayMsg = getLocalizedString("video"); 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 = []; var attendUserName = [];
room.attendUsers.forEach(function(user) { room.attendUsers.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
attendUserName.push(user.shopMemberName); attendUserName.push(user.shopMemberName);
...@@ -1100,6 +1105,10 @@ CHAT_UI.refreshRoomList = function(roomType) { ...@@ -1100,6 +1105,10 @@ CHAT_UI.refreshRoomList = function(roomType) {
if (room.chatRoomName == "") { if (room.chatRoomName == "") {
room.chatRoomName = attendUserName.join(', '); room.chatRoomName = attendUserName.join(', ');
} }
var unreadMessageCount = room.unreadCount == 0 ? '' : room.unreadCount;
if (unreadMessageCount > 999) {
unreadMessageCount = '999+';
}
let html = Mustache.render(template, { let html = Mustache.render(template, {
thumbnailCount: thumbnailCount, thumbnailCount: thumbnailCount,
roomName: room.chatRoomName, roomName: room.chatRoomName,
...@@ -1107,7 +1116,7 @@ CHAT_UI.refreshRoomList = function(roomType) { ...@@ -1107,7 +1116,7 @@ CHAT_UI.refreshRoomList = function(roomType) {
profileImage: room.profileImagePath, profileImage: room.profileImagePath,
lastMessage: displayMsg , lastMessage: displayMsg ,
time: room.insertDate ? CHAT_UTIL.formatDate(room.insertDate).createdAt : '', time: room.insertDate ? CHAT_UTIL.formatDate(room.insertDate).createdAt : '',
unreadMsgCnt: room.unreadCount == 0 ? '' : room.unreadCount, unreadMsgCnt: unreadMessageCount,
userCnt: room.attendUsers.length + 1, userCnt: room.attendUsers.length + 1,
attendUsers: room.attendUsers attendUsers: room.attendUsers
}); });
...@@ -1291,23 +1300,27 @@ CHAT_UI.loadMessages = function(roomId, roomName) { ...@@ -1291,23 +1300,27 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
collaborationType: collaborationInfo.collaborationType, collaborationType: collaborationInfo.collaborationType,
isToday: isToday, isToday: isToday,
createdAtDay: messageTime.createdAtDay, 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, createdAtTime: messageTime.createdAtTime,
unreadCount: message.unreadCount, createdAtYear: message.insertDate.substring(0,4) + getLocalizedString('year') + ' ',
isToday: isToday isOtherYear: isOtherYear
}); });
html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html; html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html;
workVal = html + workVal; 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) { ...@@ -104,7 +104,6 @@ function msToTime(s) {
function updateDuration() { function updateDuration() {
var now = new Date(); var now = new Date();
$('.collaboration_duration').each(function(index, item) { $('.collaboration_duration').each(function(index, item) {
console.log(now);
var insertDateString = $(item).data('insertdate'); var insertDateString = $(item).data('insertdate');
insertDateString = insertDateString.toString(); insertDateString = insertDateString.toString();
var year = insertDateString.substring(0,4); var year = insertDateString.substring(0,4);
...@@ -114,7 +113,6 @@ function updateDuration() { ...@@ -114,7 +113,6 @@ function updateDuration() {
var min = insertDateString.substring(10,12); var min = insertDateString.substring(10,12);
var sec = insertDateString.substring(12,14); var sec = insertDateString.substring(12,14);
var insertDate = new Date(year, month-1 , day, hour, min, sec); var insertDate = new Date(year, month-1 , day, hour, min, sec);
console.log(insertDate);
$(item).html(msToTime(now - insertDate)); $(item).html(msToTime(now - insertDate));
}); });
} }
......
...@@ -422,6 +422,7 @@ $(function() { ...@@ -422,6 +422,7 @@ $(function() {
var beforeHeight; var beforeHeight;
var beforeScroll; var beforeScroll;
window.addEventListener("resize", function() { window.addEventListener("resize", function() {
console.log('aaaa');
var afterHeight = window.innerHeight; var afterHeight = window.innerHeight;
if (beforeHeight > afterHeight) { if (beforeHeight > afterHeight) {
//キーボード表示時 //キーボード表示時
......
...@@ -47,18 +47,23 @@ $(function() { ...@@ -47,18 +47,23 @@ $(function() {
}); });
$('.message_input_form').on('focus',function(e){ $('.message_input_form').on('focus',function(e){
$('.message_input_send').removeClass('none'); setTimeout(function() {
$('.attach_file').addClass('none'); $('.message_input_send').removeClass('none');
$('.footer_content_b').addClass('none'); $('.attach_file').addClass('none');
$('.footer_content_b').addClass('none');
}, 10);
}); });
$('.message_input_form').on('focusout',function(e){ $('.message_input_form').on('focusout',function(e){
if($(e.relatedTarget).hasClass('message_input_send')){ setTimeout(function() {
CHAT_UI.sendMessage(); if($(e.relatedTarget).hasClass('message_input_send')){
} else { CHAT_UI.sendMessage();
$('.message_input_send').addClass('none'); } else {
$('.attach_file').removeClass('none'); $('.message_input_send').addClass('none');
$('.footer_content_b').removeClass('none'); $('.attach_file').removeClass('none');
} $('.footer_content_b').removeClass('none');
}
}, 10);
}); });
}); });
...@@ -88,5 +88,7 @@ $.lang.en = { ...@@ -88,5 +88,7 @@ $.lang.en = {
"thursday":"thursday", "thursday":"thursday",
"friday":"friday", "friday":"friday",
"saturday":"saturday", "saturday":"saturday",
"sunday":"sunday" "sunday":"sunday",
"collaboration_start":"collaboration start",
"collaboration_end":"collaboration end"
} }
...@@ -88,5 +88,7 @@ $.lang.ja = { ...@@ -88,5 +88,7 @@ $.lang.ja = {
"thursday":"木曜日", "thursday":"木曜日",
"friday":"金曜日", "friday":"金曜日",
"saturday":"土曜日", "saturday":"土曜日",
"sunday":"日曜日" "sunday":"日曜日",
"collaboration_start":"協業中",
"collaboration_end":"協業終了"
} }
...@@ -88,5 +88,7 @@ $.lang.ko = { ...@@ -88,5 +88,7 @@ $.lang.ko = {
"thursday":"목요일", "thursday":"목요일",
"friday":"금요일", "friday":"금요일",
"saturday":"토요일", "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}});"> <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 d-flex flex-row align-items-center">
<div class="chat_item_l"> <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}} {{#userList}}
<li class="d-flex align-items-center"> <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="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