Friends and friendrequest are fully ajax. Also added friend-item

This commit is contained in:
Lars van Hijfte
2017-01-25 16:17:46 +01:00
parent 93ddefa42f
commit 91fae80326
13 changed files with 271 additions and 180 deletions

26
website/public/js/main.js Normal file
View 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;
}
}