diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-06-19 23:54:10 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-06-20 02:54:28 +0300 |
commit | cf41cf1fb33578b50df927541e415999920716f4 (patch) | |
tree | 429d8e8190b7432ce77892404c352ccf9de4ebcf /app/views | |
parent | 024c0f776606e38c7dd3743343a46b5f63991673 (diff) |
Merge branch '33594-disable-autocomplete-on-snippet-comments' into 'master'
Disable autocomplete on snippets comments
Closes #33594
See merge request !12108
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/_zen.html.haml | 13 | ||||
-rw-r--r-- | app/views/shared/notes/_form.html.haml | 13 | ||||
-rw-r--r-- | app/views/shared/notes/_notes_with_form.html.haml | 2 |
3 files changed, 27 insertions, 1 deletions
diff --git a/app/views/projects/_zen.html.haml b/app/views/projects/_zen.html.haml index 3b3d08ddd3c..74e681a48ed 100644 --- a/app/views/projects/_zen.html.haml +++ b/app/views/projects/_zen.html.haml @@ -1,10 +1,23 @@ - @gfm_form = true - current_text ||= nil +<<<<<<< HEAD - supports_slash_commands = local_assigns.fetch(:supports_slash_commands, false) .zen-backdrop - classes << ' js-gfm-input js-autosize markdown-area' - if defined?(f) && f = f.text_area attr, class: classes, placeholder: placeholder, data: { supports_slash_commands: supports_slash_commands } +======= +- supports_autocomplete = local_assigns.fetch(:supports_autocomplete, true) +- supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false) +.zen-backdrop + - classes << ' js-gfm-input js-autosize markdown-area' + - if defined?(f) && f + = f.text_area attr, + class: classes, + placeholder: placeholder, + data: { supports_quick_actions: supports_quick_actions, + supports_autocomplete: supports_autocomplete } +>>>>>>> be2ea8f... Merge branch '33594-disable-autocomplete-on-snippet-comments' into 'master' - else = text_area_tag attr, current_text, class: classes, placeholder: placeholder %a.zen-control.zen-control-leave.js-zen-leave{ href: "#" } diff --git a/app/views/shared/notes/_form.html.haml b/app/views/shared/notes/_form.html.haml index eaf50bc2115..7f33c5012c5 100644 --- a/app/views/shared/notes/_form.html.haml +++ b/app/views/shared/notes/_form.html.haml @@ -1,6 +1,13 @@ +<<<<<<< HEAD - supports_slash_commands = note_supports_slash_commands?(@note) - if supports_slash_commands - preview_url = preview_markdown_path(@project, slash_commands_target_type: @note.noteable_type, slash_commands_target_id: @note.noteable_id) +======= +- supports_autocomplete = local_assigns.fetch(:supports_autocomplete, true) +- supports_quick_actions = note_supports_quick_actions?(@note) +- if supports_quick_actions + - preview_url = preview_markdown_path(@project, quick_actions_target_type: @note.noteable_type, quick_actions_target_id: @note.noteable_id) +>>>>>>> be2ea8f... Merge branch '33594-disable-autocomplete-on-snippet-comments' into 'master' - else - preview_url = preview_markdown_path(@project) @@ -27,8 +34,14 @@ attr: :note, classes: 'note-textarea js-note-text', placeholder: "Write a comment or drag your files here...", +<<<<<<< HEAD supports_slash_commands: supports_slash_commands = render 'shared/notes/hints', supports_slash_commands: supports_slash_commands +======= + supports_quick_actions: supports_quick_actions, + supports_autocomplete: supports_autocomplete + = render 'shared/notes/hints', supports_quick_actions: supports_quick_actions +>>>>>>> be2ea8f... Merge branch '33594-disable-autocomplete-on-snippet-comments' into 'master' .error-alert .note-form-actions.clearfix diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml index 5902798dfd0..0cca8d875d2 100644 --- a/app/views/shared/notes/_notes_with_form.html.haml +++ b/app/views/shared/notes/_notes_with_form.html.haml @@ -12,7 +12,7 @@ %a.author_link{ href: user_path(current_user) } = image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40' .timeline-content.timeline-content-form - = render "shared/notes/form", view: diff_view + = render "shared/notes/form", view: diff_view, supports_autocomplete: autocomplete - elsif !current_user .disabled-comment.text-center.prepend-top-default Please |