Commit 5a808744 by Kang Donghun

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

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