Created friendList component

This commit is contained in:
Pierre
2017-05-28 13:48:19 +02:00
parent 09e34a8969
commit 34ce3f9c13
4 changed files with 78 additions and 2 deletions

View File

@ -441,7 +441,12 @@ var ComunicWeb = {
//TODO : implement
},
/**
* Friends list
*/
friendsList: {
//TODO : implement
}
},
/**

View File

@ -107,6 +107,11 @@ ComunicWeb.common.page = {
firstPartURI = firstPartURI.split("#")[0];
}
//Check if there are $_GET parametres included with the URL
if(firstPartURI.includes("?") != -1){
firstPartURI = firstPartURI.split("?")[0];
}
//Check if pageURI is empty
if(firstPartURI == ""){
firstPartURI = "home";
@ -134,7 +139,7 @@ ComunicWeb.common.page = {
ComunicWeb.common.url.changeURI(document.title, pageURI);
//Get the main contener of the page
var mainContenerElem =byId("wrapper");
var mainContenerElem = byId("wrapper");
//If we didn't get anything, clean the page and create a wrapper element
if(!mainContenerElem){
@ -178,6 +183,12 @@ ComunicWeb.common.page = {
//We load the menubar
ComunicWeb.components.menuBar.common.display();
//We load specific components for logged in users
if(ComunicWeb.user.userLogin.getUserLoginState()){
//We load frieds list (if user is logged in)
ComunicWeb.components.friendsList.display();
}
}
//Check if some additionnal data was specified