Commit 4ea50de9 authored by JC Brand's avatar JC Brand

Use `emoji` instead of `emoticon`

parent a65b319d
This diff is collapsed.
......@@ -14,7 +14,7 @@
chatview_avatar_height: 32,
auto_join_rooms: [],
visible_toolbar_buttons: {
'emoticons': true,
'emojis': true,
'call': false,
'clear': true,
'toggle_occupants': true
......@@ -31,7 +31,7 @@
'anonymous@conference.nomnom.im',
],
visible_toolbar_buttons: {
'emoticons': false,
'emojis': false,
'call': false,
'toggle_occupants':false,
'invalid': false
......@@ -44,7 +44,7 @@
expect(context.chatview_avatar_width).toBe(32);
expect(context.chatview_avatar_height).toBe(48);
expect(_.keys(context.visible_toolbar_buttons)).toEqual(_.keys(settings.visible_toolbar_buttons));
expect(context.visible_toolbar_buttons.emoticons).toBeFalsy();
expect(context.visible_toolbar_buttons.emojis).toBeFalsy();
expect(context.visible_toolbar_buttons.call).toBeFalsy();
expect(context.visible_toolbar_buttons.toggle_occupants).toBeFalsy();
expect(context.visible_toolbar_buttons.invalid).toBeFalsy();
......
......@@ -153,8 +153,8 @@
'click .close-chatbox-button': 'close',
'keypress .chat-textarea': 'keyPressed',
'click .send-button': 'onSendButtonClicked',
'click .toggle-smiley': 'toggleEmoticonMenu',
'click .toggle-smiley ul.emoji-picker li': 'insertEmoticon',
'click .toggle-smiley': 'toggleEmojiMenu',
'click .toggle-smiley ul.emoji-picker li': 'insertEmoji',
'click .toggle-clear': 'clearMessages',
'click .toggle-call': 'toggleCall',
'click .new-msgs-indicator': 'viewUnreadMessages'
......@@ -689,19 +689,19 @@
$textbox.focus().val(existing+value+' ');
},
insertEmoticon (ev) {
insertEmoji (ev) {
ev.stopPropagation();
this.toggleEmoticonMenu();
this.toggleEmojiMenu();
const target = ev.target.nodeName === 'IMG' ?
ev.target.parentElement : ev.target;
var shortname = target.getAttribute('data-emoticon');
var shortname = target.getAttribute('data-emoji');
this.insertIntoTextArea(
emojione.shortnameToUnicode(shortname)
);
},
toggleEmoticonMenu (ev) {
toggleEmojiMenu (ev) {
if (!_.isUndefined(ev)) {
ev.stopPropagation();
if (ev.target.classList.contains('emoji-category-picker') ||
......
......@@ -422,8 +422,8 @@
events: {
'click .close-chatbox-button': 'close',
'click .configure-chatroom-button': 'getAndRenderConfigurationForm',
'click .toggle-smiley': 'toggleEmoticonMenu',
'click .toggle-smiley ul.emoji-picker li': 'insertEmoticon',
'click .toggle-smiley': 'toggleEmojiMenu',
'click .toggle-smiley ul.emoji-picker li': 'insertEmoji',
'click .toggle-clear': 'clearChatRoomMessages',
'click .toggle-call': 'toggleCall',
'click .toggle-occupants a': 'toggleOccupants',
......
{[ _.forEach(emojis_by_category, function (obj, category) { ]}
<ul class="emoji-picker emoji-picker-{{{category}}} {[ if (current_category !== category) { ]} hidden {[ } ]}">
{[ _.forEach(emojis_by_category[category], function (emoji) { ]}
<li class="emoji" data-emoticon="{{{emoji._shortname}}}">
<a href="#" data-emoticon="{{{emoji._shortname}}}"> {{ emojione.shortnameToUnicode(emoji._shortname) }} </a>
<li class="emoji" data-emoji="{{{emoji._shortname}}}">
<a href="#" data-emoji="{{{emoji._shortname}}}"> {{ emojione.shortnameToUnicode(emoji._shortname) }} </a>
</li>
{[ }); ]}
</ul>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment