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

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

View File

@ -127,6 +127,10 @@ ComunicWeb.pages.conversations.listPane = {
args.opener(info.ID); 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 //Add conversation last activity on the rigth
var lastActivityContainer = createElem2({ var lastActivityContainer = createElem2({
appendTo: convLink, appendTo: convLink,

View File

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