diff --git a/lms/static/coffee/src/discussion/views/response_comment_view.coffee b/lms/static/coffee/src/discussion/views/response_comment_view.coffee index 351f0f5689..a3c6554db7 100644 --- a/lms/static/coffee/src/discussion/views/response_comment_view.coffee +++ b/lms/static/coffee/src/discussion/views/response_comment_view.coffee @@ -1,8 +1,14 @@ class @ResponseCommentView extends DiscussionContentView tagName: "li" template: _.template($("#response-comment-template").html()) + initLocal: -> + @$local = @$el.find(".response-local") + @$delegateElement = @$local + render: -> @$el.html(@template(@model.toJSON())) + @initLocal() + @delegateEvents() @renderAttrs() @$(".timeago").timeago() @convertMath() diff --git a/lms/static/coffee/src/discussion/views/thread_response_view.coffee b/lms/static/coffee/src/discussion/views/thread_response_view.coffee index fa35273d00..70dd56427e 100644 --- a/lms/static/coffee/src/discussion/views/thread_response_view.coffee +++ b/lms/static/coffee/src/discussion/views/thread_response_view.coffee @@ -4,7 +4,7 @@ class @ThreadResponseView extends DiscussionContentView events: "click .vote-btn": "toggleVote" - "submit form": "submitComment" + "submit .comment-form": "submitComment" "click .action-endorse": "toggleEndorse" "click .action-delete": "delete" diff --git a/lms/templates/discussion/_underscore_templates.html b/lms/templates/discussion/_underscore_templates.html index ee95045e07..d4de59be90 100644 --- a/lms/templates/discussion/_underscore_templates.html +++ b/lms/templates/discussion/_underscore_templates.html @@ -45,20 +45,20 @@