mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Display conversation unread messages
This commit is contained in:
parent
84264de442
commit
a87a062172
@ -188,6 +188,45 @@ ComunicWeb.components.conversations.unreadDropdown = {
|
||||
class: "img-circle",
|
||||
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>"
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user