Merge branch 'master' into hendrik-search
This commit is contained in:
8
website/public/API/loadChatNotifications.php
Normal file
8
website/public/API/loadChatNotifications.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
require_once ("../../queries/connect.php");
|
||||
require_once ("../../queries/friendship.php");
|
||||
|
||||
echo selectAllUnreadChat();
|
||||
@@ -28,7 +28,7 @@ function checkCheckAll(allbox) {
|
||||
}
|
||||
|
||||
function changeFilter() {
|
||||
if (document.getElementById('group').checked) {
|
||||
if ($('#pagetype').find(":selected").val() == "group") {
|
||||
document.getElementById('admin-filter').style.display = 'none';
|
||||
document.getElementById('admin-groupfilter').style.display = 'inline-block';
|
||||
|
||||
|
||||
@@ -1,26 +1,18 @@
|
||||
$(document).ready(function() {
|
||||
// Hide notification center.
|
||||
$("#profile-menu-popup").hide();
|
||||
|
||||
// $("#own-profile-picture").click(function() {
|
||||
// $("#profile-menu-popup").toggle();
|
||||
// $("#profile-hello-popup").toggle();
|
||||
// });
|
||||
|
||||
$("#own-profile-picture").click(function() {
|
||||
if($("#notification-center").css('right') == "-256px") {
|
||||
$(".content").animate({
|
||||
marginRight: "256px"
|
||||
}, 500);
|
||||
$(".chat-right").animate({
|
||||
width: "100%"
|
||||
width: $(".chat-right").width() - 266
|
||||
}, 500);
|
||||
$("#notification-center").animate({
|
||||
right: "0px"
|
||||
}, 500);
|
||||
} else {
|
||||
$(".chat-right").animate({
|
||||
width: "100%"
|
||||
width: $(".chat-right").width() + 266
|
||||
}, 500);
|
||||
$(".content").animate({
|
||||
marginRight: "0px"
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
include("../views/head.php");
|
||||
include_once("../views/head.php");
|
||||
include_once("../queries/connect.php");
|
||||
include_once("../queries/settings.php");
|
||||
?>
|
||||
@@ -12,8 +12,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
include("../views/main.php");
|
||||
$notImplemented = new settingsMessage("angry", "Deze functie werkt nog niet :(");
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
@@ -33,6 +31,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
include("../views/main.php");
|
||||
|
||||
include("../views/settings-view.php");
|
||||
|
||||
|
||||
@@ -1,71 +1,33 @@
|
||||
.admin-panel {
|
||||
margin: auto;
|
||||
min-width: 800px;
|
||||
}
|
||||
|
||||
.admin-title {
|
||||
margin: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 4px solid #FBC02D;
|
||||
}
|
||||
|
||||
.admin-panel input[type="radio"], input[type="checkbox"] {
|
||||
vertical-align: middle;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.admin-batchactions, .admin-groupbatchactions {
|
||||
display: inline-block;
|
||||
padding: 8px;
|
||||
vertical-align: top;
|
||||
border-radius: 10px;
|
||||
border: 4px solid #FBC02D;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.admin-searchform {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.admin-searchbar {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.admin-searchinput {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.admin-filter, .admin-filtertype, .admin-groupfilter {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
vertical-align: top;
|
||||
margin-right: 50px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.admin-filter, .admin-groupfilter {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.admin-users {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.admin-userheading {
|
||||
width: auto;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.admin-pageui {
|
||||
text-align: right;
|
||||
float: right;
|
||||
width: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.usertitle {
|
||||
width: 150px;
|
||||
.admin-pageui {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.admin-pageselector {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.admin-users {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.usertable {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
position: fixed;
|
||||
top: 80px;
|
||||
left: 256px;
|
||||
padding: 15px 0;
|
||||
padding: 20px 0;
|
||||
width: calc(100% - 256px);
|
||||
height: calc(100% - 120px);
|
||||
display: inline-flex;
|
||||
@@ -25,8 +25,11 @@
|
||||
/* Chat history. */
|
||||
.chat-history {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Chat-message takes the whole width of the chat area */
|
||||
@@ -46,14 +49,15 @@
|
||||
.chat-message-self {
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
background-color: darkgreen;
|
||||
color: white;
|
||||
background-color: #FBC02D;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.chat-message-other {
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
background-color: aquamarine;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Chat reply field */
|
||||
@@ -77,7 +81,6 @@
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-radius: 10px 0 0 10px;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
.chat-field input[type="submit"] {
|
||||
@@ -87,10 +90,9 @@
|
||||
color: white;
|
||||
padding: 5px 10px;
|
||||
border-radius: 0 10px 10px 0;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
.active-friend-chat {
|
||||
background: aquamarine;
|
||||
color: #333;
|
||||
background: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
footer {
|
||||
width: calc(100% - 256px);
|
||||
margin-left: 256px;
|
||||
width: 100%;
|
||||
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@ header {
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
|
||||
color: white;
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
letter-spacing: 1px;
|
||||
background-color: #FBC02D;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
@@ -166,6 +166,7 @@ textarea {
|
||||
|
||||
textarea:hover, input:hover, select:hover {
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.12);
|
||||
}
|
||||
|
||||
textarea:focus, input:focus, select:focus {
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
left: 0;
|
||||
top: 80px;
|
||||
height: calc(100% - 80px);
|
||||
width: 256px;
|
||||
width: 236px;
|
||||
|
||||
background-color: #EEE;
|
||||
/*box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);*/
|
||||
padding: 20px 10px;
|
||||
}
|
||||
|
||||
.menu section {
|
||||
margin: 0 5px 10px 5px;
|
||||
background-color: white;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 5px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
.nav-list li {
|
||||
padding: 5px 20px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.more-item {
|
||||
@@ -40,7 +41,7 @@
|
||||
|
||||
.friend-item:hover, .group-item:hover {
|
||||
background: #FBC02D;
|
||||
color: white;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
.menu button {
|
||||
@@ -54,7 +55,7 @@
|
||||
|
||||
#notification-center {
|
||||
left: auto;
|
||||
width: 256px;
|
||||
width: 236px;
|
||||
right: -256px;
|
||||
}
|
||||
|
||||
@@ -67,4 +68,9 @@
|
||||
color: #4CAF50;
|
||||
font-size: 42px;
|
||||
padding: 7px;
|
||||
transition-duration: 250ms;
|
||||
}
|
||||
|
||||
#quick-links i:hover {
|
||||
color: #FBC02D;
|
||||
}
|
||||
@@ -33,9 +33,6 @@ div.posts div.post {
|
||||
}
|
||||
|
||||
div.posts div.post:hover {
|
||||
/*margin: 15px 0 0 -5px;*/
|
||||
/*padding: 15px;*/
|
||||
/*z-index: 20;*/
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user