summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-09-25 15:36:45 +0300
committerJonas Franz <info@jonasfranz.software>2018-09-25 14:36:45 +0200
commit4092b32bada4e279e8b95d4d56284599f0449eef (patch)
tree3e54dc2aed222519f5181ca474d3e59e7d78d41e /public/js
parent36e7cb975536adc774e854f64a70694ba3a1e87f (diff)
downloadgitea-4092b32bada4e279e8b95d4d56284599f0449eef.tar.gz
gitea-4092b32bada4e279e8b95d4d56284599f0449eef.zip
Fix preview when adding new code review comment (#4975)
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 1544069921..4f55e23174 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -834,10 +834,8 @@ function initPullRequestReview() {
if (commentCloud.length === 0) {
td.html(form);
commentCloud = td.find('.comment-code-cloud');
- var id = assingMenuAttributes(commentCloud.find('.menu'));
- commentCloud.find('.tab.segment').each(function(i, item) {
- $(item).attr('data-tab', $(item).attr('data-tab') + id);
- });
+ assingMenuAttributes(commentCloud.find('.menu'));
+
td.find("input[name='line']").val(idx);
td.find("input[name='side']").val(side === "left" ? "previous":"proposed");
td.find("input[name='path']").val(path);
@@ -860,8 +858,6 @@ function assingMenuAttributes(menu) {
}
function initRepositoryCollaboration() {
- console.log('initRepositoryCollaboration');
-
// Change collaborator access mode
$('.access-mode.menu .item').click(function () {
var $menu = $(this).parent();
@@ -1187,8 +1183,6 @@ function initOrganization() {
}
function initUserSettings() {
- console.log('initUserSettings');
-
// Options
if ($('.user.settings.profile').length > 0) {
$('#username').keyup(function () {
@@ -2650,8 +2644,7 @@ function cancelCodeComment(btn) {
if(form.length > 0 && form.hasClass('comment-form')) {
form.addClass('hide');
form.parent().find('button.comment-form-reply').show();
- }else {
- console.log("Hey");
+ } else {
form.closest('.comment-code-cloud').remove()
}
}