mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Made conversation notifications lives
This commit is contained in:
		@@ -101,3 +101,14 @@ function getMultipleUsersInfos(usersID, afterGetUserInfos, forceRequest){
 | 
				
			|||||||
function log(message){
 | 
					function log(message){
 | 
				
			||||||
    ComunicWeb.debug.logMessage(message);
 | 
					    ComunicWeb.debug.logMessage(message);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Open a conversation specified by its ID
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * @param {number} id The ID of the conversation to open
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function openConversation(id){
 | 
				
			||||||
 | 
					    ComunicWeb.components.conversations.manager.addConversation({
 | 
				
			||||||
 | 
					        conversationID: id
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -173,6 +173,7 @@ ComunicWeb.components.conversations.unreadDropdown = {
 | 
				
			|||||||
				type: "a",
 | 
									type: "a",
 | 
				
			||||||
				href: "#"
 | 
									href: "#"
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
 | 
								convLink.setAttribute("data-conversation-id", conversation.id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//Add left elements
 | 
								//Add left elements
 | 
				
			||||||
			var leftElems = createElem2({
 | 
								var leftElems = createElem2({
 | 
				
			||||||
@@ -220,13 +221,17 @@ ComunicWeb.components.conversations.unreadDropdown = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
			//Add the message
 | 
								//Add the message
 | 
				
			||||||
			var conversationMessage = createElem2({
 | 
								var conversationMessage = createElem2({
 | 
				
			||||||
				appendTo: convLink,
 | 
									appendTo: convLink,
 | 
				
			||||||
				type: "p",
 | 
									type: "p",
 | 
				
			||||||
				innerHTML: "<em>"+conversation.message+"</em>"
 | 
									innerHTML: "<em>"+conversation.message+"</em>"
 | 
				
			||||||
			})
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//Make the conversation link lives
 | 
				
			||||||
 | 
								convLink.onclick = function(){
 | 
				
			||||||
 | 
									openConversation(this.getAttribute("data-conversation-id"));
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user