summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-07-20 01:30:16 +0000
committerJacob Schatz <jschatz@gitlab.com>2016-07-20 01:30:16 +0000
commitf2cd21e8946dcef13e8be408b96b079b5ced682a (patch)
treed18f58bf80100c75dfdbc8e9f3a0093b987d8f9f
parentb9ed9d658ad447a64d58b2040849a7cc0e698287 (diff)
parentde6ca8ef3a8ae6f783dc1b0684e7ad65be388564 (diff)
downloadgitlab-ce-f2cd21e8946dcef13e8be408b96b079b5ced682a.tar.gz
Merge branch 'wiki-gfm-autocomplete' into 'master'
Fixed GFM autocomplete not loading on wiki pages ## What does this MR do? Allows the GFM autocomplete to work on wiki pages. ## What are the relevant issue numbers? Closes #19580 See merge request !5132
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/layouts/_init_auto_complete.html.haml10
2 files changed, 6 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d60d25d9ac4..b1a713108c0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -35,6 +35,7 @@ v 8.10.0 (unreleased)
- Added day name to contribution calendar tooltips
- 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
- Support U2F devices in Firefox. !5177
- Fix issue, preventing users w/o push access to sort tags !5105 (redetection)
diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml
index 12e7ed0e792..351100f3523 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.class if @noteable.present?
-- 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();