From b050b68189e4cb674b1ef2760a5c4c6f798a114d Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Wed, 24 May 2017 10:52:52 +0000 Subject: Fix user and issues autocomplete in diff notes --- app/views/projects/commit/show.html.haml | 2 +- app/views/projects/issues/_discussion.html.haml | 2 +- app/views/projects/merge_requests/_discussion.html.haml | 2 +- app/views/projects/snippets/show.html.haml | 2 +- app/views/shared/notes/_notes_with_form.html.haml | 2 +- app/views/snippets/show.html.haml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index 6051ea2f1ce..3a1be3fa4b6 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -13,7 +13,7 @@ .block-connector = render "projects/diffs/diffs", diffs: @diffs, environment: @environment - = render "shared/notes/notes_with_form" + = render "shared/notes/notes_with_form", :autocomplete => true - if can_collaborate_with_project? - %w(revert cherry-pick).each do |type| = render "projects/commit/change", type: type, commit: @commit, title: @commit.title diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 4dfda54feb5..c9ecfc81266 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -4,4 +4,4 @@ = link_to 'Close issue', issue_path(@issue, issue: {state_event: :close}, format: 'json'), data: {no_turbolink: true, original_text: "Close issue", alternative_text: "Comment & close issue"}, class: "btn btn-nr btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close issue' #notes - = render 'shared/notes/notes_with_form' + = render 'shared/notes/notes_with_form', :autocomplete => true diff --git a/app/views/projects/merge_requests/_discussion.html.haml b/app/views/projects/merge_requests/_discussion.html.haml index 2e6420db212..b787edb3427 100644 --- a/app/views/projects/merge_requests/_discussion.html.haml +++ b/app/views/projects/merge_requests/_discussion.html.haml @@ -8,4 +8,4 @@ %button.btn.btn-nr.btn-default.append-right-10.js-comment-resolve-button{ "v-if" => "showButton", type: "submit", data: { project_path: "#{project_path(@merge_request.project)}" } } {{ buttonText }} -#notes= render "shared/notes/notes_with_form" +#notes= render "shared/notes/notes_with_form", :autocomplete => true diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml index aab1c043e66..847f3c2f348 100644 --- a/app/views/projects/snippets/show.html.haml +++ b/app/views/projects/snippets/show.html.haml @@ -9,4 +9,4 @@ .row-content-block.top-block.content-component-block = render 'award_emoji/awards_block', awardable: @snippet, inline: true - #notes= render "shared/notes/notes_with_form" + #notes= render "shared/notes/notes_with_form", :autocomplete => true diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml index 05bb1970e21..785b1b22a49 100644 --- a/app/views/shared/notes/_notes_with_form.html.haml +++ b/app/views/shared/notes/_notes_with_form.html.haml @@ -23,4 +23,4 @@ to post a comment :javascript - var notes = new Notes("#{notes_url}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}", false) + var notes = new Notes("#{notes_url}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}", #{autocomplete}) diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 51dbbc32cc9..216184eb839 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -9,4 +9,4 @@ .row-content-block.top-block.content-component-block = render 'award_emoji/awards_block', awardable: @snippet, inline: true - #notes= render "shared/notes/notes_with_form" + #notes= render "shared/notes/notes_with_form", :autocomplete => false -- cgit v1.2.1