Commit ce671c08 by Kang Donghun

コード整理

parent c7b44b83
...@@ -1658,10 +1658,11 @@ CHAT_UI.checkForMakeChat = function(checkMemberId) { ...@@ -1658,10 +1658,11 @@ CHAT_UI.checkForMakeChat = function(checkMemberId) {
// add // add
CHAT.globalSelectedUserList.push(nameInfo.shopMemberId); CHAT.globalSelectedUserList.push(nameInfo.shopMemberId);
} }
if($('#checkbox' + checkMemberId).prop('checked')){
$('#checkbox' + checkMemberId).attr('checked', true); if($('.checkbox' + checkMemberId).prop('checked')){
$('.checkbox' + checkMemberId).attr('checked', true);
}else{ }else{
$('#checkbox' + checkMemberId).removeAttr('checked'); $('.checkbox' + checkMemberId).removeAttr('checked');
} }
let cnt = CHAT.globalSelectedUserList.length; let cnt = CHAT.globalSelectedUserList.length;
if (CHAT.globalSelectedUserList.length > 0) { if (CHAT.globalSelectedUserList.length > 0) {
......
...@@ -40,10 +40,10 @@ $(function() { ...@@ -40,10 +40,10 @@ $(function() {
userList.forEach(function(user) { userList.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
let findObj = CHAT.globalSelectedUserList.find(function(shopMemberId) { let findObj = CHAT.globalSelectedUserList.find(function(shopMemberId) {
return shopMemberId == groupUser.shopMemberId; return shopMemberId == user.shopMemberId;
}) })
if (findObj) { if (findObj) {
groupUser.checked = 'checked'; user.checked = 'checked';
} }
}); });
let html = Mustache.render(userTemplate, { let html = Mustache.render(userTemplate, {
...@@ -67,10 +67,10 @@ $(function() { ...@@ -67,10 +67,10 @@ $(function() {
userList.forEach(function(user) { userList.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
let findObj = CHAT.globalSelectedUserList.find(function(shopMemberId) { let findObj = CHAT.globalSelectedUserList.find(function(shopMemberId) {
return shopMemberId == groupUser.shopMemberId; return shopMemberId == user.shopMemberId;
}) })
if (findObj) { if (findObj) {
groupUser.checked = 'checked'; user.checked = 'checked';
} }
}); });
let html = Mustache.render(userTemplate, { let html = Mustache.render(userTemplate, {
......
...@@ -49,7 +49,6 @@ $(function() { ...@@ -49,7 +49,6 @@ $(function() {
$('.content').removeClass('none'); $('.content').removeClass('none');
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
}); });
$('.message_input_form').click(function(){ $('.message_input_form').click(function(){
console.log('ONCLICK---'); console.log('ONCLICK---');
$('.message_input_send').removeClass('none'); $('.message_input_send').removeClass('none');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,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