Display conversation unread messages

This commit is contained in:
Pierre 2018-02-25 18:24:19 +01:00
parent 84264de442
commit a87a062172

View File

@ -188,6 +188,45 @@ ComunicWeb.components.conversations.unreadDropdown = {
class: "img-circle", class: "img-circle",
src: userInfos.accountImage src: userInfos.accountImage
}); });
//Add item top informations
var liTop = createElem2({
appendTo: convLink,
type: "h4",
innerHTML: userFullName(userInfos)
});
//Add item top small informations
var liTopSmall = createElem2({
appendTo: liTop,
type: "small"
});
//Add the message post time
var conversationLastActive = createElem2({
appendTo: liTopSmall,
type: "span",
innerHTML: '<i class="fa fa-clock-o"></i> ' + ComunicWeb.common.date.timeDiffToStr(conversation.last_active) + " ago"
});
//Add conversation name (if available)
if(conversation.conv_name != ""){
var targetConversation = createElem2({
appendTo: convLink,
type: "p",
innerHTML: conversation.conv_name,
});
}
//Add the message
var conversationMessage = createElem2({
appendTo: convLink,
type: "p",
innerHTML: "<em>"+conversation.message+"</em>"
})
} }
}, },