Current conversation is highlited

This commit is contained in:
Pierre 2018-05-16 06:47:41 +02:00
parent 19576cebed
commit ec13b6902b
3 changed files with 17 additions and 7 deletions

View File

@ -7,3 +7,7 @@
.conversations-page-container .conversations-list-box {
max-height: 100%;
}
.conversations-page-container a.selected {
background: #f7f7f7;
}

View File

@ -127,6 +127,10 @@ ComunicWeb.pages.conversations.listPane = {
args.opener(info.ID);
});
//Check if it is the current conversation
if(args.currConvID == info.ID)
convLink.className = " selected";
//Add conversation last activity on the rigth
var lastActivityContainer = createElem2({
appendTo: convLink,

View File

@ -55,21 +55,23 @@ ComunicWeb.pages.conversations.main = {
ComunicWeb.common.page.update_uri("Conversations", "conversations/" + id);
}
//Display the list of conversation
ComunicWeb.pages.conversations.listPane.display(leftArea, {
opener: conversationOpener
});
//Check if a conversation has to be opened
var currConvID = 0;
if(args.subfolder){
//Determine conversation ID
var convID = args.subfolder;
if(convID.includes("/"))
convID = convID.split("/")[0];
currConvID = Number(convID);
//Open the conversation
conversationOpener(Number(convID));
conversationOpener(currConvID);
}
//Display the list of conversation
ComunicWeb.pages.conversations.listPane.display(leftArea, {
opener: conversationOpener,
currConvID: currConvID
});
}
}