Smiley are parsed in conversation element

This commit is contained in:
Pierre 2017-06-26 10:56:12 +02:00
parent 85b16aec0a
commit 71a1a1b9d1
3 changed files with 12 additions and 2 deletions

View File

@ -69,4 +69,8 @@
*/ */
#conversationsElem .conversation-msg-image { #conversationsElem .conversation-msg-image {
height: 50px; height: 50px;
}
#conversationsElem .direct-chat-text .emoji {
height: 1em;
} }

View File

@ -141,6 +141,7 @@ ComunicWeb.components.conversations.chatWindows = {
class: "form-control", class: "form-control",
placeholder: "New message...", placeholder: "New message...",
}); });
inputText.maxLength = 200;
//Enable textarea 2.0 on the message //Enable textarea 2.0 on the message
var textarea2 = new ComunicWeb.components.textarea(); var textarea2 = new ComunicWeb.components.textarea();
@ -747,7 +748,7 @@ ComunicWeb.components.conversations.chatWindows = {
}); });
//Add text message //Add text message
createElem2({ var textMessage = createElem2({
appendTo: messageTargetElem, appendTo: messageTargetElem,
type: "span", type: "span",
innerHTML: messageInfos.message, innerHTML: messageInfos.message,
@ -774,6 +775,11 @@ ComunicWeb.components.conversations.chatWindows = {
userAccountImage.src = userInfos.accountImage; userAccountImage.src = userInfos.accountImage;
} }
//Parse emojies in text message
ComunicWeb.components.emoji.parser.parse({
element: textMessage,
});
//Enable (again) slimscrool //Enable (again) slimscrool
$(convInfos.box.messagesArea).slimscroll({ $(convInfos.box.messagesArea).slimscroll({
height: "250px", height: "250px",

View File

@ -18,7 +18,7 @@ ComunicWeb.components.emoji.parser = {
* Parse emojies * Parse emojies
* *
* @param {Object} infos Informations about the area to parse * @param {Object} infos Informations about the area to parse
* @info {HTMLElement} element The element to parser * @info {HTMLElement} element The element to parse
* @return {Boolean} True for a success * @return {Boolean} True for a success
*/ */
parse: function(infos){ parse: function(infos){