summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-03-02 09:13:19 +0000
committerRémy Coutable <remy@rymai.me>2016-03-02 09:13:19 +0000
commit1217b5b489f72bbbb6df5103c8fc79978ef1fdc7 (patch)
treec3d89c84780bdbee20ae1132a41c39655ada510c
parent5b0cada76443acbf54634189a66ecda01c7cdb26 (diff)
parent8be19db9d4e62842e17f7b71e83447f680fb2103 (diff)
downloadgitlab-ce-1217b5b489f72bbbb6df5103c8fc79978ef1fdc7.tar.gz
Merge branch 'shortcuts-help' into 'master'
Fix help keyboard shortcut for relative URL setups Fixes gitlab-org/gitlab-ce#12751 See merge request !3016
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/shortcuts.js.coffee4
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 6bc25d6a0e8..b7e88d47a01 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,7 @@ v 8.5.2
- Fix sidebar overlapping content when screen width was below 1200px
- Fix error 500 when commenting on a commit
- Fix broken icons on installations with relative URL (Artem Sidorenko)
+ - Fix help keyboard shortcut on relative URL setups (Artem Sidorenko)
v 8.5.1
- Fix group projects styles
diff --git a/app/assets/javascripts/shortcuts.js.coffee b/app/assets/javascripts/shortcuts.js.coffee
index f141fb69c3e..9c7c2474aa4 100644
--- a/app/assets/javascripts/shortcuts.js.coffee
+++ b/app/assets/javascripts/shortcuts.js.coffee
@@ -13,8 +13,10 @@ class @Shortcuts
if $('#modal-shortcuts').length > 0
$('#modal-shortcuts').modal('show')
else
+ url = '/help/shortcuts'
+ url = gon.relative_url_root + url if gon.relative_url_root?
$.ajax(
- url: '/help/shortcuts',
+ url: url,
dataType: 'script',
success: (e) ->
if location and location.length > 0