metamaps--metamaps/app/views/notifications/mark_unread.js.erb
2017-09-25 15:21:04 -04:00

8 lines
340 B
Plaintext

$('#notification-<%= @notification.id %> .notification-read-unread > a')
.text('mark as read')
.attr('href', '<%= mark_read_notification_path(@notification.id) %>')
$('#notification-<%= @notification.id %>')
.removeClass('read')
.addClass('unread')
Metamaps.GlobalUI.Notifications.incrementUnread(Metamaps.GlobalUI.ReactApp.render)