mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Added open a conversation button
This commit is contained in:
		
							
								
								
									
										20
									
								
								assets/css/components/discussions/manager.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								assets/css/components/discussions/manager.css
									
									
									
									
									
										Normal 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;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -55,5 +55,28 @@ ComunicWeb.components.discussions.manager = {
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	init: function(discussionsContainerElem){
 | 
						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 !");
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -26,6 +26,7 @@ $config['CSSfiles'] = array(
 | 
				
			|||||||
    "%PATH_ASSETS%css/components/menuBar.css",
 | 
					    "%PATH_ASSETS%css/components/menuBar.css",
 | 
				
			||||||
    "%PATH_ASSETS%css/components/searchForm.css",
 | 
					    "%PATH_ASSETS%css/components/searchForm.css",
 | 
				
			||||||
    "%PATH_ASSETS%css/components/friends/friendsBar.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)
 | 
					//JS files to include (at the end of the page)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user