application.js: always replace comment form in submit/preview
This commit is contained in:
parent
e4bb55ee4e
commit
0c1516bb14
|
@ -174,12 +174,7 @@ var _Lobsters = Class.extend({
|
||||||
if ($(form).find('#parent_comment_short_id').length) {
|
if ($(form).find('#parent_comment_short_id').length) {
|
||||||
$(form).closest('.comment').replaceWith($.parseHTML(data));
|
$(form).closest('.comment').replaceWith($.parseHTML(data));
|
||||||
} else {
|
} else {
|
||||||
if ($(form).attr("id").match(/^edit_comment_.+$/)) {
|
$(form).parent(".comment").replaceWith($.parseHTML(data));
|
||||||
$(form).parent(".comment").replaceWith($.parseHTML(data));
|
|
||||||
} else {
|
|
||||||
$(form).closest('.comment').after($.parseHTML(data));
|
|
||||||
$(form).find('textarea').val('');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue