Friends and friendrequest are fully ajax. Also added friend-item
This commit is contained in:
26
website/public/js/main.js
Normal file
26
website/public/js/main.js
Normal file
@@ -0,0 +1,26 @@
|
||||
function showFriends(friends, list) {
|
||||
if(friends && friends != "[]") {
|
||||
$(list).load("bits/friend-item.php", {
|
||||
"friends": friends
|
||||
});
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function showFriendsPlus(friends, list, limit, action, actionType) {
|
||||
if(friends && friends.length > 0) {
|
||||
$(list).load("bits/friend-item.php", {
|
||||
"friends": friends,
|
||||
"limit": limit,
|
||||
"action": action,
|
||||
"actionType": actionType
|
||||
});
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user