comment view: ignore multiple clicks on "reply" link

This commit is contained in:
joshua stein 2014-11-14 13:49:00 -06:00
parent f161af71b1
commit d6447ac249

View file

@ -293,10 +293,14 @@ $(document).ready(function() {
}
var comment = $(this).closest(".comment");
if ($("#reply_form_" + comment.attr("id")).length > 0)
return false;
var replies = comment.nextAll(".comments").first();
$.get("/comments/" + comment.attr("data-shortid") + "/reply",
function(data) {
var reply = $($.parseHTML(data));
reply.attr("id", "reply_form_" + comment.attr("id"));
replies.prepend(reply);
reply.find("textarea").focus();
});