diff options
author | vijeth-aradhya <vijthaaa@gmail.com> | 2017-01-22 23:57:16 +0530 |
---|---|---|
committer | Boris Bobrov <breton@cynicmansion.ru> | 2017-01-29 16:52:26 +0300 |
commit | c427278e5047f2cc3bc2ffde58de01d4726d1871 (patch) | |
tree | 5e11e9b3ee9107b91b76d13c9c4fb15571024456 /mediagoblin/templates | |
parent | be44e006264381998cd452c949d2bfdf84ccf70d (diff) | |
download | mediagoblin-c427278e5047f2cc3bc2ffde58de01d4726d1871.tar.lz mediagoblin-c427278e5047f2cc3bc2ffde58de01d4726d1871.tar.xz mediagoblin-c427278e5047f2cc3bc2ffde58de01d4726d1871.zip |
post_comment.js, media.html: Add AJAX for posting comments
Stop reloading the page when a comment is posted which helps
in not stopping the media being played (for example, a song)
Fixes https://issues.mediagoblin.org/ticket/868
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/media.html | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 7278ad61..ce19717f 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -29,6 +29,8 @@ src="{{ request.staticdirect('/js/comment_show.js') }}"></script> <script type="text/javascript" src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script> + <script type="text/javascript" + src="{{ request.staticdirect('/js/post_comment.js') }}"></script> {% template_hook("location_head") %} {% template_hook("media_head") %} @@ -117,6 +119,7 @@ <input type="submit" value="{% trans %}Add this comment{% endtrans %}" class="button_action" /> {{ csrf_token }} </div> + <input type="hidden" value="{{ request.urlgen('mediagoblin.user_pages.media_post_comment', user= media.get_actor.username, media_id=media.id) }}" id="postCommentURL" /> <input type="hidden" value="{{ request.urlgen('mediagoblin.user_pages.media_preview_comment') }}" id="previewURL" /> <input type="hidden" value="{% trans %}Comment Preview{% endtrans %}" id="previewText"/> </form> |