Commit ae9826da by Kim Peace

Merge branch 'bug/#43933_collaboration_invited_exit' into debug/console_logs

# Conflicts:
#	public_new/js/sockets/chat-websocket-message.js
parents 0f9aa6c2 f1f47181
...@@ -13,20 +13,36 @@ CHAT_SOCKET.bindOnNewMessage = function () { ...@@ -13,20 +13,36 @@ CHAT_SOCKET.bindOnNewMessage = function () {
CHAT_SOCKET.handleMessage(message, roomName, SOCKET_KEY.NEW_MESSAGE); CHAT_SOCKET.handleMessage(message, roomName, SOCKET_KEY.NEW_MESSAGE);
}); });
socket.on(SOCKET_KEY.NEW_COMMUNICATION, function (message, roomID, roomName) { socket.on(
console.log( SOCKET_KEY.NEW_COMMUNICATION,
"peacekim:: on SOCKET_KEY.NEW_COMMUNICATION message: " + function (message, roomID, roomName, collaborationType, meetingID) {
message + console.log(
", roomID: " + "peacekim:: on SOCKET_KEY.NEW_COMMUNICATION message: " +
roomID + message +
", roomName: " + ", roomID: " +
roomName roomID +
); ", roomName: " +
CHAT_SOCKET.handleMessage(message, roomName, SOCKET_KEY.NEW_COMMUNICATION); roomName
}); );
CHAT_SOCKET.handleMessage(
message,
roomName,
SOCKET_KEY.NEW_COMMUNICATION,
collaborationType,
meetingID
);
}
);
}; };
CHAT_SOCKET.handleMessage = function (message, roomName, socketKey) { CHAT_SOCKET.handleMessage = function (
message,
roomName,
socketKey,
collaborationType = null,
meetingID = null
) {
const systemMessageTemplate = getTemplate(TemplateURL.SYSTEM_MESSAGE); const systemMessageTemplate = getTemplate(TemplateURL.SYSTEM_MESSAGE);
const unwrappedMessageInfo = CHAT_SOCKET.decodeMessage(message.text); const unwrappedMessageInfo = CHAT_SOCKET.decodeMessage(message.text);
...@@ -52,7 +68,9 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey) { ...@@ -52,7 +68,9 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey) {
message.userId, message.userId,
roomName, roomName,
message.insertDate, message.insertDate,
message.createdAt message.createdAt,
collaborationType,
meetingID
); );
} else { } else {
CHAT_SOCKET.addTextMessage(messageText, message, socket.id); CHAT_SOCKET.addTextMessage(messageText, message, socket.id);
...@@ -81,7 +99,9 @@ CHAT_SOCKET.addCollaborationMessage = function ( ...@@ -81,7 +99,9 @@ CHAT_SOCKET.addCollaborationMessage = function (
userID, userID,
roomName, roomName,
insertDate, insertDate,
createdAt createdAt,
collaborationTypeInfo,
meetingIDInfo
) { ) {
console.log( console.log(
"peacekim:: CHAT_SOCKET.addCollaborationMessage messageInfo: " + "peacekim:: CHAT_SOCKET.addCollaborationMessage messageInfo: " +
...@@ -95,8 +115,8 @@ CHAT_SOCKET.addCollaborationMessage = function ( ...@@ -95,8 +115,8 @@ CHAT_SOCKET.addCollaborationMessage = function (
", createdAt: " + ", createdAt: " +
createdAt createdAt
); );
const collaborationType = CHAT_UTIL.getCollaborationType(messageInfo[2]); const collaborationType = collaborationTypeInfo;
const meetingID = CHAT_SOCKET.getMeetingID(collaborationType, messageInfo); const meetingID = meetingIDInfo;
const userInCollaboration = JSON.parse( const userInCollaboration = JSON.parse(
NativeBridgeDataSource.getUserInfoList(userID) NativeBridgeDataSource.getUserInfoList(userID)
); );
......
...@@ -377,3 +377,9 @@ ChatAddUser.appendUserInGroup = function (groupUserList) { ...@@ -377,3 +377,9 @@ ChatAddUser.appendUserInGroup = function (groupUserList) {
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$("#userInGroupListForAddUser").append(obj); $("#userInGroupListForAddUser").append(obj);
}; };
ChatAddUser.toggleCategory = function (category) {
console.log("peacekim:: ChatAddUser.toggleCategory");
$(category).toggleClass("open");
$(category).next().slideToggle();
};
\ No newline at end of file
...@@ -380,3 +380,9 @@ Contact.appendUsersInGroup = function (userList) { ...@@ -380,3 +380,9 @@ Contact.appendUsersInGroup = function (userList) {
const obj = jQuery.parseHTML(html); const obj = jQuery.parseHTML(html);
$("#userInGroupList").append(obj); $("#userInGroupList").append(obj);
}; };
Contact.toggleCategory = function (category) {
console.log("peacekim:: Contact.toggleCategory");
$(category).toggleClass("open");
$(category).next().slideToggle();
};
\ No newline at end of file
<div class="category" onclick="CollaborationUI.toggleCategory(this);"> <div class="category" onclick="ChatAddUser.toggleCategory(this);">
<div class="category_name"><span>{{groupName}}</span></div> <div class="category_name"><span>{{groupName}}</span></div>
</div> </div>
<ul class="p-0 chat_make_room_list"> <ul class="p-0 chat_make_room_list">
......
<div class="category" onclick="CollaborationUI.toggleCategory(this);"><div class="category_name"><span>{{groupName}}</span></div></div> <div class="category" onclick="Contact.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">
{{#groupUserList}} {{#groupUserList}}
<li class="d-flex align-items-center"> <li class="d-flex align-items-center">
<a href="#" onclick="Namecard.makeNameCard({{shopMemberId}})" style="width: 100%;"> <a href="#" onclick="Namecard.makeNameCard({{shopMemberId}})" style="width: 100%;">
<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">
<div class="thumbnail"> <div class="thumbnail">
<div class="img_wrap"><img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/></div> <div class="img_wrap"><img src="{{profileUrl}}" 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">
...@@ -21,10 +23,12 @@ ...@@ -21,10 +23,12 @@
<div class="chat_item_r"> <div class="chat_item_r">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
{{#isFavorite}} {{#isFavorite}}
<span class="star active shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange({{shopMemberId}}, this)"></span> <span class="star active shopmember_{{shopMemberId}}"
onclick="Namecard.favoriteUserChange({{shopMemberId}}, this)"></span>
{{/isFavorite}} {{/isFavorite}}
{{^isFavorite}} {{^isFavorite}}
<span class="star disable shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange({{shopMemberId}}, this)"></span> <span class="star disable shopmember_{{shopMemberId}}"
onclick="Namecard.favoriteUserChange({{shopMemberId}}, this)"></span>
{{/isFavorite}} {{/isFavorite}}
</div> </div>
</div> </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