mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-25 21:39:21 +00:00
Created friends list modal script file
This commit is contained in:
parent
4fcadb0355
commit
3dfd91102f
@ -548,6 +548,13 @@ var ComunicWeb = {
|
|||||||
bar:{
|
bar:{
|
||||||
//TODO : implement
|
//TODO : implement
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Friends list modal box
|
||||||
|
*/
|
||||||
|
listModal: {
|
||||||
|
//TODO : implement
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
18
assets/js/components/friends/listModal.js
Normal file
18
assets/js/components/friends/listModal.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Friends list modal
|
||||||
|
*
|
||||||
|
* @author Pierre HUBERT
|
||||||
|
*/
|
||||||
|
|
||||||
|
ComunicWeb.components.friends.listModal = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the box that contains the list of friends of the user
|
||||||
|
*
|
||||||
|
* @param {number} userID The ID of the target user
|
||||||
|
*/
|
||||||
|
display: function(userID){
|
||||||
|
alert(userID);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
@ -108,13 +108,20 @@ ComunicWeb.pages.userPage.profileInfos = {
|
|||||||
type: "b",
|
type: "b",
|
||||||
innerHTML: "Friends"
|
innerHTML: "Friends"
|
||||||
});
|
});
|
||||||
createElem2({
|
var friendsListLink = createElem2({
|
||||||
appendTo: friendsLi,
|
appendTo: friendsLi,
|
||||||
type: "a",
|
type: "a",
|
||||||
class: "pull-right",
|
class: "pull-right",
|
||||||
innerHTML: infos.number_friends
|
innerHTML: infos.number_friends
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Make the user number lives
|
||||||
|
friendsListLink.onclick = function(){
|
||||||
|
|
||||||
|
ComunicWeb.components.friends.listModal.display(infos.userID);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
//Add user status informations (if required)
|
//Add user status informations (if required)
|
||||||
if(signed_in()){
|
if(signed_in()){
|
||||||
if(userID() != infos.userID){
|
if(userID() != infos.userID){
|
||||||
|
@ -213,6 +213,7 @@ class Dev {
|
|||||||
//Friends components
|
//Friends components
|
||||||
"js/components/friends/friendsList.js",
|
"js/components/friends/friendsList.js",
|
||||||
"js/components/friends/friendsBar.js",
|
"js/components/friends/friendsBar.js",
|
||||||
|
"js/components/friends/listModal.js",
|
||||||
|
|
||||||
//Private conversations
|
//Private conversations
|
||||||
"js/components/conversations/manager.js",
|
"js/components/conversations/manager.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user