add the ability to mark all notifications read.

This commit is contained in:
Rodney Ewing
2013-08-07 12:44:43 -07:00
parent c62d174437
commit d0708da727
4 changed files with 36 additions and 1 deletions

View File

@@ -33,4 +33,17 @@ var notifications = {};
$(document).ready(function () {
notifications.init();
var mark_all_comments_seen = document.getElementById('mark_all_comments_seen');
if (mark_all_comments_seen) {
mark_all_comments_seen.href = '#';
mark_all_comments_seen.onclick = function() {
$.ajax({
type: 'GET',
url: '/notifications/comments/mark_all_seen/',
success: function(res, status, xhr) { window.location.reload(); },
});
}
}
});