mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Progress on update settings form
This commit is contained in:
		@@ -164,7 +164,7 @@ ComunicWeb.components.conversations.chatWindows = {
 | 
			
		||||
	 * @return {Boolean} True for a success
 | 
			
		||||
	 */
 | 
			
		||||
	showConversationSettings: function(infos){
 | 
			
		||||
		console.log(infos);
 | 
			
		||||
		
 | 
			
		||||
		//Create and display conversation settings button wheel
 | 
			
		||||
		infos.box.settingsButton = createElem2({
 | 
			
		||||
			type: "button",
 | 
			
		||||
@@ -185,17 +185,34 @@ ComunicWeb.components.conversations.chatWindows = {
 | 
			
		||||
			type: "div",
 | 
			
		||||
			appendTo: infos.box.boxBody,
 | 
			
		||||
			class: "conversation-settings-pane",
 | 
			
		||||
			innerHTML: "<p>Welcome to settings world</p>",
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		//Make the settings button lives
 | 
			
		||||
		infos.box.settingsButton.onclick = function(){
 | 
			
		||||
			//Update settings pane classname
 | 
			
		||||
			if(settingsPane.className.includes(" open"))
 | 
			
		||||
				settingsPane.className = settingsPane.className.replace(" open", ""); //Close the pane
 | 
			
		||||
			else
 | 
			
		||||
				settingsPane.className += " open"; //Open the pane
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
		//Create the conversation form
 | 
			
		||||
		var settingsForm = ComunicWeb.components.conversations.utils.createConversationForm(settingsPane);
 | 
			
		||||
 | 
			
		||||
		//Update form informations
 | 
			
		||||
		settingsForm.createButton.innerHTML = "Update conversation";
 | 
			
		||||
		
 | 
			
		||||
		//Update conversation name
 | 
			
		||||
		if(infos.infos.name)
 | 
			
		||||
			settingsForm.conversationNameInput.value = infos.infos.name;
 | 
			
		||||
 | 
			
		||||
		//Update conversation members
 | 
			
		||||
 | 
			
		||||
		//Update follow conversation checkbox
 | 
			
		||||
 | 
			
		||||
		console.log(infos);
 | 
			
		||||
		console.log(settingsForm);
 | 
			
		||||
 | 
			
		||||
		//Success
 | 
			
		||||
		return true;
 | 
			
		||||
	},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user