Commit 86d7f716 by Kim Eunchul

Merge remote-tracking branch 'origin/develop' into squash/socket_kim-ec

# Conflicts:
#	public_new/js/sockets/chat-websocket-message.js
parents 2f805a11 f598d8fc
...@@ -73,6 +73,9 @@ input[name="tab_item"] { ...@@ -73,6 +73,9 @@ input[name="tab_item"] {
width: 90px; width: 90px;
max-height: 60px; max-height: 60px;
} }
#addUserFormInCollaboration .chat_list li {
border-bottom: 1px solid #e2e8f0;
}
.chat_list ul li { .chat_list ul li {
list-style: none; list-style: none;
border-bottom: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0;
......
...@@ -159,6 +159,7 @@ Common.startCollaboration = function (collaborationType) { ...@@ -159,6 +159,7 @@ Common.startCollaboration = function (collaborationType) {
deviceInfo.androidVersion < ANDROID_SDK_VERSION.O deviceInfo.androidVersion < ANDROID_SDK_VERSION.O
) { ) {
alert(getLocalizedString("not_support_version")); alert(getLocalizedString("not_support_version"));
Common.dismissLoadingIndicator();
return; return;
} }
} }
...@@ -168,9 +169,10 @@ Common.startCollaboration = function (collaborationType) { ...@@ -168,9 +169,10 @@ Common.startCollaboration = function (collaborationType) {
Common.dismissLoadingIndicator(); Common.dismissLoadingIndicator();
return; return;
} }
const sendData = DATA_MESSAGE_SCHEME + FINISH_ALL_COLLABORATION_SIGNAL;
CHAT_SOCKET.emitCreateMessage(SOCKET_KEY.CREATE_MESSAGE, sendData);
NativeBridgeDelegate.finishAllCollaboration();
} }
CHAT_SOCKET.emitCollaborationFinishMessage();
NativeBridgeDelegate.finishAllCollaboration();
NativeBridgeDelegate.startCollaboration(collaborationType); NativeBridgeDelegate.startCollaboration(collaborationType);
Common.dismissLoadingIndicator();
}; };
...@@ -135,7 +135,7 @@ NativeBridgeDelegate.saveSelectedUserList = function (selectedUserList) { ...@@ -135,7 +135,7 @@ NativeBridgeDelegate.saveSelectedUserList = function (selectedUserList) {
NativeBridgeDelegate.startPIPMode = function () { NativeBridgeDelegate.startPIPMode = function () {
if (typeof android != "undefined") { if (typeof android != "undefined") {
android.startPipMode(); android.startPIPMode();
} else if (deviceInfo.isiOS()) { } else if (deviceInfo.isiOS()) {
webkit.messageHandlers.startPipMode.postMessage({}); webkit.messageHandlers.startPipMode.postMessage({});
} }
...@@ -366,7 +366,11 @@ NativeBridgeDelegate.changeCollaboration = function ( ...@@ -366,7 +366,11 @@ NativeBridgeDelegate.changeCollaboration = function (
NativeBridgeDelegate.showLoadingIndicator = function () { NativeBridgeDelegate.showLoadingIndicator = function () {
if (deviceInfo.isiOS()) { if (deviceInfo.isiOS()) {
try {
webkit.messageHandlers.showLoadingIndicator.postMessage({}); webkit.messageHandlers.showLoadingIndicator.postMessage({});
} catch (e) {
console.error("failed to display loading indicator with error: " + e);
}
} else if (deviceInfo.isAndroid()) { } else if (deviceInfo.isAndroid()) {
android.showLoadingIndicator(); android.showLoadingIndicator();
} }
......
...@@ -19,6 +19,10 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, roomID = nul ...@@ -19,6 +19,10 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, roomID = nul
DATA_MESSAGE_SCHEME + FINISH_ALL_COLLABORATION_SIGNAL DATA_MESSAGE_SCHEME + FINISH_ALL_COLLABORATION_SIGNAL
) { ) {
CHAT_SOCKET.cleanUpCollaborationMessage(); CHAT_SOCKET.cleanUpCollaborationMessage();
if (typeof CoviewBridge !== "undefined") {
CoviewBridge.finishCollaboration();
}
return; return;
} }
...@@ -26,9 +30,7 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, roomID = nul ...@@ -26,9 +30,7 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, roomID = nul
const messageType = socketKey; const messageType = socketKey;
const messageText = unwrappedMessageInfo; const messageText = unwrappedMessageInfo;
if ( if (messageType == SOCKET_KEY.NEW_COMMUNICATION) {
messageType == SOCKET_KEY.NEW_COMMUNICATION
) {
CHAT_SOCKET.addCollaborationMessage( CHAT_SOCKET.addCollaborationMessage(
messageInfo, messageInfo,
message.userId, message.userId,
...@@ -50,7 +52,7 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, roomID = nul ...@@ -50,7 +52,7 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, roomID = nul
} else { } else {
Common.dismissLoadingIndicator(); Common.dismissLoadingIndicator();
} }
} };
CHAT_SOCKET.decodeMessage = function (text) { CHAT_SOCKET.decodeMessage = function (text) {
try { try {
...@@ -126,6 +128,7 @@ CHAT_SOCKET.renderCollaborationMessage = function ( ...@@ -126,6 +128,7 @@ CHAT_SOCKET.renderCollaborationMessage = function (
createdAtDay: messageTime.createdAtDay, createdAtDay: messageTime.createdAtDay,
createdAtTime: messageTime.createdAtTime, createdAtTime: messageTime.createdAtTime,
isOtherYear: false, isOtherYear: false,
collaborationJoinMessage: getLocalizedString("message_join"),
}); });
}; };
...@@ -187,8 +190,11 @@ CHAT_SOCKET.getUserInfoList = function (userID) { ...@@ -187,8 +190,11 @@ CHAT_SOCKET.getUserInfoList = function (userID) {
return JSON.parse(NativeBridgeDataSource.getUserInfoList(userID)); return JSON.parse(NativeBridgeDataSource.getUserInfoList(userID));
}; };
CHAT_SOCKET.cleanUpCollaborationMessage = function () { CHAT_SOCKET.cleanUpCollaborationMessage = function (exceptFirst = false) {
$(".collabo_area.start").each(function (index, collaborationMessage) { $(".collabo_area.start").each(function (index, collaborationMessage) {
if (exceptFirst && index === 0) {
return;
}
$(collaborationMessage).removeClass("start"); $(collaborationMessage).removeClass("start");
$(collaborationMessage).addClass("end"); $(collaborationMessage).addClass("end");
$(collaborationMessage).addClass("disable"); $(collaborationMessage).addClass("disable");
...@@ -197,7 +203,7 @@ CHAT_SOCKET.cleanUpCollaborationMessage = function () { ...@@ -197,7 +203,7 @@ CHAT_SOCKET.cleanUpCollaborationMessage = function () {
.attr("disabled", "disabled"); .attr("disabled", "disabled");
$(collaborationMessage) $(collaborationMessage)
.find(".collaboration_join_message") .find(".collaboration_join_message")
.text(getLocalizedString("flex-directionmessage_ended")); .text(getLocalizedString("message_ended"));
}); });
}; };
......
...@@ -189,9 +189,9 @@ var bindOnRefreshUserListInGroup = function () { ...@@ -189,9 +189,9 @@ var bindOnRefreshUserListInGroup = function () {
}; };
var nextFibonacci = function (num) { var nextFibonacci = function (num) {
let nextNum = num * (1 + Math.sqrt(5)) / 2.0; let nextNum = (num * (1 + Math.sqrt(5))) / 2.0;
return Math.round(nextNum); return Math.round(nextNum);
} };
CHAT_SOCKET.emitCreateMessage = function (socketKey, sendData) { CHAT_SOCKET.emitCreateMessage = function (socketKey, sendData) {
if (socket.connected == false) { if (socket.connected == false) {
...@@ -213,30 +213,56 @@ CHAT_SOCKET.emitCreateVideo = function (sendData) { ...@@ -213,30 +213,56 @@ CHAT_SOCKET.emitCreateVideo = function (sendData) {
CHAT_SOCKET.emitCreateMessage(SOCKET_KEY.CREATE_VIDEO, sendData); CHAT_SOCKET.emitCreateMessage(SOCKET_KEY.CREATE_VIDEO, sendData);
}; };
CHAT_SOCKET.emitCreateCommunicationStart = function (sendData, collaborationType, meetingID) { CHAT_SOCKET.emitCreateCommunicationStart = function (
sendData,
collaborationType,
meetingID
) {
if (socket.connected == false) { if (socket.connected == false) {
CHAT_SOCKET.reconnectCreateMessage(SOCKET_KEY.COMMUNICATION, sendData, collaborationType, meetingID); CHAT_SOCKET.reconnectCreateMessage(
SOCKET_KEY.COMMUNICATION,
sendData,
collaborationType,
meetingID
);
} else { } else {
socket.emit(SOCKET_KEY.COMMUNICATION, { text: sendData }, collaborationType, meetingID); socket.emit(
SOCKET_KEY.COMMUNICATION,
{ text: sendData },
collaborationType,
meetingID
);
} }
}; };
CHAT_SOCKET.reconnectCreateMessage = function (socketKey, sendData, timeout = 100, collaborationType = null, meetingID = null) { CHAT_SOCKET.reconnectCreateMessage = function (
socketKey,
sendData,
timeout = 100,
collaborationType = null,
meetingID = null
) {
if (socket.connected == false) { if (socket.connected == false) {
console.log("socket disconnected, reconnect... " + timeout) console.info("socket disconnected, reconnect... " + timeout);
CHAT_SOCKET.initialJoin(); CHAT_SOCKET.initialJoin();
setTimeout(function() { setTimeout(function () {
CHAT_SOCKET.reconnectCreateMessage(socketKey, sendData, nextFibonacci(timeout)); CHAT_SOCKET.reconnectCreateMessage(
socketKey,
sendData,
nextFibonacci(timeout)
);
}, timeout); }, timeout);
} else { return;
console.log("reconnected") }
console.info("socket reconnected");
if (collaborationType == null) { if (collaborationType == null) {
socket.emit(socketKey, { text: sendData }); socket.emit(socketKey, { text: sendData });
} else { } else {
socket.emit(socketKey, { text: sendData }, collaborationType, meetingID); socket.emit(socketKey, { text: sendData }, collaborationType, meetingID);
} }
} };
}
CHAT_SOCKET.emitCollaborationFinishMessage = function () { CHAT_SOCKET.emitCollaborationFinishMessage = function () {
if (socket != null && socket.connected) { if (socket != null && socket.connected) {
......
...@@ -23,7 +23,7 @@ ArchiveUI.refreshSearchScreen = function (keyword) { ...@@ -23,7 +23,7 @@ ArchiveUI.refreshSearchScreen = function (keyword) {
); );
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$(".overlay_src_msg").append(obj); $(".overlay_src_msg").prepend(obj);
}); });
}); });
}; };
...@@ -340,7 +340,7 @@ ArchiveUI.refreshArchiveScreen = function () { ...@@ -340,7 +340,7 @@ ArchiveUI.refreshArchiveScreen = function () {
typeImage: typeImage, typeImage: typeImage,
}); });
const obj = $(jQuery.parseHTML(html)).on("click", function () {}); const obj = $(jQuery.parseHTML(html)).on("click", function () {});
$("#archiveList").append(obj); $("#archiveList").prepend(obj);
}); });
// loadingIndicatorを非表示 // loadingIndicatorを非表示
......
...@@ -98,6 +98,8 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) { ...@@ -98,6 +98,8 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
let messages = NativeBridgeDataSource.getMessagesByRoomID(roomID); let messages = NativeBridgeDataSource.getMessagesByRoomID(roomID);
ChatRoom.prependMessage(messages, roomID); ChatRoom.prependMessage(messages, roomID);
CHAT_SOCKET.cleanUpCollaborationMessage(true);
window.addEventListener( window.addEventListener(
"load", "load",
function (event) { function (event) {
...@@ -282,7 +284,7 @@ ChatRoom.renderCollaborationMessage = function (message, isToday, isOtherYear) { ...@@ -282,7 +284,7 @@ ChatRoom.renderCollaborationMessage = function (message, isToday, isOtherYear) {
}; };
ChatRoom.getMeetingID = function (meetingID) { ChatRoom.getMeetingID = function (meetingID) {
return typeof meetingID != "undefined" ? 0 : meetingID; return typeof meetingID == "undefined" ? 0 : meetingID;
}; };
ChatRoom.getDisplayUserList = function (userList) { ChatRoom.getDisplayUserList = function (userList) {
......
...@@ -10,32 +10,45 @@ window.onscroll = function () { ...@@ -10,32 +10,45 @@ window.onscroll = function () {
return; return;
} }
beforeScroll = window.scrollY; beforeScroll = window.scrollY;
ChatRoom.prependMessageWhenScrollIfNeeded();
};
ChatRoom.prependMessageWhenScrollIfNeeded = function () {
const beforeHeight = $(".room_container").height(); const beforeHeight = $(".room_container").height();
messageCount = $(".chat_message").length; messageCount = $(".chat_message").length;
// TODO: peacekim :: check this condition
if ($(this).scrollTop() === 0 && messageCount >= PagingSize.MESSAGE) { if ($(this).scrollTop() === 0 && messageCount >= PagingSize.MESSAGE) {
setTimeout(function () { setTimeout(() => {
if (!$("#chatLoader").is(":visible")) { if (!$("#chatLoader").is(":visible")) {
// display loading indicator in chat message // display loading indicator in chat message
let loader = $( let loader = $(
'<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>' '<div id="chatLoader" class="text-center"><div class="spinner-grow spinner-grow-sm" role="status" /></div>'
); );
$("#messages").append(loader); $("#messages").append(loader);
// get lastest message id and update message from server via native }
const messageID = $($(".chat_message").last()).data("messageid"); ChatRoom.loadNewMessage().then((messages) => {
NativeBridgeDelegate.updatePreMessage(messageID);
let messages = NativeBridgeDataSource.getMessagesByMessageID(messageID);
// prepend message // prepend message
ChatRoom.prependMessage(messages); ChatRoom.prependMessage(messages);
// hide loading indicator // hide loading indicator
if (typeof loader !== "undefined") {
loader.remove(); loader.remove();
var afterHeight = $(".room_container").height();
window.scroll(0, afterHeight - beforeHeight);
} }
const afterHeight = $(".room_container").height();
window.scroll(0, afterHeight - beforeHeight);
});
}, 0); }, 0);
} }
}; };
ChatRoom.loadNewMessage = async function () {
return new Promise(function (done) {
// get lastest message id and update message from server via native
const messageID = $($(".chat_message").last()).data("messageid");
NativeBridgeDelegate.updatePreMessage(messageID);
let messages = NativeBridgeDataSource.getMessagesByMessageID(messageID);
done(messages);
});
};
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
// 検索イベントバインディング // 検索イベントバインディング
ChatRoom.bindSearchUI(); ChatRoom.bindSearchUI();
......
CollaborationUI.initialBindAddUserButton = function () { CollaborationUI.initialBindAddUserButton = function () {
// ユーザー招待メンバー検索 // ユーザー招待メンバー検索
$(".add_user_btn").click(function () { $(".add_user_btn").click(function () {
CollaborationUI.bindEnableScroll(); CollaborationUI.enableScroll();
Common.showLoadingIndicator(); Common.showLoadingIndicator();
ChatManagementCommon.selectedUserList = []; ChatManagementCommon.selectedUserList = [];
CollaborationUI.refreshMyGroupForAddUserInCollaboration(); CollaborationUI.refreshMyGroupForAddUserInCollaboration();
...@@ -9,6 +9,11 @@ CollaborationUI.initialBindAddUserButton = function () { ...@@ -9,6 +9,11 @@ CollaborationUI.initialBindAddUserButton = function () {
.off() .off()
.on("click", function () { .on("click", function () {
$("#addUserInCollaboration").modal("hide"); $("#addUserInCollaboration").modal("hide");
if (ChatManagementCommon.selectedUserList.length == 0) {
return;
}
const selectedUserList = const selectedUserList =
ChatManagementCommon.selectedUserList.join(","); ChatManagementCommon.selectedUserList.join(",");
NativeBridgeDelegate.saveSelectedUserList(selectedUserList); NativeBridgeDelegate.saveSelectedUserList(selectedUserList);
...@@ -149,7 +154,7 @@ CollaborationUI.refreshAllGroupForAddUserInCollaboration = function (groupID) { ...@@ -149,7 +154,7 @@ CollaborationUI.refreshAllGroupForAddUserInCollaboration = function (groupID) {
CollaborationUI.appendChildGroups(result.childGroupList); CollaborationUI.appendChildGroups(result.childGroupList);
//該当グループの所属ユーザを表示。 //該当グループの所属ユーザを表示。
CollaborationUI.appendUsers(); CollaborationUI.appendUsers(result.groupUserList);
}; };
CollaborationUI.bindOnClickParentGroup = function (parentGroupID) { CollaborationUI.bindOnClickParentGroup = function (parentGroupID) {
...@@ -168,7 +173,7 @@ CollaborationUI.displayRootGroupAndParentGroupIfNeeded = function ( ...@@ -168,7 +173,7 @@ CollaborationUI.displayRootGroupAndParentGroupIfNeeded = function (
rootGroupID, rootGroupID,
groupID groupID
) { ) {
if (typeof rootGroupID !== "undefined" && paramGroupID == 0) { if (typeof rootGroupID !== "undefined" && rootGroupID == 0) {
groupID = rootGroupID; groupID = rootGroupID;
} }
...@@ -296,7 +301,7 @@ CollaborationUI.bindAddUserButton = function (selectedUsers) { ...@@ -296,7 +301,7 @@ CollaborationUI.bindAddUserButton = function (selectedUsers) {
let userIDList = selectedUsers.map((user) => user.shopMemberId); let userIDList = selectedUsers.map((user) => user.shopMemberId);
const commaJoinedUserIDList = userIDList.join(","); const commaJoinedUserIDList = userIDList.join(",");
const collaborationType = globalUserInfo.collaborationType; const collaborationType = globalUserInfo.collaborationType;
scrollTo(0,0);
NativeBridgeDelegate.inviteCollaboration( NativeBridgeDelegate.inviteCollaboration(
commaJoinedUserIDList, commaJoinedUserIDList,
collaborationType collaborationType
......
var CollaborationUI = {}; var CollaborationUI = {};
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
CollaborationUI.bindDisableScroll(); CollaborationUI.disableScroll();
// メニューオーバーレイ表示 // メニューオーバーレイ表示
CollaborationUI.bindMenuButton(); CollaborationUI.bindMenuButton();
...@@ -12,14 +12,16 @@ document.addEventListener("DOMContentLoaded", function () { ...@@ -12,14 +12,16 @@ document.addEventListener("DOMContentLoaded", function () {
// モーダルonモーダル(前のモーダルを非表示に) // モーダルonモーダル(前のモーダルを非表示に)
// ホスト変更ボタン押下イベント // ホスト変更ボタン押下イベント
CollaborationUI.bindChangeHostButton(); CollaborationUI.bindChangeHostButton();
});
document.addEventListener("readystatechange", () => {
if (document.readyState === "complete") {
CollaborationUI.initialBindAddUserButton();
// 閉じるイベント // 閉じるイベント
CollaborationUI.bindCloseButton(); CollaborationUI.bindCloseButton();
// ユーザー追加イベント // ユーザー追加イベント
CollaborationUI.bindInviteButton(); CollaborationUI.bindInviteButton();
}
CollaborationUI.initialBindAddUserButton();
}); });
/********************************* /*********************************
...@@ -34,30 +36,31 @@ CollaborationUI.bindMenuButton = function () { ...@@ -34,30 +36,31 @@ CollaborationUI.bindMenuButton = function () {
CollaborationUI.bindDisplayUsersButton = function () { CollaborationUI.bindDisplayUsersButton = function () {
$(".user_btn").click(function () { $(".user_btn").click(function () {
var w = $(this).width(); const width = $(this).width();
$("#overlay_user_list.overlay").stop();
$(this).toggleClass("hide"); $(this).toggleClass("hide");
$("#overlay_user_list.overlay") $("#overlay_user_list.overlay")
.toggleClass("slidein") .toggleClass("slidein")
.css({ transform: "translateX(" & -w & ")" }); .animate({ left: "+=width" }, 500, function () {
scrollTo(0, 0);
});
if ($(this).hasClass("hide")) { if ($(this).hasClass("hide")) {
CollaborationUI.bindEnableScroll(); CollaborationUI.enableScroll();
} else { } else {
scrollTo(0, 0); CollaborationUI.disableScroll();
CollaborationUI.bindDisableScroll();
} }
}); });
}; };
CollaborationUI.userListSlideOut = function () { CollaborationUI.userListSlideOut = function () {
const w = $(".user_btn").width(); const userButtonWidth = $(".user_btn").width();
$(".user_btn").removeClass("hide"); $(".user_btn").removeClass("hide");
$("#overlay_user_list.overlay") $("#overlay_user_list.overlay")
.removeClass("slidein") .removeClass("slidein")
.css({ transform: "translateX(" & -w & ")" }); .css({ transform: "translateX(" & -userButtonWidth & ")" });
scrollTo(0, 0); scrollTo(0, 0);
CollaborationUI.bindDisableScroll(); CollaborationUI.disableScroll();
}; };
CollaborationUI.bindChangeHostButton = function () { CollaborationUI.bindChangeHostButton = function () {
...@@ -73,21 +76,21 @@ CollaborationUI.bindChangeHostButton = function () { ...@@ -73,21 +76,21 @@ CollaborationUI.bindChangeHostButton = function () {
CollaborationUI.bindCloseButton = function () { CollaborationUI.bindCloseButton = function () {
$(".close_btn").click(function () { $(".close_btn").click(function () {
$("#overlay_add_user_list").addClass("none"); scrollTo(0, 0);
CollaborationUI.bindDisableScroll(); CollaborationUI.disableScroll();
}); });
}; };
CollaborationUI.bindInviteButton = function () { CollaborationUI.bindInviteButton = function () {
$(".inv_btn").click(function () { $(".inv_btn").click(function () {
$("#overlay_add_user_list").addClass("none"); scrollTo(0, 0);
}); });
}; };
/********************************* /*********************************
* Scroll Controls * Scroll Controls
********************************/ ********************************/
CollaborationUI.bindDisableScroll = function () { CollaborationUI.disableScroll = function () {
document.addEventListener("mousewheel", CollaborationUI.scrollControl, { document.addEventListener("mousewheel", CollaborationUI.scrollControl, {
passive: false, passive: false,
}); });
...@@ -97,7 +100,7 @@ CollaborationUI.bindDisableScroll = function () { ...@@ -97,7 +100,7 @@ CollaborationUI.bindDisableScroll = function () {
}; };
// スクロール禁止解除 // スクロール禁止解除
CollaborationUI.bindEnableScroll = function () { CollaborationUI.enableScroll = function () {
document.removeEventListener("mousewheel", CollaborationUI.scrollControl, { document.removeEventListener("mousewheel", CollaborationUI.scrollControl, {
passive: false, passive: false,
}); });
...@@ -182,14 +185,6 @@ CollaborationUI.refreshForOffline = function () { ...@@ -182,14 +185,6 @@ CollaborationUI.refreshForOffline = function () {
} }
}; };
CollaborationUI.showLoadingIndicator = function () {
$("#loadingIndicator").addClass("full_active");
};
CollaborationUI.hideLoadingIndicator = function () {
$("#loadingIndicator").removeClass("full_active");
};
CollaborationUI.displayAddUserButtonIfNeeded = function () { CollaborationUI.displayAddUserButtonIfNeeded = function () {
if (roomInfo.roomType == ChatRoomType.DM) { if (roomInfo.roomType == ChatRoomType.DM) {
$(".add_user_btn").removeClass("none"); $(".add_user_btn").removeClass("none");
......
...@@ -45,9 +45,7 @@ FermiWebSocketBridge.hostRequestDone = function (hostID) { ...@@ -45,9 +45,7 @@ FermiWebSocketBridge.hostRequestDone = function (hostID) {
// GET_COLLABORATION_TYPE_RESPONSE // GET_COLLABORATION_TYPE_RESPONSE
FermiWebSocketBridge.getCollaborationTypeResponse = function (loginID) { FermiWebSocketBridge.getCollaborationTypeResponse = function (loginID) {
if (typeof meetingID == undefined) { let meetingID = globalUserInfo.meetingID ?? 0;
var meetingID = 0;
}
fw.sendToMsg("others", "GET_COLLABORATION_TYPE_RESPONSE", { fw.sendToMsg("others", "GET_COLLABORATION_TYPE_RESPONSE", {
loginId: loginID, loginId: loginID,
......
...@@ -28,7 +28,6 @@ CoviewBridge.bindFermiWebSocketOpenned = function () { ...@@ -28,7 +28,6 @@ CoviewBridge.bindFermiWebSocketOpenned = function () {
CoviewBridge.bindStartEvent = function () { CoviewBridge.bindStartEvent = function () {
coview_api.addEventListener("start", function () { coview_api.addEventListener("start", function () {
CollaborationFeature.enableScrollLock(); CollaborationFeature.enableScrollLock();
CollaborationUI.hideLoadingIndicator();
}); });
}; };
...@@ -84,14 +83,11 @@ CoviewBridge.bindAllByeEvent = function () { ...@@ -84,14 +83,11 @@ CoviewBridge.bindAllByeEvent = function () {
NativeBridgeDelegate.showExitHostAlert(); NativeBridgeDelegate.showExitHostAlert();
return; return;
} }
CollaborationUI.hideLoadingIndicator();
}); });
}; };
CoviewBridge.bindGuestByeEvent = function () { CoviewBridge.bindGuestByeEvent = function () {
coview_api.addEventListener("guestbye", function () { coview_api.addEventListener("guestbye", function () {});
CollaborationUI.hideLoadingIndicator();
});
}; };
CoviewBridge.bindDestroyEvent = function () { CoviewBridge.bindDestroyEvent = function () {
...@@ -99,7 +95,6 @@ CoviewBridge.bindDestroyEvent = function () { ...@@ -99,7 +95,6 @@ CoviewBridge.bindDestroyEvent = function () {
CHAT_SOCKET.emitCollaborationFinishMessage(); CHAT_SOCKET.emitCollaborationFinishMessage();
alert(getLocalizedString("inform_exit_host_collaboration")); alert(getLocalizedString("inform_exit_host_collaboration"));
CoviewBridge.exitCollaboration(); CoviewBridge.exitCollaboration();
CollaborationUI.hideLoadingIndicator();
}); });
}; };
...@@ -110,7 +105,7 @@ CoviewBridge.bindMessageEvent = function () { ...@@ -110,7 +105,7 @@ CoviewBridge.bindMessageEvent = function () {
} }
switch (json.api) { switch (json.api) {
case "LoginResponse": case "LoginResponse":
CollaborationFeature.didReceiveLoginResponseMessage(); await CollaborationFeature.didReceiveLoginResponseMessage();
break; break;
case "CreateRoomResponse": case "CreateRoomResponse":
if (json.resultCode == 200) { if (json.resultCode == 200) {
...@@ -211,21 +206,26 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () { ...@@ -211,21 +206,26 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () {
CollaborationFeature.didReceiveCreateRoomResponseMessage = function () { CollaborationFeature.didReceiveCreateRoomResponseMessage = function () {
let coviewInviteMessage = ""; let coviewInviteMessage = "";
let collaborationType = CHAT_UTIL.getCollaborationTypeNumber(globalUserInfo.collaborationType); let collaborationType = CHAT_UTIL.getCollaborationTypeNumber(
let meetingID = null globalUserInfo.collaborationType
);
let meetingID = null;
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.DOCUMENT) { if (globalUserInfo.collaborationType == COLLABORATION_TYPE.DOCUMENT) {
meetingID = globalUserInfo.meetingID; meetingID = globalUserInfo.meetingID;
} }
CHAT_SOCKET.emitCreateCommunicationStart(coviewInviteMessage, collaborationType, meetingID); CHAT_SOCKET.emitCreateCommunicationStart(
coviewInviteMessage,
collaborationType,
meetingID
);
}; };
CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () { CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
alert(getLocalizedString("not_exist_sharing_call")); alert(getLocalizedString("not_exist_sharing_call"));
coview_api.LeaveRoom(); coview_api.LeaveRoom();
$(".coview_share_area").hide(); $(".coview_share_area").hide();
CollaborationUI.hideLoadingIndicator();
NativeBridgeDelegate.joinRoom(roomInfo.roomID, roomInfo.roomName); NativeBridgeDelegate.joinRoom(roomInfo.roomID, roomInfo.roomName);
}; };
...@@ -492,7 +492,6 @@ CollaborationUI.refreshJoinedCollaboration = function (loginIDList) { ...@@ -492,7 +492,6 @@ CollaborationUI.refreshJoinedCollaboration = function (loginIDList) {
}; };
CollaborationUI.moveToVideoShareArea = function () { CollaborationUI.moveToVideoShareArea = function () {
CollaborationUI.showLoadingIndicator();
$(".coview_share_area").show(); $(".coview_share_area").show();
$("#collabo_main").removeClass("none"); $("#collabo_main").removeClass("none");
}; };
...@@ -52,7 +52,8 @@ function changeCollaboration(collaborationType) { ...@@ -52,7 +52,8 @@ function changeCollaboration(collaborationType) {
case COLLABORATION_TYPE.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
coview_api.ChangeCollaboration("audio"); coview_api.ChangeCollaboration("audio");
newMeetingID = NativeBridgeDataSource.createContentView(); newMeetingID = NativeBridgeDataSource.createContentView();
if (newMeetingID == "-1") { //会議室作成失敗 if (newMeetingID == "-1") {
//会議室作成失敗
CoviewBridge.finishCollaboration(); CoviewBridge.finishCollaboration();
return; return;
} }
......
...@@ -143,9 +143,7 @@ Contact.refreshContactScreen = function () { ...@@ -143,9 +143,7 @@ Contact.refreshContactScreen = function () {
Contact.appendMyNamecard(); Contact.appendMyNamecard();
Contact.appendFavoritGroupList(); Contact.reloadFavoriteList();
Contact.appendFavoritUsers();
Contact.appendMyGroupList(); Contact.appendMyGroupList();
...@@ -173,6 +171,12 @@ Contact.appendMyNamecard = function () { ...@@ -173,6 +171,12 @@ Contact.appendMyNamecard = function () {
$("#myImg").attr("src", myInfo.profileImagePath); $("#myImg").attr("src", myInfo.profileImagePath);
}; };
Contact.reloadFavoriteList = function () {
$("#favoriteList").html("");
Contact.appendFavoritGroupList();
Contact.appendFavoritUsers();
};
Contact.appendFavoritGroupList = function () { Contact.appendFavoritGroupList = function () {
// グループの様式を読み込む // グループの様式を読み込む
const groupTemplate = getTemplate(TemplateURL.GROUP_LIST); const groupTemplate = getTemplate(TemplateURL.GROUP_LIST);
...@@ -221,37 +225,35 @@ Contact.appendMyGroupList = function () { ...@@ -221,37 +225,35 @@ Contact.appendMyGroupList = function () {
}; };
Contact.favoriteGroupChange = function (groupID, star) { Contact.favoriteGroupChange = function (groupID, star) {
if ($(star).hasClass("active")) { const div = $(star);
Contact.removeFavoriteGroup(groupID); if (div.hasClass("sp-circle")) {
} else if ($(star).hasClass("disable")) { return;
Contact.insertFavoriteGroup(groupID); }
div.removeClass("star");
div.addClass("sp-circle");
setTimeout(() => {
if (div.hasClass("active")) {
Contact.removeFavoriteGroup(groupID, div);
} else if (div.hasClass("disable")) {
Contact.insertFavoriteGroup(groupID, div);
} }
div.removeClass("sp-circle");
div.addClass("star");
Contact.reloadFavoriteList();
}, 0);
}; };
Contact.removeFavoriteGroup = function (groupID) { Contact.removeFavoriteGroup = function (groupID, div) {
Common.showLoadingIndicator(); const result = NativeBridgeDataSource.removeFavoriteGroup(groupID);
var result = NativeBridgeDataSource.removeFavoriteGroup(groupID); div.removeClass(result ? "active" : "disable");
if (result) { div.addClass(result ? "disable" : "active");
$(".group_" + groupID).removeClass("active");
$(".group_" + groupID).addClass("disable");
} else {
$(".group_" + groupID).addClass("active");
$(".group_" + groupID).removeClass("disable");
}
Common.dismissLoadingIndicator();
}; };
Contact.insertFavoriteGroup = function (groupID) { Contact.insertFavoriteGroup = function (groupID, div) {
Common.showLoadingIndicator();
const result = NativeBridgeDataSource.addFavoriteGroup(groupID); const result = NativeBridgeDataSource.addFavoriteGroup(groupID);
if (result) { div.removeClass(result ? "disable" : "active");
$(".group_" + groupID).removeClass("disable"); div.addClass(result ? "active" : "disable");
$(".group_" + groupID).addClass("active");
} else {
$(".group_" + groupID).addClass("disable");
$(".group_" + groupID).removeClass("active");
}
Common.dismissLoadingIndicator();
}; };
//全グループ検索画面表示。 //全グループ検索画面表示。
......
...@@ -63,40 +63,44 @@ Namecard.startVoice = function (userShopMemberID, userName) { ...@@ -63,40 +63,44 @@ Namecard.startVoice = function (userShopMemberID, userName) {
}; };
Namecard.favoriteUserChange = function (shopMemberID, star) { Namecard.favoriteUserChange = function (shopMemberID, star) {
if ($(star).hasClass("active")) { const div = $(star);
Namecard.removeFavoriteUser(shopMemberID); if (div.hasClass("sp-circle")) {
} else if ($(star).hasClass("disable")) { return;
Namecard.insertFavoriteUser(shopMemberID); }
div.removeClass("star");
div.addClass("sp-circle");
setTimeout(() => {
if (div.hasClass("active")) {
Namecard.removeFavoriteUser(shopMemberID, div);
} else if (div.hasClass("disable")) {
Namecard.insertFavoriteUser(shopMemberID, div);
} }
div.removeClass("sp-circle");
div.addClass("star");
if (typeof Contact != "undefined") {
Contact.reloadFavoriteList();
}
if (div.hasClass("active")) {
window.scroll(0, window.scrollY + $(".my_info_sell").height());
} else if (div.hasClass("disable")) {
window.scroll(0, window.scrollY - $(".my_info_sell").height());
}
}, 0);
}; };
Namecard.removeFavoriteUser = function (shopMemberID) { Namecard.removeFavoriteUser = function (shopMemberID, div) {
Common.showLoadingIndicator();
$("#userNameCard").modal("hide");
$("#myNameCard").modal("hide");
const result = NativeBridgeDataSource.removeFavoriteUser(shopMemberID); const result = NativeBridgeDataSource.removeFavoriteUser(shopMemberID);
if (result) { div.removeClass(result ? "active" : "disable");
$(".shopmember_" + shopMemberID).removeClass("active"); div.addClass(result ? "disable" : "active");
$(".shopmember_" + shopMemberID).addClass("disable");
} else {
$(".shopmember_" + shopMemberID).addClass("active");
$(".shopmember_" + shopMemberID).removeClass("disable");
}
Common.dismissLoadingIndicator();
}; };
Namecard.insertFavoriteUser = function (shopMemberID) { Namecard.insertFavoriteUser = function (shopMemberID, div) {
$("#userNameCard").modal("hide");
$("#myNameCard").modal("hide");
const result = NativeBridgeDataSource.addFavoriteUser(shopMemberID); const result = NativeBridgeDataSource.addFavoriteUser(shopMemberID);
if (result) { div.removeClass(result ? "disable" : "active");
$(".shopmember_" + shopMemberID).removeClass("disable"); div.addClass(result ? "active" : "disable");
$(".shopmember_" + shopMemberID).addClass("active");
} else {
$(".shopmember_" + shopMemberID).addClass("disable");
$(".shopmember_" + shopMemberID).removeClass("active");
}
Common.dismissLoadingIndicator();
}; };
Namecard.refreshForOnline = function () { Namecard.refreshForOnline = function () {
...@@ -109,11 +113,12 @@ Namecard.refreshForOffline = function () { ...@@ -109,11 +113,12 @@ Namecard.refreshForOffline = function () {
Namecard.moveContactPage = function (paramGroupID) { Namecard.moveContactPage = function (paramGroupID) {
const groupID = paramGroupID; const groupID = paramGroupID;
if (window.location.pathname.includes("chat_room") || if (
window.location.pathname.includes("archive_detail")) window.location.pathname.includes("chat_room") ||
{ window.location.pathname.includes("archive_detail")
) {
if (groupID == "") return; if (groupID == "") return;
NativeBridgeDelegate.setToMoveGroupId(groupID); NativeBridgeDelegate.setToMoveGroupId(groupID);
window.location.href = "contact.html"; window.location.href = "contact.html";
} }
} };
<div class="modal fade add_user_confirm_modal" id="modalAddUserConfirm" tabindex="-1" role="dialog" <div class="modal fade add_user_confirm_modal" id="modalAddUserConfirm" tabindex="-1" role="dialog"
aria-labelledby="modalAddUserConfirm" aria-hidden="true" style="position: fixed;"> aria-labelledby="modalAddUserConfirm" aria-hidden="true" style="position: fixed; overflow-y: hidden;">
<div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document"> <div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document" style="max-width: 100%;">
<div class="modal-content" style="position: fixed;top: 0;height: 100%;width: 100%;left:0;right: 0;margin: 0 auto;"> <div class="modal-content" style="height:70vh; width:90vw;">
<div class="modal-header border-0 pb-0"> <div class="modal-header border-0 pb-0">
<span class="m-auto">ユーザー招待</span> <span class="m-auto">ユーザー招待</span>
</div> </div>
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
<div class="chat_item d-flex flex-row align-items-center w-100"> <div class="chat_item d-flex flex-row align-items-center w-100">
<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">
...@@ -34,8 +35,10 @@ ...@@ -34,8 +35,10 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="modal-footer border-0 justify-content-center" style="position: relative;width: 100%;background-color: white;"> <div class="modal-footer border-0 justify-content-center"
<button type="button" id="cancelAddUserBtn" class="profile_favorite_btn bg_white border_gray text_blue cancel_add_user_btn"> style="position: relative;width: 100%;background-color: white;">
<button type="button" id="cancelAddUserBtn"
class="profile_favorite_btn bg_white border_gray text_blue cancel_add_user_btn">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span>キャンセル</span> <span>キャンセル</span>
</div> </div>
......
<!-- コンテンツ --> <!-- コンテンツ -->
<div class="modal fade add_user_modal" id="addUserInCollaboration" tabindex="-1" role="dialog" aria-labelledby="addUserInCollaboration" aria-hidden="true"> <div class="modal fade add_user_modal" id="addUserInCollaboration" tabindex="-1" role="dialog"
<div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document"> aria-labelledby="addUserInCollaboration" aria-hidden="true">
<div class="modal-content" style="position: fixed;width: 100%;height:100%;top: 0px;left:0;"> <div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document" style="max-width: 100%;">
<div class="modal-content">
<form id="addUserFormInCollaboration" action="chat_add_user_confirm.html" method="post"> <form id="addUserFormInCollaboration" action="chat_add_user_confirm.html" method="post">
<!-- ユーザー検索 --> <!-- ユーザー検索 -->
<!-- タブ --> <!-- タブ -->
...@@ -9,7 +10,8 @@ ...@@ -9,7 +10,8 @@
<div class="row h-100 align-items-center"> <div class="row h-100 align-items-center">
<div class="col-4 pr-0"> <div class="col-4 pr-0">
<div class="nav-item"> <div class="nav-item">
<a href="#" class="close_btn" class="close" data-dismiss="modal" aria-label="Close">閉じる</a> <a href="#" class="close_btn" class="close" data-dismiss="modal"
aria-label="Close">閉じる</a>
</div> </div>
</div> </div>
<div class="col-4 p-0"> <div class="col-4 p-0">
...@@ -20,19 +22,23 @@ ...@@ -20,19 +22,23 @@
</div><!-- .row --> </div><!-- .row -->
</nav><!-- nav --> </nav><!-- nav -->
<div class="content tabs"> <div class="content tabs">
<input id="tabMyGroupOnAddUserInCollaboration" type="radio" name="tab_item" checked onclick="CollaborationUI.refreshMyGroupForAddUserInCollaboration();"> <input id="tabMyGroupOnAddUserInCollaboration" type="radio" name="tab_item" checked
onclick="CollaborationUI.refreshMyGroupForAddUserInCollaboration();">
<label class="tab_item m-0" for="tabMyGroupOnAddUserInCollaboration">マイグループ</label> <label class="tab_item m-0" for="tabMyGroupOnAddUserInCollaboration">マイグループ</label>
<input id="tabAllGroupOnAddUserInCollaboration" type="radio" name="tab_item" onclick="CollaborationUI.refreshAllGroupForAddUserInCollaboration('0');"> <input id="tabAllGroupOnAddUserInCollaboration" type="radio" name="tab_item"
onclick="CollaborationUI.refreshAllGroupForAddUserInCollaboration('0');">
<label class="tab_item m-0" for="tabAllGroupOnAddUserInCollaboration">全グループ</label> <label class="tab_item m-0" for="tabAllGroupOnAddUserInCollaboration">全グループ</label>
<div class="tab_content" id="tab1_content" style="height: 100vh; overflow:scroll;"> <div class="tab_content" id="tab1_content">
<div class="chat_list"> <div class="chat_list">
<!-- お気に入りグループ --> <!-- お気に入りグループ -->
<div class="category" onclick="CollaborationUI.toggleCategory(this);"><div class="category_name"><span>お気に入り</span></div></div> <div class="category" onclick="CollaborationUI.toggleCategory(this);">
<div class="category_name"><span>お気に入り</span></div>
</div>
<div id="favoriteListForAddUserInCollaboration"></div> <div id="favoriteListForAddUserInCollaboration"></div>
<div id="myGroupListForAddUserInCollaboration"></div> <div id="myGroupListForAddUserInCollaboration"></div>
</div> </div>
</div> </div>
<div class="tab_content" id="tab2_content" style="height: 100vh; overflow:scroll;"> <div class="tab_content" id="tab2_content">
<div class="breadcrumb" id="groupPathAreaForAddUserInCollaboration"></div> <div class="breadcrumb" id="groupPathAreaForAddUserInCollaboration"></div>
<div class="chat_list"> <div class="chat_list">
<!-- 全グループ --> <!-- 全グループ -->
...@@ -80,7 +86,7 @@ ...@@ -80,7 +86,7 @@
</div> </div>
</div> </div>
<!-- ルーム解説ボタン --> <!-- ルーム解説ボタン -->
<div class="add_user_confirm_btn content" id="addUserConfirmBtnInCollaboration" style="position: fixed;"> <div class="add_user_confirm_btn content" id="addUserConfirmBtnInCollaboration">
<button type="button" name="button" id="buttonAddUser" style="bottom: 0; width: 100%;"> <button type="button" name="button" id="buttonAddUser" style="bottom: 0; width: 100%;">
確認<br> 確認<br>
<span class="select_member_num"></span><span class="select_member">名 選択中</span></button> <span class="select_member_num"></span><span class="select_member">名 選択中</span></button>
......
<!-- TODO: peacekim:: this file is not using-->
<div class="modal fade profile_modal" id="profileModal1" tabindex="-1" role="dialog" aria-labelledby="profileModal1" <div class="modal fade profile_modal" id="profileModal1" tabindex="-1" role="dialog" aria-labelledby="profileModal1"
aria-hidden="true"> aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-dialog modal-dialog-centered" role="document">
......
...@@ -19,21 +19,19 @@ ...@@ -19,21 +19,19 @@
</div> </div>
<div class="modal-footer border-0 justify-content-center"> <div class="modal-footer border-0 justify-content-center">
{{#isFavorite}} {{#isFavorite}}
<button type="button" class="border-0 bg_navy" <button type="button" class="border-0 bg_navy" id="favoriteButton">
onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star active shopmember_{{shopMemberId}}" <span class="star active shopmember_{{shopMemberId}}"
onclick="CHAT_UI.favoriteUserChange('{{shopMemberId}}',this)"></span> onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})"></span>
<span>お気に入り解除</span> <span>お気に入り解除</span>
</div> </div>
</button> </button>
{{/isFavorite}} {{/isFavorite}}
{{^isFavorite}} {{^isFavorite}}
<button type="button" class="border-0 bg_navy" <button type="button" class="border-0 bg_navy" id="favoriteButton">
onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star disable shopmember_{{shopMemberId}}" <span class="star disable shopmember_{{shopMemberId}}"
onclick="Namecard.favoriteUserChange('{{shopMemberId}}',this)"></span> onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})"></span>
<span>お気に入り登録</span> <span>お気に入り登録</span>
</div> </div>
</button> </button>
......
{{#userList}} {{#userList}}
<div class="user_item"> <div class="user_item">
<a href="javascript:return false;" onclick="Namecard.makeNameCard({{shopMemberId}})"> <a href="#" onclick="Namecard.makeNameCard({{shopMemberId}})">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
<img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"> <img src="{{profileUrl}}" onError="this.src='./img/noImage.png'">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<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="javascript:return false;" 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">
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
<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>
......
<ul class="p-0 chat_make_room_list" style="margin-top: 0px !important;border-top: none !important;"> <ul class="p-0" 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 userCell">
<a href="javascript:return false;" 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">
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
<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>
......
...@@ -18,24 +18,20 @@ ...@@ -18,24 +18,20 @@
{{/groupPathList}} {{/groupPathList}}
</div> </div>
<div class="modal-footer border-0 justify-content-center"> <div class="modal-footer border-0 justify-content-center">
{{#isFavorite}} <button type="button" class="border-0" id="favoriteButton">
<button type="button" class="border-0" onclick="Namecard.removeFavoriteUser({{shopMemberId}})"
id="favoriteButton">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star active shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange('{{shopMemberId}}', this)"></span> {{#isFavorite}}
<span class="star active shopmember_{{shopMemberId}}"
onclick="Namecard.favoriteUserChange({{shopMemberId}}, this)"></span>
<span>お気に入り解除</span> <span>お気に入り解除</span>
</div>
</button>
{{/isFavorite}} {{/isFavorite}}
{{^isFavorite}} {{^isFavorite}}
<button type="button" class="border-0" onclick="Namecard.insertFavoriteUser({{shopMemberId}})" <span class="star disable shopmember_{{shopMemberId}}"
id="favoriteButton"> onclick="Namecard.favoriteUserChange({{shopMemberId}}, this)"></span>
<div class="d-flex flex-column">
<span class="star disable shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange('{{shopMemberId}}', this)"></span>
<span>お気に入り登録</span> <span>お気に入り登録</span>
{{/isFavorite}}
</div> </div>
</button> </button>
{{/isFavorite}}
<button type="button" class="border-0" onclick="Namecard.startVoice('{{shopMemberId}}','{{name}}');"> <button type="button" class="border-0" onclick="Namecard.startVoice('{{shopMemberId}}','{{name}}');">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
......
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