Commit 0c6f05f4 by Rocky Duan

oops previous commit breaks comments (now fixed)

parent 5e58480b
class @ResponseCommentView extends DiscussionContentView class @ResponseCommentView extends DiscussionContentView
tagName: "li" tagName: "li"
template: _.template($("#response-comment-template").html()) template: _.template($("#response-comment-template").html())
initLocal: ->
@$local = @$el.find(".response-local")
@$delegateElement = @$local
render: -> render: ->
@$el.html(@template(@model.toJSON())) @$el.html(@template(@model.toJSON()))
@initLocal()
@delegateEvents()
@renderAttrs() @renderAttrs()
@$(".timeago").timeago() @$(".timeago").timeago()
@convertMath() @convertMath()
......
...@@ -4,7 +4,7 @@ class @ThreadResponseView extends DiscussionContentView ...@@ -4,7 +4,7 @@ class @ThreadResponseView extends DiscussionContentView
events: events:
"click .vote-btn": "toggleVote" "click .vote-btn": "toggleVote"
"submit form": "submitComment" "submit .comment-form": "submitComment"
"click .action-endorse": "toggleEndorse" "click .action-endorse": "toggleEndorse"
"click .action-delete": "delete" "click .action-delete": "delete"
......
...@@ -45,20 +45,20 @@ ...@@ -45,20 +45,20 @@
</script> </script>
<script type="text/template" id="thread-response-template"> <script type="text/template" id="thread-response-template">
<header class="local"> <header class="response-local">
<a href="javascript:void(0)" class="vote-btn" data-tooltip="vote"><span class="plus-icon"></span><span class="votes-count-number">${"<%- votes['up_count'] %>"}</span></a> <a href="javascript:void(0)" class="vote-btn" data-tooltip="vote"><span class="plus-icon"></span><span class="votes-count-number">${"<%- votes['up_count'] %>"}</span></a>
<a href="javascript:void(0)" class="endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse" style="cursor: default" data-tooltip="endorse"><span class="check-icon" style="pointer-events: none; "></span></a> <a href="javascript:void(0)" class="endorse-btn${'<% if (endorsed) { %> is-endorsed<% } %>'} action-endorse" style="cursor: default" data-tooltip="endorse"><span class="check-icon" style="pointer-events: none; "></span></a>
<a href="${'<%- user_url %>'}" class="posted-by">${"<%- username %>"}</a> <a href="${'<%- user_url %>'}" class="posted-by">${"<%- username %>"}</a>
<p class="posted-details" title="${'<%- created_at %>'}">Sometime</p> <p class="posted-details" title="${'<%- created_at %>'}">Sometime</p>
</header> </header>
<div class="local"><div class="response-body">${"<%- body %>"}</div></div> <div class="response-local"><div class="response-body">${"<%- body %>"}</div></div>
<ul class="moderator-actions local"> <ul class="moderator-actions response-local">
<li style="display: none"><a class="action-edit" href="javascript:void(0)"><span class="edit-icon"></span> Edit</a></li> <li style="display: none"><a class="action-edit" href="javascript:void(0)"><span class="edit-icon"></span> Edit</a></li>
<li style="display: none"><a class="action-delete" href="javascript:void(0)"><span class="delete-icon"></span> Delete</a></li> <li style="display: none"><a class="action-delete" href="javascript:void(0)"><span class="delete-icon"></span> Delete</a></li>
<li style="display: none"><a class="action-openclose" href="javascript:void(0)"><span class="edit-icon"></span> Close</a></li> <li style="display: none"><a class="action-openclose" href="javascript:void(0)"><span class="edit-icon"></span> Close</a></li>
</ul> </ul>
<ol class="comments"> <ol class="comments">
<li> <li class="response-local">
<form class="comment-form"> <form class="comment-form">
<input type="text" placeholder="Comment..." class="comment-form-input"> <input type="text" placeholder="Comment..." class="comment-form-input">
</form> </form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment