summaryrefslogtreecommitdiff
path: root/app/views/layouts/_init_auto_complete.html.haml
diff options
context:
space:
mode:
authorFrancesco Levorato <git@flevour.net>2015-09-17 16:50:20 +0200
committerFrancesco Levorato <git@flevour.net>2015-09-18 16:35:53 +0200
commit322913f331dddc811760f7d42201974b02aa9f5e (patch)
treed8667acc8bd89cd6863dc9535a79bb16e779e5d8 /app/views/layouts/_init_auto_complete.html.haml
parentac571623d88314c89773ecdb484fc1c4ea92de1a (diff)
downloadgitlab-ce-322913f331dddc811760f7d42201974b02aa9f5e.tar.gz
Fix URL targets for uploads, markdown preview and autocomplete in MR textareas
Diffstat (limited to 'app/views/layouts/_init_auto_complete.html.haml')
-rw-r--r--app/views/layouts/_init_auto_complete.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml
index 3c58f10e759..035fe0056d3 100644
--- a/app/views/layouts/_init_auto_complete.html.haml
+++ b/app/views/layouts/_init_auto_complete.html.haml
@@ -1,3 +1,4 @@
+- project = @target_project || @project
:javascript
- GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(@project.namespace, @project, type: @noteable.class, type_id: params[:id])}"
+ GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: @noteable.class, type_id: params[:id])}"
GitLab.GfmAutoComplete.setup();