fix syntax error
This commit is contained in:
parent
01b8c90f55
commit
7e2d4cc739
|
|
@ -110,7 +110,7 @@
|
|||
url: url,
|
||||
processData: false,
|
||||
success: function(response) {
|
||||
|
||||
|
||||
updateNotificationList(response);
|
||||
|
||||
// set notification count
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
// wire up "x" button to delete notification
|
||||
$notification.find('#img-delete-notification').click(deleteNotificationHandler);
|
||||
if (type === context.JK.MessageType.FRIEND_REQUEST) {
|
||||
var $action_btn = .find('#btn-notification-action');
|
||||
var $action_btn = $notification.find('#btn-notification-action');
|
||||
$action_btn.text('ACCEPT');
|
||||
$action_btn.click(function() {
|
||||
acceptFriendRequest({ "friend_request_id": payload.friend_request_id, "notification_id": payload.notification_id });
|
||||
|
|
@ -230,12 +230,13 @@
|
|||
$('div[layout=sidebar] div[user-id=' + val.id + '].sidebar-search-result').show();
|
||||
|
||||
// wire up button click handler if search result is not a friend or the current user
|
||||
var $sidebar = $('div[layout=sidebar] div[user-id=' + val.id + ']');
|
||||
if (!val.is_friend && val.id !== context.JK.currentUserId) {
|
||||
$('div[layout=sidebar] div[user-id=' + val.id + ']').find('.btn-connect-friend').click(sendFriendRequest);
|
||||
$sidebar.find('.btn-connect-friend').click(sendFriendRequest);
|
||||
}
|
||||
// hide the button if the search result is already a friend
|
||||
else {
|
||||
$('div[layout=sidebar] div[user-id=' + val.id + ']').find('.btn-connect-friend').hide();
|
||||
$sidebar.find('.btn-connect-friend').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue