- $(data.notifications).each(function(key, notification) {
- var text = notification.message.format('<span class="contactname">' + notification.name + '</span>');
- var contact = ('<a href="' + notification.url + '"><span class="contactname">' + notification.name + '</span></a>');
- var seenclass = (notification.seen == 1) ? "notification-seen" : "notification-unseen";
- var html = notifications_tpl.format(
- notification.href, // {0} // link to the source
- notification.photo, // {1} // photo of the contact
- text, // {2} // preformatted text (autor + text)
- notification.date, // {3} // date of notification (time ago)
- seenclass, // {4} // visited status of the notification
- new Date(notification.timestamp*1000), // {5} // date of notification
- notification.url, // {6} // profile url of the contact
- notification.message.format(contact), // {7} // preformatted html (text including author profile url)
- '' // {8} // Deprecated
- );
- nnm.append(html);
+ $(data.notifications).each(function(key, navNotif) {
+ nnm.append(navNotif.html);