mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Begin to draw side bar (add user logo)
This commit is contained in:
@ -587,6 +587,19 @@ var ComunicWeb = {
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Sidebar
|
||||
*/
|
||||
sideBar: {
|
||||
|
||||
/**
|
||||
* Main sidebar file
|
||||
*/
|
||||
main: {
|
||||
//TODO : implement
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Pages bottom
|
||||
*/
|
||||
|
@ -257,6 +257,9 @@ ComunicWeb.common.page = {
|
||||
|
||||
//We load specific components for logged in users
|
||||
if(ComunicWeb.user.userLogin.getUserLoginState()){
|
||||
|
||||
// Sidebar
|
||||
ComunicWeb.components.sideBar.main.show();
|
||||
|
||||
//We load friends list (if user is logged in)
|
||||
ComunicWeb.components.friends.bar.display();
|
||||
|
@ -120,6 +120,18 @@ function getMultipleUsersInfos(usersID, afterGetUserInfos, forceRequest){
|
||||
ComunicWeb.user.userInfos.getMultipleUsersInfos(usersID, afterGetUserInfos, forceRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information about a single user
|
||||
*
|
||||
* @param {int} userID User on which to make request
|
||||
* @param {function} afterGetUserInfo What to do once users informations are available
|
||||
* @param {Boolean} forceRequest Force the request to be made
|
||||
* @return {Boolean} True for a success
|
||||
*/
|
||||
function getUserInfo(usersID, afterGetUserInfo, forceRequest){
|
||||
ComunicWeb.user.userInfos.getUserInfos(usersID, afterGetUserInfo, forceRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display message on browser console
|
||||
*
|
||||
|
@ -43,6 +43,7 @@ function createElem(nodeType, appendTo){
|
||||
* @info {String} innerLang Specify the key of the lang to use to fill the element
|
||||
* @info {String} innerHTMLprefix Specify prefix to add at the begining of the content of the element
|
||||
* @info {boolean} disabled Set whether the field should be disabled or not (input only)
|
||||
* @info {HTMLElement[]} children Children for the new object
|
||||
* @return {HTMLElement} The newly created element
|
||||
*/
|
||||
function createElem2(infos){
|
||||
@ -122,6 +123,12 @@ function createElem2(infos){
|
||||
if(infos.disabled)
|
||||
infos.disabled = true;
|
||||
|
||||
if(infos.children){
|
||||
infos.children.forEach(function(i){
|
||||
newElem.appendChild(i);
|
||||
});
|
||||
}
|
||||
|
||||
//Return newly created element
|
||||
return newElem;
|
||||
}
|
||||
|
Reference in New Issue
Block a user