metamaps--metamaps/views/js/mark_unread.js

8 lines
331 B
JavaScript
Raw Normal View History

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