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
524917dd
Commit
524917dd
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
merge test
parent
fa2119a4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/views/app/chatWindowDashboard.coffee
+23
-23
23 additions, 23 deletions
client/views/app/chatWindowDashboard.coffee
with
23 additions
and
23 deletions
client/views/app/chatWindowDashboard.coffee
+
23
−
23
View file @
524917dd
...
...
@@ -482,29 +482,29 @@ ChatMessages = (->
resize
()
toBottom
()
if
self
.
scrollable
#
$(".input-message").textcomplete [ {
#
match: /\B:([\-+\w]*)$/
#
search: (term, callback) ->
#
results = []
#
$.each emojione.emojioneList, (shortname, data) ->
#
if shortname.indexOf(term) > -1
#
results.push shortname
#
return
#
if term.length >= 3
#
results.sort (a, b) ->
#
a.length > b.length
#
callback results
#
return
#
template: (shortname) ->
#
length = emojione.emojioneList[shortname].length
#
'<img class="emojione" src="//cdn.jsdelivr.net/emojione/assets/png/' + emojione.emojioneList[shortname][length - 1].toUpperCase() + '.png"> ' + shortname
#
replace: (shortname) ->
#
event.stopPropagation()
#
event.preventDefault()
#
shortname
#
index: 1
#
maxCount: 10
#
} ], footer: '', placement: 'top'
$
(
".input-message"
).
textcomplete
[
{
match
:
/\B:([\-+\w]*)$/
search
:
(
term
,
callback
)
->
results
=
[]
$
.
each
emojione
.
emojioneList
,
(
shortname
,
data
)
->
if
shortname
.
indexOf
(
term
)
>
-
1
results
.
push
shortname
return
if
term
.
length
>=
3
results
.
sort
(
a
,
b
)
->
a
.
length
>
b
.
length
callback
results
return
template
:
(
shortname
)
->
length
=
emojione
.
emojioneList
[
shortname
].
length
'<img class="emojione" src="//cdn.jsdelivr.net/emojione/assets/png/'
+
emojione
.
emojioneList
[
shortname
][
length
-
1
].
toUpperCase
()
+
'.png"> '
+
shortname
replace
:
(
shortname
)
->
event
.
stopPropagation
()
event
.
preventDefault
()
shortname
index
:
1
maxCount
:
10
}
],
footer
:
''
,
placement
:
'top'
return
...
...
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