fix syntax error

This commit is contained in:
Brian Smith 2013-10-05 10:33:51 -04:00
parent 01b8c90f55
commit 7e2d4cc739
1 changed files with 5 additions and 4 deletions

View File

@ -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();
}
});