mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-07 15:22:28 +02:00
fixed unfollow button
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="user-actions" class="container">
|
||||
<a id="add-friend-btn" href="#" class="btn">Add Friend</a>
|
||||
<a id="add-friend-btn" href="#" class="btn">Follow</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div id="user-action-alert" class="alert alert-success hide"></div>
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}());
|
||||
</script>
|
||||
@@ -32,7 +32,7 @@
|
||||
<span class='postcount'>{friends.postcount}</span>
|
||||
<i class='icon-pencil'></i>
|
||||
</div>
|
||||
<a id="remove-friend-btn" href="#" class="btn remove-friend-btn" friendid="{friends.uid}">Unfriend</a>
|
||||
<a id="remove-friend-btn" href="#" class="btn remove-friend-btn" friendid="{friends.uid}">Unfollow</a>
|
||||
</div>
|
||||
|
||||
<!-- END friends -->
|
||||
@@ -72,7 +72,7 @@ var friendCount = '{friendCount}';
|
||||
|
||||
$.post('/users/removefriend', {uid: friendid},
|
||||
function(data) {
|
||||
button.parent().remove();
|
||||
removeBtn.parent().remove();
|
||||
}
|
||||
);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user