comment view: ignore multiple clicks on "reply" link
This commit is contained in:
parent
f161af71b1
commit
d6447ac249
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue