Chat messages and groups are now live.

This commit is contained in:
Lars van Hijfte
2017-01-26 10:26:40 +01:00
parent 30d403ae7b
commit 95ee91748f
12 changed files with 209 additions and 137 deletions

View File

@@ -1,3 +1,10 @@
function editFriendship(userID, value) {
$.post("API/editFriendship.php", { usr: userID, action: value })
.done(function() {
placeFriendButtons();
});
}
function showFriends(friends, list) {
if(friends && friends != "[]") {
$(list).load("bits/friend-item.php", {
@@ -11,7 +18,7 @@ function showFriends(friends, list) {
}
function showFriendsPlus(friends, list, limit, action, actionType) {
if(friends && friends.length > 0) {
if(friends && friends != "[]") {
$(list).load("bits/friend-item.php", {
"friends": friends,
"limit": limit,
@@ -19,6 +26,18 @@ function showFriendsPlus(friends, list, limit, action, actionType) {
"actionType": actionType
});
return true;
} else {
return false;
}
}
function showGroups(groups, list) {
if(groups && groups != "[]") {
$(list).load("bits/group-item.php", {
"groups": groups
});
return true;
} else {
return false;