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
7f83361b
Commit
7f83361b
authored
Apr 07, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
メッセージ検索
parent
51874fc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
public_new/chat_room.html
+2
-2
public_new/js/chat.js
+13
-6
No files found.
public_new/chat_room.html
View file @
7f83361b
...
...
@@ -21,11 +21,11 @@
<!-- ナビメニュー -->
<nav>
<div
class=
"chat_room_src_form none"
>
<
form
class=
"d-flex flex-row h-100 align-items-center"
>
<
div
class=
"d-flex flex-row h-100 align-items-center"
>
<input
type=
"search"
name=
"search"
placeholder=
"ユーザー検索"
>
<span
class=
"src_icon"
></span>
<a
href=
"#"
class=
"cancel"
>
キャンセル
</a>
</
form
>
</
div
>
</div>
<div
class=
"row nav_item_wrap h-100 align-items-center"
>
<div
class=
"col-4 pr-0"
>
...
...
public_new/js/chat.js
View file @
7f83361b
...
...
@@ -414,20 +414,23 @@ $(function() {
// チャットルーム
// メッセージ検索イベント
$
(
'.chat_room_src_form input[type="search"]'
).
keyup
(
function
(
e
){
var
keyword
=
$
(
'.chat_room_src_form input[type="search"]'
).
val
();
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'.chat_room_src_form input[type="search"]'
).
blur
();
return
;
if
(
keyword
!=
''
&&
keyword
.
length
!=
0
)
{
$
(
'.chat_room_src_form input[type="search"]'
).
blur
();
return
;
}
}
else
if
(
keyword
==
''
||
keyword
.
length
<
2
)
{
$
(
'.overlay_src_msg'
).
empty
();
return
;
}
let
workVal
=
""
;
var
keyword
=
$
(
'.chat_room_src_form input[type="search"]'
).
val
();
$
(
'.overlay_src_msg'
).
empty
();
var
checkedUserList
=
[];
$
(
'.img_wrap.filter'
).
each
(
function
(
user
)
{
var
selectedUser
=
$
(
'.img_wrap.filter'
)[
user
];
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
'user-id'
));
})
if
(
keyword
.
length
<
2
)
{
return
;
}
var
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
','
));
var
userMessageTemplate
;
$
.
get
({
url
:
"./template/template_user_message.html"
,
async
:
false
}
...
...
@@ -476,6 +479,10 @@ $(function() {
noResultMsg
.
append
(
getLocalizedString
(
"noResult"
))
jQueryMessages
.
append
(
noResultMsg
);
}
if
(
e
.
key
==
"Enter"
||
e
.
KeyCode
==
13
)
{
$
(
'#contact .search_form input[type="search"]'
).
blur
();
return
;
}
});
$
(
'.filter_img'
).
on
(
'click'
,
function
()
{
...
...
@@ -487,7 +494,7 @@ $(function() {
var
selectedUser
=
$
(
'.img_wrap.filter'
)[
user
];
checkedUserList
.
push
(
$
(
selectedUser
).
data
(
'user-id'
));
})
if
(
keyword
.
length
<
2
)
{
return
;
}
if
(
keyword
.
length
==
1
)
{
return
;
}
var
messages
=
CHAT_DB
.
searchMessages
(
keyword
,
checkedUserList
.
join
(
','
));
var
userMessageTemplate
;
$
.
get
({
url
:
"./template/template_user_message.html"
,
async
:
false
}
...
...
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