diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-07 12:44:43 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-20 08:09:29 -0700 |
commit | d0708da727b72cfc95defe14dd6780d2cba0a0b7 (patch) | |
tree | 2d1c707e8eceb7a38712e982c8d6bb2a6f5da69a /mediagoblin/static/js | |
parent | c62d174437445565b55b220396e7571a323a159c (diff) | |
download | mediagoblin-d0708da727b72cfc95defe14dd6780d2cba0a0b7.tar.lz mediagoblin-d0708da727b72cfc95defe14dd6780d2cba0a0b7.tar.xz mediagoblin-d0708da727b72cfc95defe14dd6780d2cba0a0b7.zip |
add the ability to mark all notifications read.
Diffstat (limited to 'mediagoblin/static/js')
-rw-r--r-- | mediagoblin/static/js/notifications.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mediagoblin/static/js/notifications.js b/mediagoblin/static/js/notifications.js index 0153463a..c1c06a43 100644 --- a/mediagoblin/static/js/notifications.js +++ b/mediagoblin/static/js/notifications.js @@ -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(); }, + }); + } + } }); |