Added open a conversation button

This commit is contained in:
Pierre
2017-06-04 18:17:27 +02:00
parent 05ad0cf513
commit f99dcf8fdc
3 changed files with 44 additions and 0 deletions

View File

@ -54,6 +54,29 @@ ComunicWeb.components.discussions.manager = {
* @return {Boolean} True for a success
*/
init: function(discussionsContainerElem){
//First, add the "open a conversation" new
this.addOpenConversationButton(discussionsContainerElem);
},
/**
* Add the "open conversation" button
*
* @param {HTMLElement} targetElem The target of the button
* @return {Boolean} True for a success
*/
addOpenConversationButton: function(targetElem){
//Create the button
var addButton = createElem("button", targetElem);
addButton.className = "btn btn-primary open-conversation-button";
addButton.innerHTML = "Open a conversation";
//Temporary behavior
addButton.onclick = function(){
alert("Open a conversation !");
}
}
}