Commit 26e3dd3e by Lee Munkyeong

スクリプト共通化不具合対応。

parent 5e05ce42
......@@ -19,17 +19,17 @@ CHAT_ADD_USER.searchUser = function (keyword) {
if (isAllGroup) {
//グループデータ検索
const groupList = CHAT_DB.getGroupByName(keyword);
searchGroupData(groupList);
searchGroupData(groupList, overlayMessage);
//ユーザデータ検索
var userList = CHAT_DB.getAllGroupShopMemberNotInRoomByName(keyword);
searchUserData(userList);
searchUserData(userList, overlayMessage);
hasNoData = userList.length == 0 && groupList.length == 0;
//連絡先画面
} else {
var userList = CHAT_DB.getMyGroupShopMemberNotInRoomByName(keyword);
searchUserData(userList);
searchUserData(userList, overlayMessage);
hasNoData = userList.length == 0;
}
// Set NoResult
......@@ -84,7 +84,7 @@ var bindiOSKeyBoardEvent = function () {
});
};
var searchGroupData = function (groupList) {
var searchGroupData = function (groupList, overlayMessage) {
const groupTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
groupList.forEach(function (group) {
......@@ -106,8 +106,8 @@ var renderGroupTemplate = function (groupTemplate, groupName, groupID) {
});
};
var searchUserData = function (userList) {
const userTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
var searchUserData = function (userList, overlayMessage) {
const userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
userList.forEach(function (user) {
setUserProfile(user);
checkUser(user);
......
......@@ -23,8 +23,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
var groupTemplate = getTemplate(TemplateURL.MAKE_ROOM_GROUP_LIST);
groupList.forEach(function (group) {
renderRoomList(groupTemplate, group.groupName, group.groupId);
let html = renderRoomList(groupTemplate, group.groupName, group.groupId);
let obj = jQuery.parseHTML(html);
overlayMessage.append(obj);
});
......@@ -40,7 +39,7 @@ CHAT_MAKE_ROOM.searchUser = function (keyword) {
//連絡先画面
} else {
const userList = CHAT_DB.getMyGroupShopMemberByName(keyword);
searchUserData();
searchUserData(userList);
var userTemplate = getTemplate(TemplateURL.MAKE_ROOM_USER_LIST);
let html = renderUser(userTemplate, userList);
let obj = jQuery.parseHTML(html);
......@@ -64,11 +63,11 @@ var searchMember = function () {
$("#makeRoomTitle").text(contactListTitle);
});
searchInput.keyup(function (e) {
var keyword = searchInput.val();
const enterKeyPressed = e.KeyCode == 13 || e.key == "Enter";
const keywordEmpty = keyword == "" || keyword.length < 2;
const keywordNotEmpty = keyword != "" && keyword.length != 0;
//画面タイトル設定
var keyword = searchInput.val();
if (enterKeyPressed) {
if (keywordNotEmpty) {
searchInput.blur();
......
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