aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-08-08 11:23:16 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-20 08:09:29 -0700
commit4a2aa93c6abeb4831a03a9e8bd7089d0a6f2470e (patch)
tree6d5eb7337ebd0e5c800220c287f5fa7e4bee51ac
parent04d8ced5c620c29abd42d6892d900e620da1e5f3 (diff)
downloadmediagoblin-4a2aa93c6abeb4831a03a9e8bd7089d0a6f2470e.tar.lz
mediagoblin-4a2aa93c6abeb4831a03a9e8bd7089d0a6f2470e.tar.xz
mediagoblin-4a2aa93c6abeb4831a03a9e8bd7089d0a6f2470e.zip
use urlgen and store it in a variable
-rw-r--r--mediagoblin/static/js/notifications.js2
-rw-r--r--mediagoblin/templates/mediagoblin/base.html3
2 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/static/js/notifications.js b/mediagoblin/static/js/notifications.js
index c1c06a43..78694f59 100644
--- a/mediagoblin/static/js/notifications.js
+++ b/mediagoblin/static/js/notifications.js
@@ -41,7 +41,7 @@ $(document).ready(function () {
mark_all_comments_seen.onclick = function() {
$.ajax({
type: 'GET',
- url: '/notifications/comments/mark_all_seen/',
+ url: mark_all_comments_seen_url,
success: function(res, status, xhr) { window.location.reload(); },
});
}
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
index f7e2dff0..f9deb2ad 100644
--- a/mediagoblin/templates/mediagoblin/base.html
+++ b/mediagoblin/templates/mediagoblin/base.html
@@ -37,6 +37,9 @@
src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script>
<script type="text/javascript"
src="{{ request.staticdirect('/js/notifications.js') }}"></script>
+ <script>
+ var mark_all_comments_seen_url = "{{ request.urlgen('mediagoblin.notifications.mark_all_comment_notifications_seen') }}"
+ </script>
{# For clarification, the difference between the extra_head.html template
# and the head template hook is that the former should be used by