Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
51874fc0
Commit
51874fc0
authored
Apr 07, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
検索処理修正。
parent
f4dcc293
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
117 additions
and
104 deletions
+117
-104
public_new/contact.html
+1
-1
public_new/js/chat-ui.js
+7
-5
public_new/js/chat.js
+16
-9
public_new/js/chatMakeRoom.js
+13
-11
public_new/js/contact.js
+74
-75
public_new/js/language_en.js
+2
-1
public_new/js/language_ja.js
+2
-1
public_new/js/language_ko.js
+2
-1
No files found.
public_new/contact.html
View file @
51874fc0
...
...
@@ -45,7 +45,7 @@
<main
id=
"contact"
>
<!-- ユーザー検索 -->
<div
class=
"search_form"
>
<input
type=
"search"
name=
"search"
placeholder=
"ユーザー検索"
>
<input
type=
"search"
name=
"search"
id=
"contactSearch"
placeholder=
"ユーザー検索"
>
<span
class=
"src_icon"
></span>
<a
href=
"#"
class=
"cancel none"
>
キャンセル
</a>
</div>
...
...
public_new/js/chat-ui.js
View file @
51874fc0
...
...
@@ -901,6 +901,7 @@ CHAT_UI.refreshContactScreen = function() {
let
contactListTitle
=
getLocalizedString
(
"contactListTitle"
);
$
(
'#title'
).
text
(
contactListTitle
);
// グループの様式を読み込む
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
...
...
@@ -1244,6 +1245,7 @@ $('#tabAllGroup').on('click', function(e) {
});
$
(
'#tabMyGroup'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#contactSearch'
).
attr
(
'placeholder'
,
getLocalizedString
(
'userSearch'
));
CHAT_UI
.
refreshContactScreen
();
});
...
...
@@ -1300,13 +1302,13 @@ CHAT_UI.insertFavoriteUser = function(shopMemberId) {
$
(
'#myNameCard'
).
modal
(
'hide'
);
var
result
=
android
.
addFavoriteUser
(
shopMemberId
);
if
(
!
result
)
{
$
(
'.shopmember_'
+
group
Id
).
addClass
(
'disable'
);
$
(
'.shopmember_'
+
group
Id
).
removeClass
(
'active'
);
$
(
'.shopmember_'
+
shopMember
Id
).
addClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMember
Id
).
removeClass
(
'active'
);
CHAT_UI
.
dismissLoadingIndicator
();
return
;
}
else
{
$
(
'.shopmember_'
+
group
Id
).
removeClass
(
'disable'
);
$
(
'.shopmember_'
+
group
Id
).
addClass
(
'active'
);
$
(
'.shopmember_'
+
shopMember
Id
).
removeClass
(
'disable'
);
$
(
'.shopmember_'
+
shopMember
Id
).
addClass
(
'active'
);
}
CHAT_UI
.
dismissLoadingIndicator
();
};
...
...
@@ -1344,7 +1346,7 @@ CHAT_UI.refreshAllGroupSearch = function(paramGroupId) {
$
(
'.search_form form'
).
removeClass
();
$
(
'.content'
).
removeClass
(
'none'
);
$
(
'.overlay_src_msg'
).
empty
();
$
(
'#contactSearch'
).
attr
(
'placeholder'
,
getLocalizedString
(
'searchUserAndGroup'
));
$
(
'#tabAllGroup'
).
prop
(
'checked'
,
true
);
//オンライン状態であればサーバから情報更新。
...
...
public_new/js/chat.js
View file @
51874fc0
...
...
@@ -339,16 +339,19 @@ $(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
;
var
rooms
;
var
keyword
=
$
(
'#chat .search_form input[type="search"]'
).
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
if
(
keyword
.
length
!=
0
&&
keyword
!=
''
)
{
$
(
'#chat .search_form input[type="search"]'
).
blur
();
return
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
;
}
$
(
'.overlay_src_msg'
).
empty
();
var
keyword
=
$
(
'#chat .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
return
;
}
var
rooms
=
CHAT_DB
.
getRoomList
(
chatRoomType
.
ALL
,
keyword
);
rooms
=
CHAT_DB
.
getRoomList
(
chatRoomType
.
ALL
,
keyword
);
let
roomListTitle
=
getLocalizedString
(
"room_search_placeholder"
);
$
(
'#chatTitle'
).
text
(
roomListTitle
);
var
template
;
...
...
@@ -356,7 +359,6 @@ $(function() {
,
function
(
text
)
{
template
=
text
;
});
rooms
.
forEach
(
function
(
room
)
{
room
.
profileImagePath
=
ASSET_PATH
+
'images/user-profile.png'
if
(
room
.
message
)
{
...
...
@@ -401,6 +403,11 @@ $(function() {
if
(
CHAT_UI
.
isLandscapeMode
())
{
$
(
".chat_list"
).
removeClass
(
"col-12"
).
addClass
(
"col-6"
);
}
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
$
(
'#chat .search_form input[type="search"]'
).
blur
();
return
;
}
});
...
...
public_new/js/chatMakeRoom.js
View file @
51874fc0
...
...
@@ -2,8 +2,14 @@ $(function() {
// メンバー検索
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
keyup
(
function
(
e
)
{
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
e
.
KeyCode
==
13
||
e
.
key
==
"Enter"
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
return
false
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
false
;
}
...
...
@@ -12,11 +18,6 @@ $(function() {
//全グループ検索画面
if
(
isAllGroup
)
{
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
return
;
}
//グループデータ検索
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
...
...
@@ -63,10 +64,6 @@ $(function() {
}
//連絡先画面
}
else
{
var
keyword
=
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
return
;
}
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_make_room_user_list.html"
,
async
:
false
}
...
...
@@ -92,6 +89,11 @@ $(function() {
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
$
(
'.overlay_src_msg'
).
append
(
noResultMsg
);
}
}
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#chatMakeRoom .search_form input[type="search"]'
).
blur
();
return
;
}
});
});
public_new/js/contact.js
View file @
51874fc0
$
(
function
()
{
// メンバー検索
$
(
'#contact .search_form input[type="search"]'
).
keyup
(
function
(
e
){
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
}
// メンバー検索
$
(
'#contact .search_form input[type="search"]'
).
keyup
(
function
(
e
){
var
groupList
;
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
;
}
$
(
'.overlay_src_msg'
).
empty
();
var
isAllGroup
=
$
(
'#tabAllGroup'
).
is
(
':checked'
);
//全グループ検索画面
if
(
isAllGroup
)
{
//グループデータ検索
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
,
function
(
text
)
{
groupTemplate
=
text
;
});
var
isAllGroup
=
$
(
'#tabAllGroup'
).
is
(
':checked'
);
$
(
'.overlay_src_msg'
).
empty
();
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
return
;
}
//全グループ検索画面
if
(
isAllGroup
)
{
//グループデータ検索
var
groupList
=
CHAT_DB
.
getGroupByName
(
keyword
);
var
groupTemplate
;
$
.
get
({
url
:
"./template/template_group_list.html"
,
async
:
false
}
,
function
(
text
)
{
groupTemplate
=
text
;
});
groupList
.
forEach
(
function
(
group
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
group
.
groupName
,
id
:
group
.
groupId
,
isFavorite
:
group
.
isFavorite
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
})
groupList
.
forEach
(
function
(
group
)
{
let
html
=
Mustache
.
render
(
groupTemplate
,
{
name
:
group
.
groupName
,
id
:
group
.
groupId
,
isFavorite
:
group
.
isFavorite
//ユーザデータ検索
var
userList
=
CHAT_DB
.
getAllGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.overlay_src_msg'
).
append
(
obj
);
})
//ユーザデータ検索
var
userList
=
CHAT_DB
.
getAllGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.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
);
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
{
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.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
);
}
}
//連絡先画面
}
else
{
var
keyword
=
$
(
'#contact .search_form input[type="search"]'
).
val
();
if
(
keyword
==
''
)
{
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
}
var
userList
=
CHAT_DB
.
getMyGroupShopMemberByName
(
keyword
);
var
userTemplate
;
$
.
get
({
url
:
"./template/template_user_list.html"
,
async
:
false
}
,
function
(
text
)
{
userTemplate
=
text
;
});
userList
.
forEach
(
function
(
user
)
{
user
.
profileUrl
=
CHAT
.
getProfileImgUrl
(
user
.
profileUrl
);
});
let
html
=
Mustache
.
render
(
userTemplate
,
{
userList
:
userList
});
let
obj
=
jQuery
.
parseHTML
(
html
);
$
(
'.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
);
}
}
});
});
});
public_new/js/language_en.js
View file @
51874fc0
...
...
@@ -77,5 +77,6 @@ $.lang.en = {
"archiveRoomName"
:
"ChatRoom Name"
,
"archiveSaveUser"
:
"Save User"
,
"archiveAttendUser"
:
"Attend User"
,
"noResult"
:
"there is no search result."
"noResult"
:
"there is no search result."
,
"searchUserAndGroup"
:
"search user and group."
}
public_new/js/language_ja.js
View file @
51874fc0
...
...
@@ -77,5 +77,6 @@ $.lang.ja = {
"archiveRoomName"
:
"チャットルーム名"
,
"archiveSaveUser"
:
"保存ユーザー"
,
"archiveAttendUser"
:
"参加ユーザー"
,
"noResult"
:
"検索結果がありませんでした。"
"noResult"
:
"検索結果がありませんでした。"
,
"searchUserAndGroup"
:
"ユーザーとグループ検索"
}
public_new/js/language_ko.js
View file @
51874fc0
...
...
@@ -77,5 +77,6 @@ $.lang.ko = {
"archiveRoomName"
:
"대화방 이름"
,
"archiveSaveUser"
:
"저장 사용자"
,
"archiveAttendUser"
:
"참여자"
,
"noResult"
:
"검색결과가 존재하지않습니다"
"noResult"
:
"검색결과가 존재하지않습니다"
,
"searchUserAndGroup"
:
"유저,그룹 검색"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment