mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Friends list scrollable and automatically refreshed
This commit is contained in:
@ -61,12 +61,19 @@ ComunicWeb.components.friends.bar = {
|
||||
//Refresh friends list
|
||||
this.refresh(listFriendsElem);
|
||||
|
||||
//Make the friend bar automaticaly refreshed (if the interval wasn't already defined)
|
||||
if(!this.refreshInterval)
|
||||
this.refreshInterval = setInterval(function(){
|
||||
if(byId("friendsList"))
|
||||
ComunicWeb.components.friends.bar.refresh(listFriendsElem);
|
||||
}, 1000);
|
||||
|
||||
//Success
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Refresh the listbar
|
||||
* Refresh the friendbar
|
||||
*
|
||||
* @param {HTMLElement} listFriendsElem The element that contains the list of friens
|
||||
* @return {Boolean} True for a success
|
||||
@ -95,6 +102,9 @@ ComunicWeb.components.friends.bar = {
|
||||
//Get users ID informations
|
||||
ComunicWeb.user.userInfos.getMultipleUsersInfos(usersID, function(usersInfos){
|
||||
|
||||
//Clean the area
|
||||
listFriendsElem.innerHTML = "";
|
||||
|
||||
//Show each friend
|
||||
for(i in friendsList){
|
||||
|
||||
@ -135,6 +145,11 @@ ComunicWeb.components.friends.bar = {
|
||||
}
|
||||
}
|
||||
|
||||
//Enable slimscroll
|
||||
$(listFriendsElem.parentNode.parentNode).slimScroll({
|
||||
height: '100%;'
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -105,7 +105,7 @@ ComunicWeb.components.searchForm = {
|
||||
|
||||
//Enable slimscroll
|
||||
$(menuList).slimScroll({
|
||||
height: '200px',
|
||||
height: '100%'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user