PHRAS-3442_optimize-list-notifications_4.1-bis

WIP
mark notif as read
fix test
This commit is contained in:
jygaulier
2021-06-17 17:13:35 +02:00
parent f8cfd08f4f
commit 47c0e4b1cc
10 changed files with 160 additions and 143 deletions

View File

@@ -135,8 +135,16 @@ var commonModule = (function ($, p4) {
}
else {
$('.no_notifications', $box).hide();
for (n in data.notifications.notifications) {
$box_notifications.append(data.notifications.notifications[n].html);
for (var n in data.notifications.notifications) {
var notification = data.notifications.notifications[n];
$box_notifications.append(notification.html);
$('.notification_' + notification.id + '_read', $box_notifications).click(
function (event) {
console.log("++++++++++ clicked("+notification.id+")")
});
}
$('.show_all', $box).show();
}