Let the comment form remain when posting a top-level comment.
This commit is contained in:
parent
94716a0dcb
commit
9a774d082d
|
@ -171,7 +171,12 @@ var _Lobsters = Class.extend({
|
|||
|
||||
postComment: function(form) {
|
||||
$.post($(form).attr("action"), $(form).serializeArray(), function(data) {
|
||||
$(form).closest('.comment').replaceWith($.parseHTML(data));
|
||||
if ($(form).find('#parent_comment_short_id').length) {
|
||||
$(form).closest('.comment').replaceWith($.parseHTML(data));
|
||||
} else {
|
||||
$(form).closest('.comment').after($.parseHTML(data));
|
||||
$(form).find('textarea').val('');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue