Skip to content

Commit 4092b32

Browse files
lafriksjonasfranz
authored andcommitted
Fix preview when adding new code review comment (#4975)
1 parent 36e7cb9 commit 4092b32

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

public/js/index.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,8 @@ function initPullRequestReview() {
834834
if (commentCloud.length === 0) {
835835
td.html(form);
836836
commentCloud = td.find('.comment-code-cloud');
837-
var id = assingMenuAttributes(commentCloud.find('.menu'));
838-
commentCloud.find('.tab.segment').each(function(i, item) {
839-
$(item).attr('data-tab', $(item).attr('data-tab') + id);
840-
});
837+
assingMenuAttributes(commentCloud.find('.menu'));
838+
841839
td.find("input[name='line']").val(idx);
842840
td.find("input[name='side']").val(side === "left" ? "previous":"proposed");
843841
td.find("input[name='path']").val(path);
@@ -860,8 +858,6 @@ function assingMenuAttributes(menu) {
860858
}
861859

862860
function initRepositoryCollaboration() {
863-
console.log('initRepositoryCollaboration');
864-
865861
// Change collaborator access mode
866862
$('.access-mode.menu .item').click(function () {
867863
var $menu = $(this).parent();
@@ -1187,8 +1183,6 @@ function initOrganization() {
11871183
}
11881184

11891185
function initUserSettings() {
1190-
console.log('initUserSettings');
1191-
11921186
// Options
11931187
if ($('.user.settings.profile').length > 0) {
11941188
$('#username').keyup(function () {
@@ -2650,8 +2644,7 @@ function cancelCodeComment(btn) {
26502644
if(form.length > 0 && form.hasClass('comment-form')) {
26512645
form.addClass('hide');
26522646
form.parent().find('button.comment-form-reply').show();
2653-
}else {
2654-
console.log("Hey");
2647+
} else {
26552648
form.closest('.comment-code-cloud').remove()
26562649
}
26572650
}

0 commit comments

Comments
 (0)