Fixed GFM autocomplete not loading on wiki pages

Closes #19580
This commit is contained in:
Phil Hughes 2016-07-07 12:18:33 +01:00
parent ecfbb96384
commit 08f14ef448
2 changed files with 6 additions and 5 deletions

View file

@ -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.

View file

@ -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();