Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
d87ba046
Commit
d87ba046
authored
9 years ago
by
Aaron Ogle
Browse files
Options
Downloads
Patches
Plain Diff
Modified find for autocomplete to show usernames that begin with what you type
parent
067bbd57
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/views/app/messagePopupConfig.coffee
+2
-3
2 additions, 3 deletions
client/views/app/messagePopupConfig.coffee
with
2 additions
and
3 deletions
client/views/app/messagePopupConfig.coffee
+
2
−
3
View file @
d87ba046
...
@@ -11,7 +11,7 @@ Template.messagePopupConfig.helpers
...
@@ -11,7 +11,7 @@ Template.messagePopupConfig.helpers
getInput
:
self
.
getInput
getInput
:
self
.
getInput
textFilterDelay
:
200
textFilterDelay
:
200
getFilter
:
(
collection
,
filter
)
->
getFilter
:
(
collection
,
filter
)
->
exp
=
new
RegExp
(
filter
,
'i'
)
exp
=
new
RegExp
(
"^
#{
filter
}
"
,
'i'
)
Meteor
.
subscribe
'onlineUsers'
,
filter
Meteor
.
subscribe
'onlineUsers'
,
filter
items
=
onlineUsers
.
find
({
$or
:
[{
name
:
exp
},
{
username
:
exp
}]},
{
limit
:
5
}).
fetch
()
items
=
onlineUsers
.
find
({
$or
:
[{
name
:
exp
},
{
username
:
exp
}]},
{
limit
:
5
}).
fetch
()
...
@@ -25,7 +25,6 @@ Template.messagePopupConfig.helpers
...
@@ -25,7 +25,6 @@ Template.messagePopupConfig.helpers
exp
=
new
RegExp
(
"(^|
\\
s)
#{
filter
}
"
,
'i'
)
exp
=
new
RegExp
(
"(^|
\\
s)
#{
filter
}
"
,
'i'
)
if
exp
.
test
(
all
.
username
)
or
exp
.
test
(
all
.
compatibility
)
if
exp
.
test
(
all
.
username
)
or
exp
.
test
(
all
.
compatibility
)
items
.
unshift
all
items
.
unshift
all
return
items
return
items
getValue
:
(
_id
,
collection
,
firstPartValue
)
->
getValue
:
(
_id
,
collection
,
firstPartValue
)
->
...
@@ -121,4 +120,4 @@ Template.messagePopupConfig.helpers
...
@@ -121,4 +120,4 @@ Template.messagePopupConfig.helpers
return
results
return
results
return
config
return
config
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment