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
8d246b62
Commit
8d246b62
authored
9 years ago
by
Gabriel Engel
Browse files
Options
Downloads
Plain Diff
Merge pull request #1278 from RocketChat/bugfix-message-search
Fix tabBar message search
parents
ec1258b6
c0148b9b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/views/app/tabBar/messageSearch.coffee
+11
-6
11 additions, 6 deletions
client/views/app/tabBar/messageSearch.coffee
client/views/app/tabBar/messageSearch.html
+1
-3
1 addition, 3 deletions
client/views/app/tabBar/messageSearch.html
with
12 additions
and
9 deletions
client/views/app/tabBar/messageSearch.coffee
+
11
−
6
View file @
8d246b62
Template
.
messageSearch
.
helpers
Template
.
messageSearch
.
helpers
tSearchMessages
:
->
tSearchMessages
:
->
return
t
(
'Search_Messages'
)
return
t
(
'Search_Messages'
)
searchResult
:
->
searchResult
Messages
:
->
return
Template
.
instance
().
searchResult
.
get
()
return
Template
.
instance
().
searchResult
.
get
()
?
.
messages
Template
.
messageSearch
.
events
Template
.
messageSearch
.
events
"keydown #message-search"
:
(
e
)
->
"keydown #message-search"
:
(
e
)
->
...
@@ -11,16 +11,21 @@ Template.messageSearch.events
...
@@ -11,16 +11,21 @@ Template.messageSearch.events
e
.
preventDefault
()
e
.
preventDefault
()
"keyup #message-search"
:
_
.
debounce
(
e
,
t
)
->
"keyup #message-search"
:
_
.
debounce
(
e
,
t
)
->
t
.
searchResult
.
set
undefined
value
=
e
.
target
.
value
.
trim
()
value
=
e
.
target
.
value
.
trim
()
if
value
is
''
if
value
is
''
and
t
.
currentSearchTerm
t
.
currentSearchTerm
=
''
t
.
searchResult
.
set
undefined
return
else
if
value
is
t
.
currentSearchTerm
return
return
Tracker
.
nonreactive
->
Tracker
.
nonreactive
->
Meteor
.
call
'messageSearch'
,
value
,
Session
.
get
(
'openedRoom'
),
(
error
,
result
)
->
Meteor
.
call
'messageSearch'
,
value
,
Session
.
get
(
'openedRoom'
),
(
error
,
result
)
->
if
result
?
and
(
result
.
messages
?
.
length
>
0
or
result
.
users
?
.
length
>
0
or
result
.
channels
?
.
length
>
0
)
if
result
?
and
(
result
.
messages
?
.
length
>
0
or
result
.
users
?
.
length
>
0
or
result
.
channels
?
.
length
>
0
)
t
.
searchResult
.
set
result
t
.
searchResult
.
set
result
,
1000
t
.
currentSearchTerm
=
value
,
500
Template
.
messageSearch
.
onCreated
->
Template
.
messageSearch
.
onCreated
->
this
.
currentSearchTerm
=
''
this
.
searchResult
=
new
ReactiveVar
this
.
searchResult
=
new
ReactiveVar
This diff is collapsed.
Click to expand it.
client/views/app/tabBar/messageSearch.html
+
1
−
3
View file @
8d246b62
...
@@ -8,12 +8,10 @@
...
@@ -8,12 +8,10 @@
</div>
</div>
</form>
</form>
</div>
</div>
{{#if searchResult.messages}}
<ul>
<ul>
{{#each searchResult
.m
essages}}
{{#each searchResult
M
essages}}
{{#nrr nrrargs 'message' .}}{{/nrr}}
{{#nrr nrrargs 'message' .}}{{/nrr}}
{{/each}}
{{/each}}
</ul>
</ul>
{{/if}}
</div>
</div>
</template>
</template>
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