diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js index 8ce107f20a..4d9fffcde0 100644 --- a/public/src/modules/notifications.js +++ b/public/src/modules/notifications.js @@ -21,7 +21,7 @@ define('notifications', ['sounds'], function(sound) { if (err) { return app.alertError(err.message); } - + var notifs = data.unread.concat(data.read); translator.toggleTimeagoShorthand(); @@ -29,14 +29,15 @@ define('notifications', ['sounds'], function(sound) { notifs[i].timeago = $.timeago(new Date(parseInt(notifs[i].datetime, 10))); } translator.toggleTimeagoShorthand(); - + templates.parse('partials/notifications_list', {notifications: notifs}, function(html) { notifList.translateHtml(html); }); - }); + }); }); notifList.on('click', '[data-nid]', function() { + var nid = $(this).attr('data-nid'); socket.emit('notifications.markRead', nid, function(err) { if (err) { app.alertError(err.message);