_csrf: csrfToken,
}).done(() => {
const $conversationHolder = $this.closest('.conversation-holder');
-
+ const $parentTimelineItem = $this.closest('.timeline-item');
+ const $parentTimelineGroup = $this.closest('.timeline-item-group');
// Check if this was a pending comment.
if ($conversationHolder.find('.pending-label').length) {
const $counter = $('#review-box .review-comments-counter');
}
$conversationHolder.remove();
}
+ // Check if there is no review content, move the time avatar upward to avoid overlapping the content below.
+ if (!$parentTimelineGroup.find('.timeline-item.comment').length && !$parentTimelineItem.find('.conversation-holder').length) {
+ const $timelineAvatar = $parentTimelineGroup.find('.timeline-avatar');
+ $timelineAvatar.removeClass('timeline-avatar-offset');
+ }
});
}
return false;