mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 13:59:23 +00:00
Progress on update settings form
This commit is contained in:
parent
ba5273eafe
commit
37b07b9676
@ -29,9 +29,10 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #d2d6de;
|
background: #FFFFFF;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
transition: transform .5s cubic-bezier(.22,.61,.36,1);
|
transition: transform .5s cubic-bezier(.22,.61,.36,1);
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#conversationsElem .conversation-settings-pane.open {
|
#conversationsElem .conversation-settings-pane.open {
|
||||||
|
@ -164,7 +164,7 @@ ComunicWeb.components.conversations.chatWindows = {
|
|||||||
* @return {Boolean} True for a success
|
* @return {Boolean} True for a success
|
||||||
*/
|
*/
|
||||||
showConversationSettings: function(infos){
|
showConversationSettings: function(infos){
|
||||||
console.log(infos);
|
|
||||||
//Create and display conversation settings button wheel
|
//Create and display conversation settings button wheel
|
||||||
infos.box.settingsButton = createElem2({
|
infos.box.settingsButton = createElem2({
|
||||||
type: "button",
|
type: "button",
|
||||||
@ -185,17 +185,34 @@ ComunicWeb.components.conversations.chatWindows = {
|
|||||||
type: "div",
|
type: "div",
|
||||||
appendTo: infos.box.boxBody,
|
appendTo: infos.box.boxBody,
|
||||||
class: "conversation-settings-pane",
|
class: "conversation-settings-pane",
|
||||||
innerHTML: "<p>Welcome to settings world</p>",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//Make the settings button lives
|
//Make the settings button lives
|
||||||
infos.box.settingsButton.onclick = function(){
|
infos.box.settingsButton.onclick = function(){
|
||||||
|
//Update settings pane classname
|
||||||
if(settingsPane.className.includes(" open"))
|
if(settingsPane.className.includes(" open"))
|
||||||
settingsPane.className = settingsPane.className.replace(" open", ""); //Close the pane
|
settingsPane.className = settingsPane.className.replace(" open", ""); //Close the pane
|
||||||
else
|
else
|
||||||
settingsPane.className += " open"; //Open the pane
|
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
|
//Success
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user