Avatar can be dynamicaly changed

This commit is contained in:
Pierre 2017-05-25 15:25:39 +02:00
parent be1bda5b0b
commit 22ec2dca70
2 changed files with 12 additions and 1 deletions

View File

@ -95,6 +95,14 @@ ComunicWeb.components.menuBar.authenticated = {
userNameElem.innerHTML = "Loading..."; userNameElem.innerHTML = "Loading...";
//Make a request to get informations about the user //Make a request to get informations about the user
ComunicWeb.user.getUserInfos.getUserInfos("current", (function(userInfos){
//Change user name
userNameElem.innerHTML = userInfos.firstName + " "+ userInfos.lastName;
//Change avatar url
userimage.src = userInfos.accountImage;
}));
}, },
}; };

View File

@ -13,6 +13,9 @@ ComunicWeb.pages.home.landingPage = {
//Log action //Log action
ComunicWeb.debug.logMessage("Open home landing page."); ComunicWeb.debug.logMessage("Open home landing page.");
//Change page title
document.title = "Comunic, a transparent social network";
//Prepare additional data //Prepare additional data
var additionalData = {}; var additionalData = {};