metamaps--metamaps/views/notifications/mark_unread.js.erb

8 lines
331 B
Text
Raw Normal View History

2018-03-04 02:25:42 +00:00
$('#notification-{ @notification.id } .notification-read-unread > a')
2017-09-25 19:21:04 +00:00
.text('mark as read')
2018-03-04 02:25:42 +00:00
.attr('href', '{ mark_read_notification_path(@notification.id) }')
$('#notification-{ @notification.id }')
2017-09-25 19:21:04 +00:00
.removeClass('read')
.addClass('unread')
Metamaps.GlobalUI.Notifications.incrementUnread(Metamaps.GlobalUI.ReactApp.render)