diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-06-28 20:10:06 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-06-28 20:10:06 +0100 |
commit | 73d43c5c25aee1d35a0658b20272e21262e4a53c (patch) | |
tree | 365dd0ec20ff093080d1e23f9f9f958fe15844e6 | |
parent | 1ade080ec89eb6be67a03dc82a1002ad7fd9d51c (diff) | |
download | gitlab-ce-19157-use-shortcuts-is-not-working-on-gitlab-com-help.tar.gz |
Exposed 'onToggleHelp() to window object so showHelp() can be a global function'19157-use-shortcuts-is-not-working-on-gitlab-com-help
-rw-r--r-- | app/assets/javascripts/shortcuts.js.coffee | 1 | ||||
-rw-r--r-- | app/views/help/index.html.haml | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/shortcuts.js.coffee b/app/assets/javascripts/shortcuts.js.coffee index c03877e9b06..e7fa3284631 100644 --- a/app/assets/javascripts/shortcuts.js.coffee +++ b/app/assets/javascripts/shortcuts.js.coffee @@ -6,6 +6,7 @@ class @Shortcuts Mousetrap.bind('s', Shortcuts.focusSearch) Mousetrap.bind(['ctrl+shift+p', 'command+shift+p'], @toggleMarkdownPreview) Mousetrap.bind('t', -> Turbolinks.visit(findFileURL)) if findFileURL? + window.showHelp = @onToggleHelp onToggleHelp: (e) => e.preventDefault() diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index 57bc91ea5a9..f744a338c66 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -36,6 +36,6 @@ %ul.well-list %li= link_to 'See our website for getting help', promo_url + '/getting-help/' %li= link_to 'Use the search bar on the top of this page', '#', onclick: 'Shortcuts.focusSearch(event)' - %li= link_to 'Use shortcuts', '#', onclick: 'Shortcuts.showHelp(event)' + %li= link_to 'Use shortcuts', '#', onclick: 'showHelp(event)' %li= link_to 'Get a support subscription', 'https://about.gitlab.com/pricing/' %li= link_to 'Compare GitLab editions', 'https://about.gitlab.com/features/#compare' |