Commit eecd5a9f by Lee Munkyeong

#42144

parent 79ee277a
...@@ -47,11 +47,9 @@ ...@@ -47,11 +47,9 @@
<main id="chat"> <main id="chat">
<!-- ユーザー検索 --> <!-- ユーザー検索 -->
<div class="search_form"> <div class="search_form">
<form>
<input type="search" name="search" placeholder="ルーム検索"> <input type="search" name="search" placeholder="ルーム検索">
<span class="src_icon"></span> <span class="src_icon"></span>
<a href="#" class="cancel none">キャンセル</a> <a href="#" class="cancel none">キャンセル</a>
</form>
</div> </div>
<!-- タブ --> <!-- タブ -->
<div class="content tabs"> <div class="content tabs">
......
...@@ -45,11 +45,10 @@ ...@@ -45,11 +45,10 @@
<form id="addUserForm" action="chat_add_user_confirm.html" method="post"> <form id="addUserForm" action="chat_add_user_confirm.html" method="post">
<!-- ユーザー検索 --> <!-- ユーザー検索 -->
<div class="search_form my-2"> <div class="search_form my-2">
<form> <input type="search" name="search" placeholder="ユーザー検索">
<input type="search" name="search" placeholder="ユーザー検索"> <span class="src_icon"></span>
<span class="src_icon"></span> <a href="#" class="cancel none">キャンセル</a>
<a href="#" class="cancel none">キャンセル</a> <input type="input" name="hidden_for_prevent_submit" hidden>
</form>
</div> </div>
<!-- タブ --> <!-- タブ -->
......
...@@ -106,8 +106,8 @@ ...@@ -106,8 +106,8 @@
</div> </div>
</a> </a>
</li> </li>
<div id="childGroupListAreaForMakeRoom"></div> <div id="childGroupListAreaForMakeRoom" class="chat_make_room"></div>
<div id="userInGroupListForMakeRoom"></div> <div id="userInGroupListForMakeRoom" class="chat_make_room"></div>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -177,6 +177,9 @@ input[name="tab_item"] { ...@@ -177,6 +177,9 @@ input[name="tab_item"] {
.chat_list a { .chat_list a {
color: #323743; color: #323743;
} }
.chat_make_room a {
color: #323743;
}
/* タイトル(グループ名、個人名) */ /* タイトル(グループ名、個人名) */
.chat_item_ttl, .chat_item_ttl,
.chat_item_num { .chat_item_num {
......
$(function() { $(function() {
// メンバー検索 // メンバー検索
$('#chat_add_user .search_form input[type="search"]').keyup(function(){ $('#chat_add_user .search_form input[type="search"]').keyup(function(e){
if (e.key == "Enter" || e.KeyCode == 13) {
$('#chat_add_user .search_form input[type="search"]').blur();
return false;
}
var isAllGroup = $('#tabAllGroupOnMakeRoom').is(':checked'); var isAllGroup = $('#tabAllGroupOnMakeRoom').is(':checked');
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
...@@ -51,7 +55,11 @@ $(function() { ...@@ -51,7 +55,11 @@ $(function() {
}); });
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj); $('.overlay_src_msg').append(obj);
if (userList.length == 0 && groupList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
  //連絡先画面   //連絡先画面
} else { } else {
var keyword = $('#chat_add_user .search_form input[type="search"]').val(); var keyword = $('#chat_add_user .search_form input[type="search"]').val();
...@@ -78,6 +86,11 @@ $(function() { ...@@ -78,6 +86,11 @@ $(function() {
}); });
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').html(obj); $('.overlay_src_msg').html(obj);
if (userList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
} }
}); });
}); });
...@@ -1923,10 +1923,8 @@ CHAT_UI.showMakeRoomConfirmView = function() { ...@@ -1923,10 +1923,8 @@ CHAT_UI.showMakeRoomConfirmView = function() {
userNameList.push(user.shopMemberName); userNameList.push(user.shopMemberName);
}) })
//TODO DB作業が終わったら自分のユーザ名を表示するかを判断し、修正予定。
// 参加ユーザ名でルーム名を生成 // 参加ユーザ名でルーム名を生成
let newRoomName = CHAT.globalLoginParameter.loginId + ',' + userNameList.join(','); let newRoomName = CHAT.globalLoginParameter.loginId + ',' + userNameList.join(',');
//todo android create room api
android.createChatRoom("1",userIdList.join(','),newRoomName); android.createChatRoom("1",userIdList.join(','),newRoomName);
} else if(trimmedRoomName.includes(';') || trimmedRoomName.includes('/') || trimmedRoomName.includes('?') || trimmedRoomName.includes(':') || trimmedRoomName.includes("@") } else if(trimmedRoomName.includes(';') || trimmedRoomName.includes('/') || trimmedRoomName.includes('?') || trimmedRoomName.includes(':') || trimmedRoomName.includes("@")
......
...@@ -338,7 +338,13 @@ $(function() { ...@@ -338,7 +338,13 @@ $(function() {
}); });
// チャットメンバー検索 // チャットメンバー検索
$('#chat .search_form input[type="search"]').keyup(function(){ $('#chat .search_form input[type="search"]').keyup(function(e){
if (e.key == "Enter" || e.KeyCode == 13) {
$('#chat .search_form input[type="search"]').blur();
return ;
}
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
var keyword = $('#chat .search_form input[type="search"]').val(); var keyword = $('#chat .search_form input[type="search"]').val();
if (keyword == '' || keyword.length < 2) { return; } if (keyword == '' || keyword.length < 2) { return; }
...@@ -385,25 +391,27 @@ $(function() { ...@@ -385,25 +391,27 @@ $(function() {
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj); $('.overlay_src_msg').append(obj);
}); });
if (rooms.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
if (CHAT_UI.isLandscapeMode()) { if (CHAT_UI.isLandscapeMode()) {
$(".chat_list").removeClass("col-12").addClass("col-6"); $(".chat_list").removeClass("col-12").addClass("col-6");
} }
}); });
// ルームメンバー検索
$('#chat_room .search_form input[type="search"]').keyup(function(){
$.ajax({
url: 'search_message_user_list.html',
type: 'POST',
datatype: 'html'
}).done(function (data) {
$('.overlay_src_msg').html(data);
})
});
// チャットルーム // チャットルーム
// メッセージ検索イベント // メッセージ検索イベント
$('.chat_room_src_form input[type="search"]').keyup(function(){ $('.chat_room_src_form input[type="search"]').keyup(function(e){
if (e.key == "Enter" || e.KeyCode == 13) {
$('.chat_room_src_form input[type="search"]').blur();
return ;
}
let workVal = ""; let workVal = "";
var keyword = $('.chat_room_src_form input[type="search"]').val(); var keyword = $('.chat_room_src_form input[type="search"]').val();
$('.overlay_src_msg').empty(); $('.overlay_src_msg').empty();
...@@ -456,6 +464,11 @@ $(function() { ...@@ -456,6 +464,11 @@ $(function() {
workVal = html + workVal; workVal = html + workVal;
}) })
jQueryMessages.prepend(workVal); jQueryMessages.prepend(workVal);
if (messages.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
jQueryMessages.append(noResultMsg);
}
}); });
$('.filter_img').on('click', function() { $('.filter_img').on('click', function() {
......
...@@ -56,7 +56,11 @@ $(function() { ...@@ -56,7 +56,11 @@ $(function() {
}); });
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj); $('.overlay_src_msg').append(obj);
if (groupList.length == 0 && userList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
  //連絡先画面   //連絡先画面
} else { } else {
var keyword = $('#chatMakeRoom .search_form input[type="search"]').val(); var keyword = $('#chatMakeRoom .search_form input[type="search"]').val();
...@@ -83,6 +87,11 @@ $(function() { ...@@ -83,6 +87,11 @@ $(function() {
}); });
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').html(obj); $('.overlay_src_msg').html(obj);
if (userList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
} }
}); });
}); });
...@@ -48,8 +48,13 @@ $(function () { ...@@ -48,8 +48,13 @@ $(function () {
userList: userList userList: userList
}); });
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').append(obj);
$('.overlay_src_msg').append(obj);
if (userList.length == 0 && groupList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
  //連絡先画面   //連絡先画面
} else { } else {
var keyword = $('#contact .search_form input[type="search"]').val(); var keyword = $('#contact .search_form input[type="search"]').val();
...@@ -70,6 +75,11 @@ $(function () { ...@@ -70,6 +75,11 @@ $(function () {
}); });
let obj = jQuery.parseHTML(html); let obj = jQuery.parseHTML(html);
$('.overlay_src_msg').html(obj); $('.overlay_src_msg').html(obj);
if (userList.length == 0) {
const noResultMsg = $('<div/>',{width:'auto', style:'text-align: center'});
noResultMsg.append(getLocalizedString("noResult"))
$('.overlay_src_msg').append(noResultMsg);
}
} }
}); });
}); });
...@@ -76,5 +76,6 @@ $.lang.en = { ...@@ -76,5 +76,6 @@ $.lang.en = {
"archiveInsertDate":"Save Date", "archiveInsertDate":"Save Date",
"archiveRoomName":"ChatRoom Name", "archiveRoomName":"ChatRoom Name",
"archiveSaveUser":"Save User", "archiveSaveUser":"Save User",
"archiveAttendUser":"Attend User" "archiveAttendUser":"Attend User",
"noResult":"there is no search result."
} }
...@@ -76,5 +76,6 @@ $.lang.ja = { ...@@ -76,5 +76,6 @@ $.lang.ja = {
"archiveInsertDate":"保存日", "archiveInsertDate":"保存日",
"archiveRoomName":"チャットルーム名", "archiveRoomName":"チャットルーム名",
"archiveSaveUser":"保存ユーザー", "archiveSaveUser":"保存ユーザー",
"archiveAttendUser":"参加ユーザー" "archiveAttendUser":"参加ユーザー",
"noResult":"検索結果がありませんでした。"
} }
...@@ -76,5 +76,6 @@ $.lang.ko = { ...@@ -76,5 +76,6 @@ $.lang.ko = {
"archiveInsertDate":"저장 일", "archiveInsertDate":"저장 일",
"archiveRoomName":"대화방 이름", "archiveRoomName":"대화방 이름",
"archiveSaveUser":"저장 사용자", "archiveSaveUser":"저장 사용자",
"archiveAttendUser":"참여자" "archiveAttendUser":"참여자",
"noResult":"검색결과가 존재하지않습니다"
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="chat_item d-flex flex-row align-items-center"> <div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l"> <div class="chat_item_l">
<div class="thumbnail"> <div class="thumbnail">
<div class="img_wrap"><img src="{{profileImagePath}}" onError="this.src='./img/noImage.png'"/></div> <div class="img_wrap"><img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/></div>
</div> </div>
</div> </div>
<div class="chat_item_m px-0"> <div class="chat_item_m px-0">
......
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