Fix: Actually get rid of the notice when posting the first comment.

This commit is contained in:
flash 2018-10-08 15:28:19 +02:00
parent a89c634799
commit a103701d6a

View file

@ -175,7 +175,7 @@
{{ comments_entry(comment, 1, category, user, perms) }} {{ comments_entry(comment, 1, category, user, perms) }}
{% endfor %} {% endfor %}
{% else %} {% else %}
<div class="comments__none"> <div class="comments__none" id="_no_comments_notice_{{ category.category_id }}">
There are no comments yet. There are no comments yet.
</div> </div>
{% endif %} {% endif %}
@ -489,6 +489,9 @@
parent.insertBefore(commentElement, parent.firstElementChild); parent.insertBefore(commentElement, parent.firstElementChild);
timeago().render(commentTime); timeago().render(commentTime);
var placeholder = document.getElementById('_no_comments_notice_' + comment.category_id);
placeholder.parentNode.removeChild(placeholder);
} }
</script> </script>
{% endif %} {% endif %}