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

@ -0,0 +1,20 @@
/**
* Discussions manager stylesheet
*
* @author Pierre HUBERT
*/
#discussionsElem {
position: fixed;
bottom: 0px;
width: 100%;
text-align: right;
padding-right: 5px;
}
#discussionsElem .open-conversation-button {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}

View File

@ -55,5 +55,28 @@ ComunicWeb.components.discussions.manager = {
*/
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 !");
}
}
}

View File

@ -26,6 +26,7 @@ $config['CSSfiles'] = array(
"%PATH_ASSETS%css/components/menuBar.css",
"%PATH_ASSETS%css/components/searchForm.css",
"%PATH_ASSETS%css/components/friends/friendsBar.css",
"%PATH_ASSETS%css/components/discussions/manager.css",
);
//JS files to include (at the end of the page)