|
114 | 114 | buttonTitle = user.isConnected ? '{{ 'StartAChat'|get_lang }}' : '{{ 'LeaveAMessage'|get_lang }}';
|
115 | 115 |
|
116 | 116 | html += '<li class="col-xs-12">' +
|
117 |
| - ' <div class="chat-user" data-name="' + user.complete_name + '" data-user="' + user.id + '">' + |
| 117 | + ' <div class="chat-user" data-name="' + user.complete_name + '" data-user="' + user.user_id + '">' + |
118 | 118 | ' <img src="' + user.image_url + '" alt="' + user.complete_name + '" class="img-circle user-image-chat"/>' +
|
119 | 119 | ' <ul class="list-unstyled">' +
|
120 | 120 | ' <li>' + user.complete_name;
|
121 | 121 |
|
122 |
| - if (user.id != {{ user.id }}) { |
123 |
| - html += ' <button type="button" class="btn btn-link btn-xs" title="' + buttonTitle + '" data-name="' + user.complete_name + '" data-user="' + user.id + '">' + |
| 122 | + if (user.user_id != {{ user.user_id }}) { |
| 123 | + html += ' <button type="button" class="btn btn-link btn-xs" title="' + buttonTitle + '" data-name="' + user.complete_name + '" data-user="' + user.user_id + '">' + |
124 | 124 | ' <i class="fa fa-comments text-' + buttonStatus + '"></i><span class="sr-only">' + buttonTitle + '</span>' +
|
125 | 125 | ' </button>';
|
126 | 126 | }
|
|
209 | 209 | $('[data-toggle="tab"][href="#tab1"]').show().tab('show');
|
210 | 210 | });
|
211 | 211 |
|
212 |
| - /*$('textarea#chat-writer').emojiarea({ |
213 |
| - button: '#emojis' |
214 |
| - });*/ |
215 |
| -
|
216 |
| - /*$('body').delay(1500).find('.emoji-wysiwyg-editor').textcomplete([{ |
217 |
| - match: /\B:([\-+\w]*)$/, |
218 |
| - search: function (term, callback) { |
219 |
| - var results = []; |
220 |
| - var results2 = []; |
221 |
| - var results3 = []; |
222 |
| - $.each(emojiStrategy, function (shortname, data) { |
223 |
| - if (shortname.indexOf(term) > -1) { |
224 |
| - results.push(shortname); |
225 |
| - } else { |
226 |
| - if ((data.aliases !== null) && (data.aliases.indexOf(term) > -1)) { |
227 |
| - results2.push(shortname); |
228 |
| - } else if ((data.keywords !== null) && (data.keywords.indexOf(term) > -1)) { |
229 |
| - results3.push(shortname); |
230 |
| - } |
231 |
| - } |
232 |
| - }); |
233 |
| -
|
234 |
| - if (term.length >= 3) { |
235 |
| - results.sort(function (a, b) { |
236 |
| - return (a.length > b.length); |
237 |
| - }); |
238 |
| - results2.sort(function (a, b) { |
239 |
| - return (a.length > b.length); |
240 |
| - }); |
241 |
| - results3.sort(); |
242 |
| - } |
243 |
| -
|
244 |
| - var newResults = results.concat(results2).concat(results3); |
245 |
| - callback(newResults); |
246 |
| - }, |
247 |
| - template: function (shortname) { |
248 |
| - return '<img class="emojione" src="{{ _p.web_lib }}javascript/emojione/png/' |
249 |
| - + emojiStrategy[shortname].unicode |
250 |
| - + '.png"> :' + shortname + ':'; |
251 |
| - }, |
252 |
| - replace: function (shortname) { |
253 |
| - return ':' + shortname + ': '; |
254 |
| - }, |
255 |
| - index: 1, |
256 |
| - maxCount: 10 |
257 |
| - }], {}); |
258 |
| -*/ |
259 | 212 | $('button#chat-send-message').on('click', ChChat.onSendMessageListener);
|
260 | 213 | $('#chat-users').on('click', 'div.chat-user', function (e) {
|
261 | 214 | e.preventDefault();
|
|
0 commit comments