diff --git a/website/public/js/header.js b/website/public/js/header.js index 797c56c..ceb6086 100644 --- a/website/public/js/header.js +++ b/website/public/js/header.js @@ -1,7 +1,27 @@ $(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() { - $("#profile-menu-popup").toggle(); - $("#profile-hello-popup").toggle(); + if($("#notification-center").css('right') == "-256px") { + // $(".content").animate({ + // marginRight: "256px" + // }, 500); + $("#notification-center").animate({ + right: "0px" + }, 500); + } else { + // $(".content").animate({ + // marginRight: "0px" + // }, 500); + $("#notification-center").animate({ + right: "-256px" + }, 500); + } }); }); diff --git a/website/public/styles/header.css b/website/public/styles/header.css index 84f308c..ddefdec 100644 --- a/website/public/styles/header.css +++ b/website/public/styles/header.css @@ -33,32 +33,12 @@ header { header div { display: inline-block; } - -#open-chat { - font-size: 32px; - line-height: 80px; - margin-right: 50px; -} - -.profile-menu { - font-size: 21px; -} - .profile-menu img { padding: 8px; height: 64px; width: 64px; } -#own-profile-picture, #profile-menu-popup span { +#own-profile-picture { cursor: pointer; } - -#profile-menu-popup { - padding: 5px; - - background: white; - color: #666; - - border-radius: 3px; -} diff --git a/website/public/styles/menu.css b/website/public/styles/menu.css index 4d4b8bb..b9e3904 100644 --- a/website/public/styles/menu.css +++ b/website/public/styles/menu.css @@ -42,4 +42,21 @@ height: 100%; padding: 0; text-align: left; +} + +#notification-center { + left: auto; + width: 256px; + right: -256px; +} + +#quick-links { + text-align: center; + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +#quick-links i { + color: #845663; + font-size: 42px; + padding: 7px; } \ No newline at end of file diff --git a/website/queries/friendship.php b/website/queries/friendship.php index 258699f..df6a917 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -15,13 +15,14 @@ function selectAllFriends($userID) { `user` INNER JOIN `friendship` + WHERE (`friendship`.`user1ID` = :userID AND `friendship`.`user2ID` = `user`.`userID` OR `friendship`.`user2ID` = :userID AND `friendship`.`user1ID` = `user`.`userID`) AND `role` != 5 AND - `status` = 1 + `status` = 1 "); $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); diff --git a/website/views/header.php b/website/views/header.php index 2a1f580..0637818 100644 --- a/website/views/header.php +++ b/website/views/header.php @@ -19,11 +19,6 @@ $userinfo = getHeaderInfo();