Add “comment” link to post before ajaxifying the replies.
[Sone.git] / src / main / resources / static / javascript / sone.js
index 3a84d9c..39999e9 100644 (file)
@@ -484,6 +484,9 @@ function ajaxifyPost(postElement) {
                return false;
        });
 
+       /* add “comment” link. */
+       addCommentLink(getPostId(postElement), postElement, $(postElement).find(".post-status-line .time"));
+
        /* process all replies. */
        $(postElement).find(".reply").each(function() {
                ajaxifyReply(this);
@@ -496,9 +499,6 @@ function ajaxifyPost(postElement) {
                });
        });
 
-       /* add “comment” link. */
-       addCommentLink(getPostId(postElement), postElement);
-
        /* hide reply input field. */
        $(postElement).find(".create-reply").addClass("hidden");
 }