|
|
@ -942,6 +942,28 @@ async function initRepository() { |
|
|
|
action: 'hide' |
|
|
|
action: 'hide' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Previous/Next code review conversation
|
|
|
|
|
|
|
|
$(document).on('click', '.previous-conversation', (e) => { |
|
|
|
|
|
|
|
const $conversation = $(e.currentTarget).closest('.comment-code-cloud'); |
|
|
|
|
|
|
|
const $conversations = $('.comment-code-cloud:not(.hide)'); |
|
|
|
|
|
|
|
const index = $conversations.index($conversation); |
|
|
|
|
|
|
|
if (index !== 0) { |
|
|
|
|
|
|
|
const $previousConversation = $conversations.eq(index - 1); |
|
|
|
|
|
|
|
const anchor = $previousConversation.find('.comment').first().attr('id'); |
|
|
|
|
|
|
|
window.location.href = `#${anchor}`; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$(document).on('click', '.next-conversation', (e) => { |
|
|
|
|
|
|
|
const $conversation = $(e.currentTarget).closest('.comment-code-cloud'); |
|
|
|
|
|
|
|
const $conversations = $('.comment-code-cloud:not(.hide)'); |
|
|
|
|
|
|
|
const index = $conversations.index($conversation); |
|
|
|
|
|
|
|
if (index !== $conversations.length - 1) { |
|
|
|
|
|
|
|
const $nextConversation = $conversations.eq(index + 1); |
|
|
|
|
|
|
|
const anchor = $nextConversation.find('.comment').first().attr('id'); |
|
|
|
|
|
|
|
window.location.href = `#${anchor}`; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Quote reply
|
|
|
|
// Quote reply
|
|
|
|
$(document).on('click', '.quote-reply', function (event) { |
|
|
|
$(document).on('click', '.quote-reply', function (event) { |
|
|
|
$(this).closest('.dropdown').find('.menu').toggle('visible'); |
|
|
|
$(this).closest('.dropdown').find('.menu').toggle('visible'); |
|
|
|