Commit 5a808744 by Kang Donghun

検索画面でチェックロジック修正

parent 5ac1daad
......@@ -111,7 +111,7 @@
</div>
</div>
<div class="chat_make_room">
<ul class="overlay_src_msg">
<ul class="overlay_src_msg" style="padding-inline-start: 20px;">
</ul>
</div>
......
......@@ -1826,7 +1826,6 @@ CHAT_UI.refreshAllGroupForMakeRoom = function(groupId) {
};
CHAT_UI.checkForMakeChat = function(checkMemberId) {
var nameInfo = CHAT_DB.getNameCardData(checkMemberId);
let findObj = CHAT.globalSelectedUserList.find(function(shopMemberId) {
return shopMemberId == checkMemberId;
})
......@@ -1837,13 +1836,12 @@ CHAT_UI.checkForMakeChat = function(checkMemberId) {
});
} else {
// add
CHAT.globalSelectedUserList.push(nameInfo.shopMemberId);
CHAT.globalSelectedUserList.push(checkMemberId);
}
if($('.checkbox' + checkMemberId).prop('checked')){
$('.checkbox' + checkMemberId).attr('checked', true);
}else{
$('.checkbox' + checkMemberId).removeAttr('checked');
}else{
$('.checkbox' + checkMemberId).attr('checked', true);
}
let cnt = CHAT.globalSelectedUserList.length;
if (CHAT.globalSelectedUserList.length > 0) {
......@@ -1864,7 +1862,6 @@ CHAT_UI.showMakeRoomConfirmView = function() {
var selectedUserList = CHAT_DB.loadSelectedUsers();
console.log("check = " + selectedUserList);
selectedUserList.forEach(function(user){
let html = Mustache.render(userTemplate, {
id: user.shopMemberId,
......
......@@ -326,15 +326,6 @@ $(function() {
let roomListTitle = getLocalizedString("roomListTitle");
$('#chatTitle').text(roomListTitle);
});
$('#chatMakeRoom .search_form .cancel').click(function(){
CHAT.globalSelectedUserList.forEach(function(userId) {
if ($('.checkbox' + userId).prop('checked')) {
$('.checkbox' + checkMemberId).attr('checked', true);
} else {
$('.checkbox' + checkMemberId).removeAttr('checked');
}
});
});
// チャットメンバー検索
$('#chat .search_form input[type="search"]').keyup(function(){
......
......@@ -6,7 +6,7 @@
<div class="chat_item_l_chk">
<div class="checkbox">
<label>
<input type="checkbox" id="checkbox{{shopMemberId}}" name="checkbox[]" class="checkbox-input" onchange="CHAT_UI.checkForMakeChat({{shopMemberId}});" {{checked}}>
<input type="checkbox" id="checkbox{{shopMemberId}}" name="checkbox[]" class="checkbox-input checkbox{{shopMemberId}}" onchange="CHAT_UI.checkForMakeChat({{shopMemberId}});" {{checked}}>
<span class="checkbox-parts"></span>
</label>
</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