Commit 44d8dd9c by Kang Donghun

協業内ユーザー招待機能実装

parent 6644d05e
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="d-flex align-items-center h-100"> <div class="d-flex align-items-center h-100">
<div class="collabo_nav_l text-left w-100"> <div class="collabo_nav_l text-left w-100">
</div> </div>
<div class="collabo_nav_r none"> <div class="collabo_nav_r">
<div class="text-right d-flex align-items-center"> <div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn add_user_btn"></button> <button type="button" name="button" class="btn add_user_btn"></button>
<!--<button type="button" name="button" class="btn menu_btn"></button>--> <!--<button type="button" name="button" class="btn menu_btn"></button>-->
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<div id="userProfileModalInCollaboration"></div> <div id="userProfileModalInCollaboration"></div>
<div id="modal_collabo_profile2"></div> <div id="modal_collabo_profile2"></div>
<div id="add_user_list" ></div> <div id="add_user_list" ></div>
<div id="modal_add_user_confirm" ></div>
<!-- ホスト変更モーダル --> <!-- ホスト変更モーダル -->
<div id="modal_collabo_change_host"></div> <div id="modal_collabo_change_host"></div>
...@@ -93,6 +94,7 @@ ...@@ -93,6 +94,7 @@
$("#modal_collabo_profile2").load("./modal_collabo_profile2.html"); $("#modal_collabo_profile2").load("./modal_collabo_profile2.html");
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
$("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html"); $("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html");
$("#add_user_list").load("./modal_add_user_list.html");
let CHAT_SERVER_URL = ''; let CHAT_SERVER_URL = '';
let CMS_SERVER_URL = ''; let CMS_SERVER_URL = '';
......
...@@ -318,6 +318,7 @@ ...@@ -318,6 +318,7 @@
border-radius: 10px; border-radius: 10px;
} }
#changeHostModal .modal-footer button, #changeHostModal .modal-footer button,
#modalAddUserConfirm .modal-footer button,
#hostRequestModal .modal-footer button { #hostRequestModal .modal-footer button {
width: 50%; width: 50%;
height: 50px; height: 50px;
...@@ -442,7 +443,483 @@ ...@@ -442,7 +443,483 @@
position: inherit; position: inherit;
} }
.add_user_modal{ .add_user_modal {
width: 80%; width: 80%;
height: 70%; height: 80%;
left: 10%;
overflow: auto;
} }
.add_user_confirm_modal {
max-height: 80%;
left: 5%;
width: 90%;
}
@charset "UTF-8";
/**************************** tab *************************/
.modal-content .tabs {
margin-top: 60px;
}
.modal-content .tab_item {
width: calc(100% / 2);
height: 50px;
border-bottom: 5px solid #0070ca;
background-color: #e0e0e0;
line-height: 50px;
font-size: 16px;
text-align: center;
color: #323743;
display: block;
float: left;
text-align: center;
font-weight: bold;
transition: all 0.2s ease;
}
.modal-content .msg_notification {
display: none;
}
.modal-content .tab_item:hover {
opacity: 0.75;
}
input[name="tab_item"] {
display: none;
}
.modal-content .tab_content {
display: none;
clear: both;
overflow: hidden;
}
#tabMyGroupOnMakeRoom:checked ~ #tab1_content,
#tabAllGroupOnMakeRoom:checked ~ #tab2_content{
display: block;
}
#tabMyGroupOnAddUserInCollaboration:checked ~ #tab1_content,
#tabAllGroupOnAddUserInCollaboration:checked ~ #tab2_content{
display: block;
}
#tabMyGroupOnAddUser:checked ~ #tab1_content,
#tabAllGroupOnAddUser:checked ~ #tab2_content{
display: block;
}
#tabMyGroup:checked ~ #tab1_content,
#tabAllGroup:checked ~ #tab2_content{
display: block;
}
#tabGroup:checked ~ #tab1_content,
#tabDM:checked ~ #tab2_content{
display: block;
}
.modal-content .tabs input:checked + .tab_item {
background-color: #0070ca;
color: #fff;
}
/**************************** chat list *************************/
.modal-content .chat_list ul {
padding: 0;
margin-top: 1rem;
}
.modal-content .chat_list img {
width: 90px;
max-height: 60px;
}
.modal-content .chat_list ul li {
list-style: none;
border-bottom: 1px solid #e2e8f0;
position: relative;
}
.modal-content .chat_list ul li:first-child {
border-top: 1px solid #e2e8f0;
}
.modal-content .chat_list .chat_item_t,
.chat_list .chat_item_desc {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.modal-content .chat_item_l {
margin: 0 15px;
}
.modal-content .chat_item_m {
white-space: nowrap;
overflow: hidden;
width: calc(100% - 160px);
}
/* リスト */
.modal-content .chat_list .chat_item:hover {
background: aliceblue;
}
/* サムネイル画像 */
.modal-content .chat_item_l .thumbnail {
width: 50px;
height: 50px;
border-radius: 50%;
overflow: hidden;
margin: 0 auto;
}
.modal-content .chat_item_l .thumbnail img{
width: 50px;
height: 50px;
}
.modal-content .chat_item_l .thumbnail4 img {
width: 25px;
height: 25px;
float: left;
}
.modal-content .chat_item_l .thumbnail3 .img_wrap:nth-child(1) {
width: 25px;
height: 50px;
position: relative;
overflow: hidden;
float: left;
}
.modal-content .chat_item_l .thumbnail3 .img_wrap:nth-child(1) img {
width: 50px;
height: 50px;
position: absolute;
left: -12px;
}
.modal-content .chat_item_l .thumbnail3 .img_wrap:nth-child(2) {
width: 25px;
height: 25px;
position: relative;
overflow: hidden;
float: left;
}
.modal-content .chat_item_l .thumbnail3 .img_wrap:nth-child(2) img, .chat_item_l .thumbnail3 .img_wrap:nth-child(3) img {
width: 25px;
height: 30px;
}
.modal-content .chat_item_l .thumbnail3 .img_wrap:nth-child(3) {
width: 25px;
height: 25px;
position: relative;
overflow: hidden;
float: left;
}
.modal-content .chat_item_l .thumbnail2 .img_wrap:nth-child(1) {
width: 25px;
height: 50px;
position: relative;
overflow: hidden;
float: left;
}
.modal-content .chat_item_l .thumbnail2 .img_wrap:nth-child(2) {
width: 25px;
height: 50px;
position: relative;
overflow: hidden;
}
.modal-content .chat_item_l .thumbnail2 .img_wrap img {
width: 50px;
height: 50px;
position: absolute;
left: -12px;
}
.modal-content .chat_item {
height: 90px;
}
.modal-content .chat_list li {
list-style: none;
}
.modal-content .chat_list a {
color: #323743;
}
.modal-content .chat_make_room a {
color: #323743;
}
/* タイトル(グループ名、個人名) */
.modal-content .chat_item_ttl,
.chat_item_num {
font-weight: bold;
}
/**************************** make room *************************/
.modal-content .chat_list .category {
text-align: left;
font-size: 1.4rem;
height: 30px;
font-size: 16px;
cursor: pointer;
position: relative;
line-height: 30px;
background: #c4c4c4;
padding-left: 10px;
}
.modal-content .category_name {
white-space: nowrap;
overflow: scroll;
width: 90%;
}
.modal-content .chat_list .category.open::after {
content: "\f106";
}
.modal-content .chat_list .category::after {
position: absolute;
top: 0;
right: 10px;
content: "\f107";
font: 25px FontAwesome;
}
/* お気に入り */
.modal-content .star.active:before {
content: "\f005";
font: 26px FontAwesome;
font-family: "Font Awesome 5 Free";
font-weight: 900;
color: #F5D256;
padding: 20px;
}
.modal-content .star.disable:before {
content: "\f005";
font: 26px FontAwesome;
font-family: "Font Awesome 5 Free";
font-weight: 400;
color: #C4C4C4;
padding: 20px;
}
/* メンバー選択チェックボックス */
.modal-content .chat_item_l_chk {
height: 100%;
display: table;
margin-right: 20px;
width: 50px;
}
.modal-content .checkbox {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.modal-content .checkbox-input {
display: none;
}
.modal-content .checkbox-parts {
position: relative;
}
.modal-content .checkbox-parts::before {
display: block;
position: absolute;
border: 2px solid #0070ca;
content: "";
width: 40px;
height: 40px;
border-radius: 50%;
top: 5px;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
.modal-content .checkbox-input:checked + .checkbox-parts::after {
display: block;
position: absolute;
content: "\f107";
font: 40px FontAwesome;
color: white;
width: 40px;
height: 40px;
top: 5px;
right: 0;
bottom: 0;
left: 0;
margin: auto;
background: #0070ca;
border-radius: 50%;
}
/* ルームボタン */
.modal-content .add_user_confirm_btn button,
.modal-content .add_user_btn button {
height: 60px;
position: fixed;
bottom: 0;
width: 100%;
background: #0070ca;
color: #fff;
border: none;
font-size: 18px;
max-width: 1280px;
}
.modal-content .select_member {
font-size: 14px;
}
#chat_make_room_confirm .room_name,
#chat_change_room_name .room_name {
width: 90%;
margin: 0 auto;
}
#chat_make_room_confirm .room_name h2,
#chat_change_room_name .room_name h2 {
margin-top: 20px;
font-size: 18px;
}
#chat_make_room_confirm .chat_list h2,
#chat_add_user_confirm .chat_list h2 {
font-size: 18px;
}
#chat_make_room_confirm .chat_list,
#chat_add_user_confirm .chat_list {
padding: 20px 0;
width: 90%;
margin: 0 auto;
}
/* ルーム名入力フォーム */
.modal-content .input_name_room {
padding-left: 10px;
width: 100%;
border: none;
border-bottom: 1px solid #bdbdbd;
height: 40px;
margin-bottom: 20px;
}
/* ユーザーリスト */
.modal-content .user_list {
position: fixed;
top: 60px;
background: #fff;
width: 100%;
overflow-x: scroll;
z-index: 2;
}
.modal-content .user_list .user_item {
margin: 10px;
text-align: center;
}
.modal-content .user_list .user_item span {
width: 60px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 12px;
}
.modal-content .user_list .user_item a {
color: #323743;
}
/* ユーザーリストフィルター */
#filter .user_item .img_wrap {
position: relative;
}
#filter .user_item .img_wrap.filter:after {
position: absolute;
content: "\f107";
font: 50px FontAwesome;
width: 50px;
height: 50px;
color: #fff;
left: 5px;
background: #0070ca82;
border-radius: 50%;
}
.modal-content .user_list .user_item img {
width: 50px;
height: 50px;
border-radius: 50%;
margin: 0 auto;
}
.add_user_confirm_btn button {
height: 60px;
position: fixed;
bottom: 0;
width: 100%;
background: #0070ca;
color: #fff;
border: none;
font-size: 18px;
max-width: 1280px;
}
@media screen and (max-width: 768px) {
/* chat item */
.tab_item {
font-size: 16px;
margin-bottom: 1rem;
}
.chat_item_ttl {
font-size: 16px;
}
.chat_item_ttl,
.chat_item_num {
font-size: 16px;
}
.chat_item_m {
font-size: 14px;
}
.chat_item_time,
.chat_item_unread {
font-size: 14px;
}
.chat_item {
height: 70px;
}
/* room button */
.make_room_btn button,
.make_room_confirm_btn button,
.add_user_confirm_btn button,
.add_user_btn button {
font-size: 16px;
}
/* check radio */
.checkbox-parts::before {
width: 30px;
height: 30px;
}
.checkbox-input:checked + .checkbox-parts::after {
font: 30px FontAwesome;
width: 30px;
height: 30px;
}
.chat_item_l_chk {
margin-right: 15px;
width: 30px;
}
#chat_make_room_confirm .room_name h2,
#chat_change_room_name .room_name h2 {
font-size: 16px;
}
#chat_make_room_confirm .chat_list h2,
#chat_add_user_confirm .chat_list h2 {
font-size: 16px;
}
/* ルーム名入力フォーム */
.input_name_room {
font-size: 14px;
}
/* チャットルーム */
.room_left figure img {
width: 40px;
height: 40px;
}
.room_left-text {
margin-left: 50px;
}
.room_right {
max-width: 95%;
}
.room_left {
max-width: 75%;
}
}
...@@ -1425,15 +1425,6 @@ $('#addUserConfirmBtn').on('click', function(e) { ...@@ -1425,15 +1425,6 @@ $('#addUserConfirmBtn').on('click', function(e) {
$('#addUserForm').submit(); $('#addUserForm').submit();
}); });
$('#addUserConfirmBtnInCollaboration').on('click', function(e) {
if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
webkit.messageHandlers.saveSelectedUserList.postMessage(CHAT.globalSelectedUserList.join(","));
}
$('#addUserFormInCollaboration').submit();
});
CHAT_UI.roomDisplayOff = function() { CHAT_UI.roomDisplayOff = function() {
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.roomDisplayOff(); android.roomDisplayOff();
...@@ -1645,8 +1636,6 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) { ...@@ -1645,8 +1636,6 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) {
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
} }
CHAT_UI.startChat = function(userShopMemberId,userName) { CHAT_UI.startChat = function(userShopMemberId,userName) {
CHAT_UI.showLoadingIndicator(); CHAT_UI.showLoadingIndicator();
var userIdList = []; var userIdList = [];
...@@ -1659,13 +1648,22 @@ CHAT_UI.startChat = function(userShopMemberId,userName) { ...@@ -1659,13 +1648,22 @@ CHAT_UI.startChat = function(userShopMemberId,userName) {
} else { } else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.NAME_CARD}); webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.NAME_CARD});
} }
CHAT_UI.hideNamecard(nameCardAreaId.USER);
}; };
CHAT_UI.startVoice = function() { CHAT_UI.startVoice = function(userShopMemberId, userName) {
}; CHAT_UI.showLoadingIndicator();
var userIdList = [];
userIdList.push(userShopMemberId);
// 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' +userName;
if (typeof(android) != "undefined") {
android.createChatRoom(chatRoomType.DM, userIdList.join(','),newRoomName, makeRoomFlg.NAME_CARD);
} else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.NAME_CARD});
}
CHAT_UI.startCollaboration(collaborationType.AUDIO);
}
CHAT_UI.makeNameCard = function(shopMemberId) { CHAT_UI.makeNameCard = function(shopMemberId) {
if (CHAT.globalLoginParameter.shopMemberId == shopMemberId) { if (CHAT.globalLoginParameter.shopMemberId == shopMemberId) {
...@@ -2224,7 +2222,7 @@ CHAT_UI.showAddUserConfirmView = function() { ...@@ -2224,7 +2222,7 @@ CHAT_UI.showAddUserConfirmView = function() {
userIdList.push(user.shopMemberId); userIdList.push(user.shopMemberId);
}) })
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.inviteUsers(userIdList.join(',')); android.inviteUsers(userIdList.join(','), false);
} else { } else {
webkit.messageHandlers.inviteUsers.postMessage({"userIdList": userIdList.join(',')}); webkit.messageHandlers.inviteUsers.postMessage({"userIdList": userIdList.join(',')});
} }
...@@ -2322,7 +2320,7 @@ CHAT_UI.refreshMyGroupForAddUser = function() { ...@@ -2322,7 +2320,7 @@ CHAT_UI.refreshMyGroupForAddUser = function() {
}); });
$('#myGroupListForMakeRoom').append(obj); $('#myGroupListForMakeRoom').append(obj);
}) });
} }
CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) { CHAT_UI.refreshAllGroupForAddUser = function(paramGroupId) {
...@@ -2539,12 +2537,6 @@ CHAT_UI.refreshJoinedCollaboration = function(loginIdList, hostName) { ...@@ -2539,12 +2537,6 @@ CHAT_UI.refreshJoinedCollaboration = function(loginIdList, hostName) {
} }
CHAT_UI.refreshMyGroupForAddUserInCollaboration = function() { CHAT_UI.refreshMyGroupForAddUserInCollaboration = function() {
if (CHAT_DB.loadSelectedUsers() != "") {
let selectedUsers = CHAT_DB.loadSelectedUsers();
selectedUsers.forEach(function(user) {
CHAT.globalSelectedUserList.push(user.shopMemberId);
})
};
if (CHAT.globalSelectedUserList.length > 0) { if (CHAT.globalSelectedUserList.length > 0) {
$('.select_member_num').text(CHAT.globalSelectedUserList.length); $('.select_member_num').text(CHAT.globalSelectedUserList.length);
} else { } else {
...@@ -2557,20 +2549,20 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function() { ...@@ -2557,20 +2549,20 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function() {
// グループの様式を読み込む // グループの様式を読み込む
var groupTemplate; var groupTemplate;
$.get({ url: "./template/template_add_user_group_list.html", async: false } $.get({ url: "./template/template_add_user_group_list_in_collaboration.html", async: false }
, function(text) { , function(text) {
groupTemplate = text; groupTemplate = text;
}); });
// ユーザの様式を読み込む // ユーザの様式を読み込む
var userTemplate; var userTemplate;
$.get({ url: "./template/template_add_user_user_list.html", async: false } $.get({ url: "./template/template_add_user_user_list_in_collaboration.html", async: false }
, function(text) { , function(text) {
userTemplate = text; userTemplate = text;
}); });
var groupUserTemplate; var groupUserTemplate;
$.get({ url: "./template/template_add_user_group_user_list.html", async: false } $.get({ url: "./template/template_add_user_group_user_list_in_collaboration.html", async: false }
, function(text) { , function(text) {
groupUserTemplate = text; groupUserTemplate = text;
}); });
...@@ -2638,8 +2630,8 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function() { ...@@ -2638,8 +2630,8 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function() {
}); });
$('#myGroupListForAddUserInCollaboration').append(obj); $('#myGroupListForAddUserInCollaboration').append(obj);
$('#addUserInCollaboration').modal('show');
}); });
$('#addUserInCollaboration').modal('show');
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
} }
...@@ -2668,7 +2660,6 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) { ...@@ -2668,7 +2660,6 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) {
//DBからグループ情報を取得。 //DBからグループ情報を取得。
var result = CHAT_DB.getGroupInfoForAddUser(groupId); var result = CHAT_DB.getGroupInfoForAddUser(groupId);
//上位グループ、トップグループ遷移ボタンのイベント追加。 //上位グループ、トップグループ遷移ボタンのイベント追加。
if (typeof result.parentGroupId !== 'undefined') { if (typeof result.parentGroupId !== 'undefined') {
$('#parentGroupBtnForAddUserInCollaboration').on('click', function() { $('#parentGroupBtnForAddUserInCollaboration').on('click', function() {
...@@ -2690,7 +2681,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) { ...@@ -2690,7 +2681,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) {
} }
//該当グループのパースを表示。 //該当グループのパースを表示。
var groupPathTemplate; var groupPathTemplate;
$.get({ url: "./template/template_add_user_group_path.html", async: false } $.get({ url: "./template/template_add_user_group_path_in_collaboration.html", async: false }
, function(text) { , function(text) {
groupPathTemplate = text; groupPathTemplate = text;
}); });
...@@ -2710,7 +2701,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) { ...@@ -2710,7 +2701,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) {
//該当グループの下位グループ表示。 //該当グループの下位グループ表示。
var groupTemplate; var groupTemplate;
$.get({ url: "./template/template_add_user_group_list.html", async: false } $.get({ url: "./template/template_add_user_group_list_in_collaboration.html", async: false }
, function(text) { , function(text) {
groupTemplate = text; groupTemplate = text;
}); });
...@@ -2729,7 +2720,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) { ...@@ -2729,7 +2720,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function(paramGroupId) {
//該当グループの所属ユーザを表示。 //該当グループの所属ユーザを表示。
var userTemplate; var userTemplate;
$.get({ url: "./template/template_add_user_user_list.html", async: false } $.get({ url: "./template/template_add_user_user_list_in_collaboration.html", async: false }
, function(text) { , function(text) {
userTemplate = text; userTemplate = text;
}); });
...@@ -2781,6 +2772,7 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId, isCollaborationHost ...@@ -2781,6 +2772,7 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId, isCollaborationHost
let namecardHtml = Mustache.render(namecardTemplate, { let namecardHtml = Mustache.render(namecardTemplate, {
shopMemberId: nameCardInfo.shopMemberId, shopMemberId: nameCardInfo.shopMemberId,
profileUrl: nameCardInfo.profileUrl, profileUrl: nameCardInfo.profileUrl,
loginId: nameCardInfo.loginId,
name: nameCardInfo.shopMemberName, name: nameCardInfo.shopMemberName,
groupPathList: nameCardInfo.groupPathList, groupPathList: nameCardInfo.groupPathList,
isFavorite: nameCardInfo.isFavorite, isFavorite: nameCardInfo.isFavorite,
...@@ -2815,4 +2807,44 @@ CHAT_UI.insertFavoriteUserInCollaboration = function(shopMemberId) { ...@@ -2815,4 +2807,44 @@ CHAT_UI.insertFavoriteUserInCollaboration = function(shopMemberId) {
result = CHAT_DB.addFavoriteUser(shopMemberId); result = CHAT_DB.addFavoriteUser(shopMemberId);
} }
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
}; };
\ No newline at end of file
CHAT_UI.confirmInviteUserListInCollaboration = function() {
var selectedUsers = CHAT_DB.loadSelectedUsers();
if (selectedUsers != "") {
$('#selectedUserListinCollaboration').html('');
var selectedUserList = CHAT_DB.loadSelectedUsers();
selectedUserList.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
});
var modalTemplate;
$.get({ url: "./modal_add_user_confirm.html", async: false }
, function(text) {
modalTemplate = text;
});
let html = Mustache.render(modalTemplate, {
userList: selectedUserList
});
let obj = jQuery.parseHTML(html);
$('#modal_add_user_confirm').html(obj);
$('#modalAddUserConfirm').modal('show');
} else {
}
$("#addUserBtn").off().on('click', function() {
CHAT_UI.showLoadingIndicator();
let userIdList = new Array();
selectedUserList.forEach(function(user){
userIdList.push(user.shopMemberId);
})
if (typeof(android) != "undefined") {
android.inviteUsers(userIdList.join(','), true);
} else {
webkit.messageHandlers.inviteUsers.postMessage({"userIdList": userIdList.join(',')});
}
$('#modalAddUserConfirm').modal('hide');
});
}
\ No newline at end of file
...@@ -77,7 +77,16 @@ $(function () { ...@@ -77,7 +77,16 @@ $(function () {
// ユーザー招待メンバー検索 // ユーザー招待メンバー検索
$(".add_user_btn").click(function () { $(".add_user_btn").click(function () {
CHAT_UI.showLoadingIndicator(); CHAT_UI.showLoadingIndicator();
CHAT.globalSelectedUserList = [];
CHAT_UI.refreshMyGroupForAddUserInCollaboration(); CHAT_UI.refreshMyGroupForAddUserInCollaboration();
$('#addUserConfirmBtnInCollaboration').off().on('click', function() {
if (typeof(android) != "undefined") {
android.saveSelectedUserList(CHAT.globalSelectedUserList.join(","));
} else {
webkit.messageHandlers.saveSelectedUserList.postMessage(CHAT.globalSelectedUserList.join(","));
}
CHAT_UI.confirmInviteUserListInCollaboration();
});
}); });
$('#penBtn').click(function () { $('#penBtn').click(function () {
......
...@@ -45,15 +45,6 @@ $(function() { ...@@ -45,15 +45,6 @@ $(function() {
}); });
$("#coviewShareCloseButton").on("click", function(e) {
coview_api.LeaveRoom();
$(".coview_share_area").hide();
});
$("body").on("click", function() {
Coview_shareDropdownHide();
});
$(document).on("click", ".coview_share_request", function() { $(document).on("click", ".coview_share_request", function() {
console.log("globalUserInfo", globalUserInfo); console.log("globalUserInfo", globalUserInfo);
if ($(this).hasClass(collaborationTypeKey.VIDEO) == true) { if ($(this).hasClass(collaborationTypeKey.VIDEO) == true) {
...@@ -111,11 +102,7 @@ $(function() { ...@@ -111,11 +102,7 @@ $(function() {
}); });
$("#coviewShareAudio").on("click", function() { $("#coviewShareAudio").on("click", function() {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO; Coview_connect_audio_collaboration();
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea();
$(".coview_share_title_name").text("音声通話");
}) })
...@@ -138,6 +125,7 @@ $(function() { ...@@ -138,6 +125,7 @@ $(function() {
coview_api.addEventListener ("ready", function () { coview_api.addEventListener ("ready", function () {
console.log("=============> READY : ready for coview api"); console.log("=============> READY : ready for coview api");
Coview_addLoginId(globalUserInfo.loginId);
coview_api.Login(globalUserInfo.loginId); coview_api.Login(globalUserInfo.loginId);
}); });
...@@ -231,12 +219,20 @@ function Coview_exitCollaboration() { ...@@ -231,12 +219,20 @@ function Coview_exitCollaboration() {
CHAT_UI.joinRoom(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.name); CHAT_UI.joinRoom(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.name);
} }
function Coview_changeHost(shopMemberId) { function Coview_changeHost(userId) {
console.log("Change Host To " + shopMemberId); console.log("Change Host To " + userId);
coview_api.HostChange(shopMemberId); changeOwnerSend(userId);
} }
function Coview_addLoginId(loginId) { function Coview_addLoginId(loginId) {
console.log("addUser loginId = " + loginId); console.log("addUser loginId = " + loginId);
coview_api.addUser(loginId); coview_api.addUser(loginId);
} }
\ No newline at end of file
function Coview_connect_audio_collaboration() {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea();
$(".coview_share_title_name").text("音声通話");
}
<div class="modal fade add_user_confirm_modal" id="modalAddUserConfirm" tabindex="-1" role="dialog"
aria-labelledby="modalAddUserConfirm" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<span>ユーザー招待</span>
</div>
<div class="modal-body">
<div class="chat_list">
<h2>参加者</h2>
<ul class="p-0 chat_make_room_list">
<div id="selectedUserListinCollaboration">
{{#userList}}
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center">
<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>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{shopMemberName}}</span>
</div>
</div>
</div>
</div>
</li>
</ul>
{{/userList}}
</div>
</ul>
</div>
</div>
<div class="modal-footer border-0 justify-content-center">
<button type="button" class="profile_favorite_btn bg_white border_gray text_blue" data-dismiss="modal"
aria-label="Close">
<div class="d-flex flex-column">
<span>キャンセル</span>
</div>
</button>
<button type="button" id="addUserBtn" class="profile_chat_btn border-0 bg_blue text_white">
<div class="d-flex flex-column">
<span>招待</span>
</div>
</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
...@@ -5,24 +5,24 @@ ...@@ -5,24 +5,24 @@
<form id="addUserFormInCollaboration" action="chat_add_user_confirm.html" method="post"> <form id="addUserFormInCollaboration" action="chat_add_user_confirm.html" method="post">
<!-- ユーザー検索 --> <!-- ユーザー検索 -->
<!-- タブ --> <!-- タブ -->
<div class="content tabs"> <nav class="nav-modal-add-user">
<nav class="nav-modal-add-user"> <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 class="col-4 p-0"> </div>
<div class="nav-item p-0"> <div class="col-4 p-0">
<h1 class="nav-ttl">ユーザー選択</h1> <div class="nav-item p-0">
</div> <h1 class="nav-ttl">ユーザー選択</h1>
</div> </div>
</div><!-- .row --> </div>
</nav><!-- nav --> </div><!-- .row -->
<input id="tabMyGroupOnAddUserInCollaboration" type="radio" name="tab_item" checked> </nav><!-- nav -->
<div class="content tabs">
<input id="tabMyGroupOnAddUserInCollaboration" type="radio" name="tab_item" checked onclick="CHAT_UI.refreshMyGroupForAddUserInCollaboration();">
<label class="tab_item" for="tabMyGroupOnAddUserInCollaboration">マイグループ</label> <label class="tab_item" for="tabMyGroupOnAddUserInCollaboration">マイグループ</label>
<input id="tabAllGroupOnAddUserInCollaboration" type="radio" name="tab_item"> <input id="tabAllGroupOnAddUserInCollaboration" type="radio" name="tab_item" onclick="CHAT_UI.refreshAllGroupForAddUserInCollaboration('0');">
<label class="tab_item" for="tabAllGroupOnAddUserInCollaboration">全グループ</label> <label class="tab_item" for="tabAllGroupOnAddUserInCollaboration">全グループ</label>
<div class="tab_content" id="tab1_content"> <div class="tab_content" id="tab1_content">
<div class="chat_list"> <div class="chat_list">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</div> </div>
</div> </div>
<!-- ルーム解説ボタン --> <!-- ルーム解説ボタン -->
<div class="make_room_confirm_btn content" id="addUserConfirmBtnInCollaboration"> <div class="add_user_confirm_btn content" id="addUserConfirmBtnInCollaboration">
<button type="button" name="button" id="buttonAddUser"> <button type="button" name="button" id="buttonAddUser">
確認<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>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
{{#groupPathList}} {{#groupPathList}}
<li onclick="CHAT_UI.refreshAllGroupSearch({{groupId}});"><b>{{groupPath}}</b></li> <li onclick="return false;"><b>{{groupPath}}</b></li>
{{/groupPathList}} {{/groupPathList}}
</div> </div>
<div class="modal-footer border-0 justify-content-center"> <div class="modal-footer border-0 justify-content-center">
...@@ -38,8 +38,7 @@ ...@@ -38,8 +38,7 @@
</button> </button>
{{/isFavorite}} {{/isFavorite}}
<!-- {{^isHost}}--> <!-- {{^isHost}}-->
<button type="button" class="ch_host_btn border-0 bg_grey text_white" data-toggle="modal" <button type="button" class="ch_host_btn border-0 bg_grey text_white" onclick="Coview_changeHost('{{loginId}}');" disabled>
data-target="#changeHostModal" value="#profileModal1" disabled>
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_change_host.png" alt="ホスト変更"> <img src="icon/icon_change_host.png" alt="ホスト変更">
......
<li class="d-flex align-items-center">
<a href="#" class="w-100" onclick="CHAT_UI.refreshAllGroupForAddUserInCollaboration({{id}});">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail">
<img src="icon/icon_folder.png" alt="フォルダ" />
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{name}}</span>
</div>
</div>
</div>
</div>
</a>
</li>
\ No newline at end of file
<a href="#" class="breadcrumb_item" onclick="CHAT_UI.refreshAllGroupForAddUserInCollaboration({{id}});"><span>{{name}}</span></a>
\ No newline at end of file
<div class="category" onclick="CHAT_UI.toggleCategory(this);"><div class="category_name"><span>{{groupName}}</span></div></div>
<ul class="p-0 chat_make_room_list">
{{#groupUserList}}
<li class="d-flex align-items-center">
<div class="chat_item d-flex flex-row align-items-center w-100" onclick="CHAT_UI.checkForMakeChat({{shopMemberId}});" >
<div class="chat_item_l_chk">
<div class="checkbox">
<label>
<input type="checkbox" id="checkbox{{shopMemberId}}" name="checkbox[]" class="checkbox-input checkbox{{shopMemberId}}" onclick="CHAT_UI.checkForMakeChat({{shopMemberId}});" {{checked}}>
<span class="checkbox-parts"></span>
</label>
</div>
</div>
<div class="chat_item_l">
<div class="thumbnail">
<div class="img_wrap"><img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/></div>
</div>
</div>
<div class="chat_item_m">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{shopMemberName}}</span>
</div>
</div>
</div>
</div>
</li>
{{/groupUserList}}
</ul>
\ No newline at end of file
<ul class="p-0 chat_make_room_list">
{{#userList}}
<li class="d-flex align-items-center">
<div class="chat_item d-flex flex-row align-items-center w-100" onclick="CHAT_UI.checkForMakeChat({{shopMemberId}});" >
<div class="chat_item_l_chk">
<div class="checkbox">
<label>
<input type="checkbox" id="checkbox{{shopMemberId}}" name="checkbox[]" class="checkbox-input checkbox{{shopMemberId}}" onclick="CHAT_UI.checkForMakeChat({{shopMemberId}});" {{checked}}>
<span class="checkbox-parts"></span>
</label>
</div>
</div>
<div class="chat_item_l">
<div class="thumbnail">
<div class="img_wrap"><img src="{{profileUrl}}" onError="this.src='./img/noImage.png'" /></div>
</div>
</div>
<div class="chat_item_m">
<div class="d-flex flex-column">
<div class="chat_item_t">
<span class="chat_item_ttl">{{shopMemberName}}</span>
</div>
</div>
</div>
</div>
</li>
{{/userList}}
</ul>
\ 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