oops previous commit breaks comments (now fixed)
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -45,20 +45,20 @@
|
||||
</script>
|
||||
|
||||
<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="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>
|
||||
<p class="posted-details" title="${'<%- created_at %>'}">Sometime</p>
|
||||
</header>
|
||||
<div class="local"><div class="response-body">${"<%- body %>"}</div></div>
|
||||
<ul class="moderator-actions local">
|
||||
<div class="response-local"><div class="response-body">${"<%- body %>"}</div></div>
|
||||
<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-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>
|
||||
</ul>
|
||||
<ol class="comments">
|
||||
<li>
|
||||
<li class="response-local">
|
||||
<form class="comment-form">
|
||||
<input type="text" placeholder="Comment..." class="comment-form-input">
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user