Commit ce671c08 by Kang Donghun

コード整理

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