mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 01:48:50 +00:00
Progress on update settings form
This commit is contained in:
parent
ba5273eafe
commit
37b07b9676
@ -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 {
|
||||
|
@ -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;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user