mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 15:07:51 +01:00
Fix preview when adding new code review comment (#4975)
This commit is contained in:
parent
36e7cb9755
commit
4092b32bad
@ -834,10 +834,8 @@ function initPullRequestReview() {
|
|||||||
if (commentCloud.length === 0) {
|
if (commentCloud.length === 0) {
|
||||||
td.html(form);
|
td.html(form);
|
||||||
commentCloud = td.find('.comment-code-cloud');
|
commentCloud = td.find('.comment-code-cloud');
|
||||||
var id = assingMenuAttributes(commentCloud.find('.menu'));
|
assingMenuAttributes(commentCloud.find('.menu'));
|
||||||
commentCloud.find('.tab.segment').each(function(i, item) {
|
|
||||||
$(item).attr('data-tab', $(item).attr('data-tab') + id);
|
|
||||||
});
|
|
||||||
td.find("input[name='line']").val(idx);
|
td.find("input[name='line']").val(idx);
|
||||||
td.find("input[name='side']").val(side === "left" ? "previous":"proposed");
|
td.find("input[name='side']").val(side === "left" ? "previous":"proposed");
|
||||||
td.find("input[name='path']").val(path);
|
td.find("input[name='path']").val(path);
|
||||||
@ -860,8 +858,6 @@ function assingMenuAttributes(menu) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initRepositoryCollaboration() {
|
function initRepositoryCollaboration() {
|
||||||
console.log('initRepositoryCollaboration');
|
|
||||||
|
|
||||||
// Change collaborator access mode
|
// Change collaborator access mode
|
||||||
$('.access-mode.menu .item').click(function () {
|
$('.access-mode.menu .item').click(function () {
|
||||||
var $menu = $(this).parent();
|
var $menu = $(this).parent();
|
||||||
@ -1187,8 +1183,6 @@ function initOrganization() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initUserSettings() {
|
function initUserSettings() {
|
||||||
console.log('initUserSettings');
|
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
if ($('.user.settings.profile').length > 0) {
|
if ($('.user.settings.profile').length > 0) {
|
||||||
$('#username').keyup(function () {
|
$('#username').keyup(function () {
|
||||||
@ -2651,7 +2645,6 @@ function cancelCodeComment(btn) {
|
|||||||
form.addClass('hide');
|
form.addClass('hide');
|
||||||
form.parent().find('button.comment-form-reply').show();
|
form.parent().find('button.comment-form-reply').show();
|
||||||
} else {
|
} else {
|
||||||
console.log("Hey");
|
|
||||||
form.closest('.comment-code-cloud').remove()
|
form.closest('.comment-code-cloud').remove()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user