From 09c80b82899f9b1e8dfbd37933359a2f1d3889c6 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Wed, 15 May 2013 15:07:40 -0400 Subject: [PATCH] fixed unfollow button --- public/templates/account.tpl | 6 ++---- public/templates/friends.tpl | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/public/templates/account.tpl b/public/templates/account.tpl index efc5d8099d..91c76d4ad9 100644 --- a/public/templates/account.tpl +++ b/public/templates/account.tpl @@ -59,7 +59,7 @@
- Add Friend + Follow

@@ -104,16 +104,14 @@ var theirid = '{theirid}'; addFriendBtn.on('click', function() { $.post('/users/addfriend', {uid: theirid}, function(data) { + addFriendBtn.remove(); $('#user-action-alert').html('Friend Added!').show(); } ); return false; }); - - }); - }()); \ No newline at end of file diff --git a/public/templates/friends.tpl b/public/templates/friends.tpl index 233bafa3ad..57edeb8563 100644 --- a/public/templates/friends.tpl +++ b/public/templates/friends.tpl @@ -32,7 +32,7 @@ {friends.postcount} - Unfriend + Unfollow @@ -72,7 +72,7 @@ var friendCount = '{friendCount}'; $.post('/users/removefriend', {uid: friendid}, function(data) { - button.parent().remove(); + removeBtn.parent().remove(); } ); return false;