mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-26 10:58:49 +00:00
Created friends list modal script file
This commit is contained in:
parent
4fcadb0355
commit
3dfd91102f
@ -548,6 +548,13 @@ var ComunicWeb = {
|
||||
bar:{
|
||||
//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",
|
||||
innerHTML: "Friends"
|
||||
});
|
||||
createElem2({
|
||||
var friendsListLink = createElem2({
|
||||
appendTo: friendsLi,
|
||||
type: "a",
|
||||
class: "pull-right",
|
||||
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)
|
||||
if(signed_in()){
|
||||
if(userID() != infos.userID){
|
||||
|
@ -213,6 +213,7 @@ class Dev {
|
||||
//Friends components
|
||||
"js/components/friends/friendsList.js",
|
||||
"js/components/friends/friendsBar.js",
|
||||
"js/components/friends/listModal.js",
|
||||
|
||||
//Private conversations
|
||||
"js/components/conversations/manager.js",
|
||||
|
Loading…
Reference in New Issue
Block a user