Do not delete comment containers; replace them with success message. This also fixes a visual bug when deleting the last comment
This commit is contained in:
@ -90,6 +90,12 @@
|
||||
border: 1px solid #cccccc;
|
||||
padding: 15px;
|
||||
|
||||
.comment-removed {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.popover-actions {
|
||||
display: flex;
|
||||
|
||||
|
@ -308,11 +308,7 @@ also, all settings from the rails model needed for the editor configuration in t
|
||||
var commentId = $(event.target).data('comment-id');
|
||||
deleteComment(commentId, editor, fileid, function () {
|
||||
var parent = $(button).parent().parent();
|
||||
parent.siblings().first().remove(); // potential divider
|
||||
parent.remove(); // the comment itself
|
||||
if (container.html() === '') {
|
||||
otherComments.hide();
|
||||
}
|
||||
parent.html('<div class="comment-removed"><%= t('comments.deleted') %></div>');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -156,6 +156,9 @@ de:
|
||||
user_exercise_feedback:
|
||||
one: Feedback
|
||||
other: Feedback
|
||||
comment:
|
||||
one: Kommentar
|
||||
other: Kommentare
|
||||
errors:
|
||||
messages:
|
||||
together: 'muss zusammen mit %{attribute} definiert werden'
|
||||
@ -584,4 +587,6 @@ de:
|
||||
estimated_time_20_to_30: "zwischen 20 und 30 Minuten"
|
||||
estimated_time_more_30: "mehr als 30 Minuten"
|
||||
working_time: "Geschätze Bearbeitungszeit für diese Aufgabe:"
|
||||
comments:
|
||||
deleted: "Gelöscht"
|
||||
|
||||
|
@ -177,6 +177,9 @@ en:
|
||||
user_exercise_feedback:
|
||||
one: Feedback
|
||||
other: Feedback
|
||||
comment:
|
||||
one: Comment
|
||||
other: Comments
|
||||
errors:
|
||||
messages:
|
||||
together: 'has to be set along with %{attribute}'
|
||||
@ -605,3 +608,5 @@ en:
|
||||
estimated_time_20_to_30: "between 20 and 30 minutes"
|
||||
estimated_time_more_30: "more than 30 minutes"
|
||||
working_time: "Estimated time working on this exercise:"
|
||||
comments:
|
||||
deleted: "Deleted"
|
||||
|
Reference in New Issue
Block a user