Progress on update settings form

This commit is contained in:
Pierre 2017-06-17 11:40:57 +02:00
parent ba5273eafe
commit 37b07b9676
2 changed files with 21 additions and 3 deletions

View File

@ -29,9 +29,10 @@
bottom: 0;
height: 250px;
width: 100%;
background: #d2d6de;
background: #FFFFFF;
overflow: auto;
transition: transform .5s cubic-bezier(.22,.61,.36,1);
padding: 10px;
}
#conversationsElem .conversation-settings-pane.open {

View File

@ -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;
},