From b1b2a1b16961d75fe92cac2d829fab829e4cf060 Mon Sep 17 00:00:00 2001 From: HumairAK Date: Thu, 25 Aug 2016 03:52:19 -0400 Subject: added more user profile content --- assets/js/user_profile.js | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'assets/js/user_profile.js') diff --git a/assets/js/user_profile.js b/assets/js/user_profile.js index fa7add4..73c7897 100644 --- a/assets/js/user_profile.js +++ b/assets/js/user_profile.js @@ -3,10 +3,8 @@ function main(){ var items = [ $("#profile-general"), $("#profile-follows"), - $("#profile-friends"), - $("#profile-inbox"), $("#profile-comments"), - $('#profile-send-message')]; + $("#profile-inbox")]; function hidePages(){ items.forEach(function(item){ @@ -20,32 +18,26 @@ function main(){ // Show General page items[0].show(); - $('.prf-page').bind('click', function(e){ + $('.nav-o').bind('click', function(e){ e.preventDefault(); hidePages(); /* Each case will need to be changed to call a handler for fetching data * from server*/ - switch($(this).text()) { - case "General": + switch($(this).attr('id')) { + case "nav-profile": console.log("clicked general"); $("#profile-general").show(); break; - case "Following": + case "nav-follows": $("#profile-follows").show(); break; - case "Friends": - $("#profile-friends").show(); - break; - case "Inbox": - $("#profile-inbox").show(); - break; - case "Comments": + case "nav-comments": $("#profile-comments").show(); break; - case "Send Message": - $('#profile-send-message').show(); + case "nav-inbox": + $("#profile-inbox").show(); break; default: console.log("Error: User page not found"); -- cgit v1.2.3 From 17a4b5f57e0223b211ab8ff601e587920e6e1bef Mon Sep 17 00:00:00 2001 From: HumairAK Date: Fri, 26 Aug 2016 19:10:20 -0400 Subject: added some user profile inbox functionality --- assets/js/user_profile.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'assets/js/user_profile.js') diff --git a/assets/js/user_profile.js b/assets/js/user_profile.js index 73c7897..c26299b 100644 --- a/assets/js/user_profile.js +++ b/assets/js/user_profile.js @@ -42,5 +42,13 @@ function main(){ default: console.log("Error: User page not found"); } - });} + }); + + + + +} + + + $(document).ready(main); \ No newline at end of file -- cgit v1.2.3