diff --git a/.meteor/packages b/.meteor/packages
index 3000d6891194e..6c24e6b6b13b8 100644
--- a/.meteor/packages
+++ b/.meteor/packages
@@ -29,7 +29,6 @@ mizzao:autocomplete
mizzao:timesync
momentjs:moment
monbro:mongodb-mapreduce-aggregation
-mquandalle:jquery-textcomplete
mrt:mask
mrt:publish-with-relations
mrt:reactive-store
diff --git a/.meteor/versions b/.meteor/versions
index ceea9ad8c2cb7..e236a7e228569 100644
--- a/.meteor/versions
+++ b/.meteor/versions
@@ -70,7 +70,6 @@ momentjs:moment@2.10.3
monbro:mongodb-mapreduce-aggregation@1.0.1
mongo@1.1.0
mongo-livedata@1.0.8
-mquandalle:jquery-textcomplete@0.3.9_1
mrt:mask@0.0.1
mrt:publish-with-relations@0.1.5
mrt:reactive-store@0.0.1
diff --git a/client/lib/chatMessages.coffee b/client/lib/chatMessages.coffee
index e629788741aac..9b9cedfa340c1 100644
--- a/client/lib/chatMessages.coffee
+++ b/client/lib/chatMessages.coffee
@@ -12,30 +12,6 @@
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
- '
' + shortname
- replace: (shortname) ->
- event.stopPropagation()
- event.preventDefault()
- shortname
- index: 1
- maxCount: 10
- } ], footer: '', placement: 'top'
-
return
isScrollable = ->
diff --git a/client/stylesheets/base.less b/client/stylesheets/base.less
index 5ef8480de5d96..7f2ef6c98b44a 100644
--- a/client/stylesheets/base.less
+++ b/client/stylesheets/base.less
@@ -1411,6 +1411,32 @@ a.github-fork {
left: 0;
width: 100%;
}
+ .message-popup {
+ position: absolute;
+ background: #FFF;
+ border: 1px solid #DDD;
+ z-index: 101;
+ bottom: 61px;
+ left: 20px;
+ right: 20px;
+ box-shadow: 0px 0px 10px #DDD;
+ border-radius: 5px 5px 0 0;
+ overflow: hidden;
+ .message-popup-title {
+ background-color: #FAFAFA;
+ border-bottom: 1px solid #EEE;
+ padding: 6px;
+ }
+ .popup-item {
+ padding: 6px;
+ border-bottom: 1px solid #fff;
+ &.selected {
+ background-color: #439ee1;
+ border-color: #2b80ba;
+ color: white;
+ }
+ }
+ }
.message-form {
> div {
position: relative;
diff --git a/client/views/app/chatWindowDashboard.coffee b/client/views/app/chatWindowDashboard.coffee
index 3cf198ca4d9d0..e0a99e2aad82b 100644
--- a/client/views/app/chatWindowDashboard.coffee
+++ b/client/views/app/chatWindowDashboard.coffee
@@ -250,6 +250,49 @@ Template.chatWindowDashboard.helpers
else
return t('chatWindowDashboard.See_all')
+ popupConfig: ->
+ template = Template.instance()
+ config =
+ title: 'People'
+ collection: Meteor.users
+ template: 'messagePopupUser'
+ getInput: ->
+ return template.find('.input-message')
+ getFilter: (collection, filter) ->
+ return collection.find name: new RegExp(filter, 'i')
+
+ return config
+
+ popupEmojiConfig: ->
+ template = Template.instance()
+ config =
+ title: 'Emoji'
+ collection: emojione.emojioneList
+ template: 'messagePopupEmoji'
+ trigger: ':'
+ prefix: ''
+ getInput: ->
+ return template.find('.input-message')
+ getFilter: (collection, filter) ->
+ results = []
+ for shortname, data of collection
+ if shortname.indexOf(filter) > -1
+ results.push
+ _id: shortname
+ data: data
+
+ if results.length > 10
+ break
+
+ if filter.length >= 3
+ results.sort (a, b) ->
+ a.length > b.length
+
+ return results
+
+ return config
+
+
Template.chatWindowDashboard.events
"click .flex-tab .more": (event) ->
Session.set('flexOpened', !Session.get('flexOpened'))
@@ -279,7 +322,7 @@ Template.chatWindowDashboard.events
'keydown .input-message': (event) ->
console.log 'chatWindowDashboard.keydown.input-message',this._id if window.rocketDebug
- ChatMessages.keydown(this._id, event)
+ ChatMessages.keydown(this._id, event, Template.instance())
'keydown .input-message-editing': (event) ->
console.log 'chatWindowDashboard.keydown.input-message-editing',this._id if window.rocketDebug
diff --git a/client/views/app/chatWindowDashboard.html b/client/views/app/chatWindowDashboard.html
index 75cc7884cba89..3563d8c035635 100644
--- a/client/views/app/chatWindowDashboard.html
+++ b/client/views/app/chatWindowDashboard.html
@@ -53,6 +53,8 @@