mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Improved connection between big and small conversation windows
This commit is contained in:
		@@ -386,24 +386,32 @@ ComunicWeb.components.conversations.chatWindows = {
 | 
			
		||||
	 * Change the name of the converation at the top of the windows
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @param {String} newName The new name for the conversation window
 | 
			
		||||
	 * @param {Ojbect} infos Informations about the conversation window
 | 
			
		||||
	 * @param {Ojbect} info Information about the conversation window
 | 
			
		||||
	 * @return {Boolean} True for a success
 | 
			
		||||
	 */
 | 
			
		||||
	changeName: function(newName, infos){
 | 
			
		||||
	changeName: function(newName, info){
 | 
			
		||||
 | 
			
		||||
		//Reduce new name
 | 
			
		||||
		if(newName.length > 18)
 | 
			
		||||
			newName = newName.slice(0, 17) + "...";
 | 
			
		||||
 | 
			
		||||
		//Empty name field
 | 
			
		||||
		emptyElem(infos.boxTitle);
 | 
			
		||||
		emptyElem(info.boxTitle);
 | 
			
		||||
		
 | 
			
		||||
		//Create conversation icon 
 | 
			
		||||
		var conversationIcon = createElem("i", infos.boxTitle);
 | 
			
		||||
		conversationIcon.className = "fa fa-comments";
 | 
			
		||||
		createElem2({
 | 
			
		||||
			type: "i",
 | 
			
		||||
			appendTo: info.boxTitle,
 | 
			
		||||
			class: "fa fa-comments",
 | 
			
		||||
			ondblclick: () => {
 | 
			
		||||
				openConversation(info.conversationID, true);
 | 
			
		||||
				info.closeFunction();
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		//Add conversation title
 | 
			
		||||
		var conversationTitle = createElem("span", infos.boxTitle);
 | 
			
		||||
		var conversationTitle = createElem("span", info.boxTitle);
 | 
			
		||||
		conversationTitle.innerHTML = " " + newName;
 | 
			
		||||
 | 
			
		||||
		//Success
 | 
			
		||||
 
 | 
			
		||||
@@ -153,7 +153,7 @@ ComunicWeb.components.conversations.service = {
 | 
			
		||||
			for(i in result){
 | 
			
		||||
 | 
			
		||||
				//Check if new entries are available
 | 
			
		||||
				if(result[i].length === 0)
 | 
			
		||||
				if(result[i].length === 0 || !this.__serviceCache[i])
 | 
			
		||||
					continue; //Nothing to be done
 | 
			
		||||
				
 | 
			
		||||
				//Extract conversation ID
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user