Menu, netjes, notification
This commit is contained in:
@@ -13,14 +13,14 @@ $(document).ready(function() {
|
||||
marginRight: "256px"
|
||||
}, 500);
|
||||
$(".chat-right").animate({
|
||||
width: "100%"
|
||||
width: "calc(100% - 512px - 40px)"
|
||||
}, 500);
|
||||
$("#notification-center").animate({
|
||||
right: "0px"
|
||||
}, 500);
|
||||
} else {
|
||||
$(".chat-right").animate({
|
||||
width: "100%"
|
||||
width: "calc(100% - 256px - 40px)"
|
||||
}, 500);
|
||||
$(".content").animate({
|
||||
marginRight: "0px"
|
||||
@@ -30,4 +30,6 @@ $(document).ready(function() {
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
$("#own-profile-picture").click();
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function showNotifications(notifications, id) {
|
||||
$("#friendrequestslist").html("");
|
||||
$("#" + id).html("");
|
||||
for (i in notifications) {
|
||||
$("#friendrequestslist").append(" \
|
||||
$("#" + id).append(" \
|
||||
<li class='friend-item $extraItem'> \
|
||||
<form action='profile.php' method='get'> \
|
||||
<button type='submit' \
|
||||
@@ -20,15 +20,25 @@ function showNotifications(notifications, id) {
|
||||
|
||||
function loadNotifications() {
|
||||
$.post(
|
||||
"API/loadNotifications.php"
|
||||
"API/loadFriendRequestNotifications.php"
|
||||
).done(function(data) {
|
||||
if (data && data != "[]") {
|
||||
showNotifications(JSON.parse(data), "friendrequestslist");
|
||||
}
|
||||
});
|
||||
$.post(
|
||||
"API/loadChatNotifications.php"
|
||||
).done(function(data) {
|
||||
if (data && data != "[]") {
|
||||
showNotifications(JSON.parse(data), "unreadChatlist");
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(loadNotifications, 10000);
|
||||
}
|
||||
$(document).ready(function() {
|
||||
loadNotifications();
|
||||
});
|
||||
|
||||
|
||||
loadNotifications();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user