|
|
|
|
@ -47,13 +47,15 @@ |
|
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
function myFunction(divID) { |
|
|
|
|
var x = document.getElementById(divID); |
|
|
|
|
if (x.style.display === "none") { |
|
|
|
|
x.style.display = "block"; |
|
|
|
|
} else { |
|
|
|
|
x.style.display = "none"; |
|
|
|
|
var x = document.getElementById("div_" + divID); |
|
|
|
|
if (x.style.display === "none") { |
|
|
|
|
x.style.display = "block"; |
|
|
|
|
window.location.hash = "sub_" + divID; |
|
|
|
|
document.getElementById("text_" + divID).focus(); |
|
|
|
|
} else { |
|
|
|
|
x.style.display = "none"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<br/> |
|
|
|
|
@ -81,13 +83,13 @@ |
|
|
|
|
</form> |
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
<button class="secondary_button inline" onclick="myFunction('div_{{ comment.id }}')">reply</button> |
|
|
|
|
<button class="secondary_button inline" onclick="myFunction('{{ comment.id }}')">reply</button> |
|
|
|
|
|
|
|
|
|
<div id="div_{{ comment.id }}" class="inline reply_form" style="display:none"> |
|
|
|
|
<form action="{% url 'news:comment_with_parent' post.id comment.id %}" method="post"> |
|
|
|
|
{% csrf_token %} |
|
|
|
|
<textarea name="body" rows="3" cols="50"></textarea> |
|
|
|
|
<button class="primary_button" type="submit">Submit</button> |
|
|
|
|
<textarea id="text_{{ comment.id}}" name="body" rows="3" cols="50"></textarea> |
|
|
|
|
<button id="sub_{{ comment.id}}" class="primary_button" type="submit">Submit</button> |
|
|
|
|
</form> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|