Update parent comment responses count when a new reply is created
Extract the needed portion of code to a new partial to be able to update only the elements needed when a new comment is added keeping UI properly updated.
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
$(this).text(new_val);
|
||||
});
|
||||
},
|
||||
update_responses_count: function(comment_id, responses_count_html) {
|
||||
$(comment_id + "_reply .responses-count").html(responses_count_html);
|
||||
},
|
||||
display_error: function(field_with_errors, error_html) {
|
||||
$(error_html).insertAfter($("" + field_with_errors));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user