use urlgen and store it in a variable
This commit is contained in:
parent
04d8ced5c6
commit
4a2aa93c6a
@ -41,7 +41,7 @@ $(document).ready(function () {
|
|||||||
mark_all_comments_seen.onclick = function() {
|
mark_all_comments_seen.onclick = function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: '/notifications/comments/mark_all_seen/',
|
url: mark_all_comments_seen_url,
|
||||||
success: function(res, status, xhr) { window.location.reload(); },
|
success: function(res, status, xhr) { window.location.reload(); },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script>
|
src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script>
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="{{ request.staticdirect('/js/notifications.js') }}"></script>
|
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
|
{# For clarification, the difference between the extra_head.html template
|
||||||
# and the head template hook is that the former should be used by
|
# and the head template hook is that the former should be used by
|
||||||
|
Loading…
x
Reference in New Issue
Block a user