inputField = $(this.form).find(":input:enabled").get(0);
postId = getPostId(this);
text = $(inputField).val();
- $(inputField).val("");
postReply(postId, text, function(success, error, replyId) {
if (success) {
+ $(inputField).val("");
loadNewReply(replyId);
markPostAsKnown(getPostElement(inputField));
$("#sone .post#" + postId + " .create-reply").addClass("hidden");
if (replyId in loadedReplies) {
return;
}
- loadedReplies[replyId] = true;
$.getJSON("getReply.ajax", { "reply": replyId }, function(data, textStatus) {
+ if (replyId in loadedReplies) {
+ return;
+ }
+ loadedReplies[replyId] = true;
/* find post. */
if ((data != null) && data.success) {
$("#sone .post#" + data.reply.postId).each(function() {
ajaxifyReply(newReply);
newReply.slideDown();
setActivity();
+ return false;
});
}
});