Commit 1217b5b4 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'shortcuts-help' into 'master'

Fix help keyboard shortcut for relative URL setups

Fixes gitlab-org/gitlab-ce#12751

See merge request !3016
parents 5b0cada7 8be19db9
...@@ -14,6 +14,7 @@ v 8.5.2 ...@@ -14,6 +14,7 @@ v 8.5.2
- Fix sidebar overlapping content when screen width was below 1200px - Fix sidebar overlapping content when screen width was below 1200px
- Fix error 500 when commenting on a commit - Fix error 500 when commenting on a commit
- Fix broken icons on installations with relative URL (Artem Sidorenko) - Fix broken icons on installations with relative URL (Artem Sidorenko)
- Fix help keyboard shortcut on relative URL setups (Artem Sidorenko)
v 8.5.1 v 8.5.1
- Fix group projects styles - Fix group projects styles
......
...@@ -13,8 +13,10 @@ class @Shortcuts ...@@ -13,8 +13,10 @@ class @Shortcuts
if $('#modal-shortcuts').length > 0 if $('#modal-shortcuts').length > 0
$('#modal-shortcuts').modal('show') $('#modal-shortcuts').modal('show')
else else
url = '/help/shortcuts'
url = gon.relative_url_root + url if gon.relative_url_root?
$.ajax( $.ajax(
url: '/help/shortcuts', url: url,
dataType: 'script', dataType: 'script',
success: (e) -> success: (e) ->
if location and location.length > 0 if location and location.length > 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment