mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-23 04:29:21 +00:00
Made conversations list lives
This commit is contained in:
parent
cc296c2bac
commit
78df5455c3
@ -223,7 +223,7 @@ ComunicWeb.components.conversations.list = {
|
|||||||
var liElem = createElem("li", ulElem);
|
var liElem = createElem("li", ulElem);
|
||||||
|
|
||||||
//Display entry
|
//Display entry
|
||||||
ComunicWeb.components.conversations.list.showConversationEntry(conversationInfos, liElem);
|
ComunicWeb.components.conversations.list.showConversationEntry(conversationInfos, liElem, listBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, true);
|
}, true);
|
||||||
@ -237,15 +237,22 @@ ComunicWeb.components.conversations.list = {
|
|||||||
*
|
*
|
||||||
* @param {Object} conversationInfos Informations about the conversation
|
* @param {Object} conversationInfos Informations about the conversation
|
||||||
* @param {HTMLElement} entryTarget The target for the entry
|
* @param {HTMLElement} entryTarget The target for the entry
|
||||||
|
* @param {Object} listBox HTML elements about the listBox
|
||||||
* @return {Boolean} True for a success
|
* @return {Boolean} True for a success
|
||||||
*/
|
*/
|
||||||
showConversationEntry: function(conversationInfos, entryTarget){
|
showConversationEntry: function(conversationInfos, entryTarget, listBox){
|
||||||
|
|
||||||
//Create link element
|
//Create link element
|
||||||
var linkElem = createElem("a", entryTarget);
|
var linkElem = createElem("a", entryTarget);
|
||||||
|
|
||||||
console.log(conversationInfos); //DEBUG - temporary
|
//Make the link element live
|
||||||
|
linkElem.onclick = function(){
|
||||||
|
//Remove conversations list
|
||||||
|
listBox.rootElem.remove();
|
||||||
|
|
||||||
|
//Show conversation
|
||||||
|
console.log("Open conversation ID: " + conversationInfos.ID);
|
||||||
|
}
|
||||||
|
|
||||||
//Add conversations last activity
|
//Add conversations last activity
|
||||||
var lastActivityElem = createElem("small", linkElem);
|
var lastActivityElem = createElem("small", linkElem);
|
||||||
|
Loading…
Reference in New Issue
Block a user