diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-07 12:18:33 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-07 12:18:33 +0100 |
commit | 08f14ef4488517bd7408eb69ec07f5e1a350d8fa (patch) | |
tree | 4cdac48014ddd2e714ea90166c489dcbfeae8719 | |
parent | ecfbb96384b2712aaf6c03dd04a3236b0578e18d (diff) | |
download | gitlab-ce-08f14ef4488517bd7408eb69ec07f5e1a350d8fa.tar.gz |
Fixed GFM autocomplete not loading on wiki pages
Closes #19580
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/views/layouts/_init_auto_complete.html.haml | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG index bc9bb7747a4..93586ca7a7b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ v 8.10.0 (unreleased) - Let Workhorse serve format-patch diffs - Make images fit to the size of the viewport !4810 - Fix check for New Branch button on Issue page !4630 (winniehell) + - Fix GFM autocomplete not working on wiki pages - Fix MR-auto-close text added to description. !4836 - Fix issue, preventing users w/o push access to sort tags !5105 (redetection) - Add Spring EmojiOne updates. diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml index 12e7ed0e792..79483d629d0 100644 --- a/app/views/layouts/_init_auto_complete.html.haml +++ b/app/views/layouts/_init_auto_complete.html.haml @@ -1,7 +1,7 @@ - project = @target_project || @project +- noteable_class = @noteable.nil? ? nil : @noteable.class -- if @noteable - :javascript - GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: @noteable.class, type_id: params[:id])}" - GitLab.GfmAutoComplete.cachedData = undefined; - GitLab.GfmAutoComplete.setup(); +:javascript + GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_namespace_project_path(project.namespace, project, type: noteable_class, type_id: params[:id])}" + GitLab.GfmAutoComplete.cachedData = undefined; + GitLab.GfmAutoComplete.setup(); |