Commit ec77a4ea by Kim Peace

Merge branch 'feature/add_user_in_collaboration' into 'develop'

Feature/add user in collaboration

See merge request !218
parents 184b35c2 454a6f9f
......@@ -73,6 +73,9 @@ input[name="tab_item"] {
width: 90px;
max-height: 60px;
}
#addUserFormInCollaboration .chat_list li {
border-bottom: 1px solid #e2e8f0;
}
.chat_list ul li {
list-style: none;
border-bottom: 1px solid #e2e8f0;
......
......@@ -9,6 +9,11 @@ CollaborationUI.initialBindAddUserButton = function () {
.off()
.on("click", function () {
$("#addUserInCollaboration").modal("hide");
if (ChatManagementCommon.selectedUserList.length == 0) {
return;
}
const selectedUserList =
ChatManagementCommon.selectedUserList.join(",");
NativeBridgeDelegate.saveSelectedUserList(selectedUserList);
......@@ -149,7 +154,7 @@ CollaborationUI.refreshAllGroupForAddUserInCollaboration = function (groupID) {
CollaborationUI.appendChildGroups(result.childGroupList);
//該当グループの所属ユーザを表示。
CollaborationUI.appendUsers();
CollaborationUI.appendUsers(result.groupUserList);
};
CollaborationUI.bindOnClickParentGroup = function (parentGroupID) {
......@@ -168,7 +173,7 @@ CollaborationUI.displayRootGroupAndParentGroupIfNeeded = function (
rootGroupID,
groupID
) {
if (typeof rootGroupID !== "undefined" && paramGroupID == 0) {
if (typeof rootGroupID !== "undefined" && rootGroupID == 0) {
groupID = rootGroupID;
}
......@@ -296,7 +301,7 @@ CollaborationUI.bindAddUserButton = function (selectedUsers) {
let userIDList = selectedUsers.map((user) => user.shopMemberId);
const commaJoinedUserIDList = userIDList.join(",");
const collaborationType = globalUserInfo.collaborationType;
scrollTo(0,0);
NativeBridgeDelegate.inviteCollaboration(
commaJoinedUserIDList,
collaborationType
......
......@@ -12,14 +12,16 @@ document.addEventListener("DOMContentLoaded", function () {
// モーダルonモーダル(前のモーダルを非表示に)
// ホスト変更ボタン押下イベント
CollaborationUI.bindChangeHostButton();
});
// 閉じるイベント
CollaborationUI.bindCloseButton();
// ユーザー追加イベント
CollaborationUI.bindInviteButton();
CollaborationUI.initialBindAddUserButton();
document.addEventListener("readystatechange", () => {
if (document.readyState === "complete") {
CollaborationUI.initialBindAddUserButton();
// 閉じるイベント
CollaborationUI.bindCloseButton();
// ユーザー追加イベント
CollaborationUI.bindInviteButton();
}
});
/*********************************
......@@ -73,14 +75,14 @@ CollaborationUI.bindChangeHostButton = function () {
CollaborationUI.bindCloseButton = function () {
$(".close_btn").click(function () {
$("#overlay_add_user_list").addClass("none");
scrollTo(0, 0);
CollaborationUI.bindDisableScroll();
});
};
CollaborationUI.bindInviteButton = function () {
$(".inv_btn").click(function () {
$("#overlay_add_user_list").addClass("none");
scrollTo(0, 0);
});
};
......
<div class="modal fade add_user_confirm_modal" id="modalAddUserConfirm" tabindex="-1" role="dialog"
aria-labelledby="modalAddUserConfirm" aria-hidden="true" style="position: fixed;">
<div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document">
<div class="modal-content" style="position: fixed;top: 0;height: 100%;width: 100%;left:0;right: 0;margin: 0 auto;">
aria-labelledby="modalAddUserConfirm" aria-hidden="true" style="position: fixed; overflow-y: hidden;">
<div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document" style="max-width: 100%;">
<div class="modal-content" style="height:70vh; width:90vw;">
<div class="modal-header border-0 pb-0">
<span class="m-auto">ユーザー招待</span>
</div>
......@@ -16,7 +16,8 @@
<div class="chat_item d-flex flex-row align-items-center w-100">
<div class="chat_item_l">
<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 class="chat_item_m px-0">
......@@ -34,8 +35,10 @@
</ul>
</div>
</div>
<div class="modal-footer border-0 justify-content-center" 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="modal-footer border-0 justify-content-center"
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">
<span>キャンセル</span>
</div>
......
<!-- コンテンツ -->
<div class="modal fade add_user_modal" id="addUserInCollaboration" tabindex="-1" role="dialog" aria-labelledby="addUserInCollaboration" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal_collaboration_user" role="document">
<div class="modal-content" style="position: fixed;width: 100%;height:100%;top: 0px;left:0;">
<div class="modal fade add_user_modal" id="addUserInCollaboration" tabindex="-1" role="dialog"
aria-labelledby="addUserInCollaboration" aria-hidden="true">
<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">
<!-- ユーザー検索 -->
<!-- タブ -->
......@@ -9,7 +10,8 @@
<div class="row h-100 align-items-center">
<div class="col-4 pr-0">
<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 class="col-4 p-0">
......@@ -20,19 +22,23 @@
</div><!-- .row -->
</nav><!-- nav -->
<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>
<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>
<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="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="myGroupListForAddUserInCollaboration"></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="chat_list">
<!-- 全グループ -->
......@@ -80,7 +86,7 @@
</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%;">
確認<br>
<span class="select_member_num"></span><span class="select_member">名 選択中</span></button>
......@@ -88,4 +94,4 @@
</form>
</div>
</div>
</div>
</div>
\ No newline at end of file
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