Exposed 'onToggleHelp() to window object so showHelp() can be a global function'
Removed from window and used static method
This commit is contained in:
parent
84113d7e72
commit
8cdee2bab2
|
@ -9,12 +9,12 @@ class @Shortcuts
|
||||||
|
|
||||||
onToggleHelp: (e) =>
|
onToggleHelp: (e) =>
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@toggleHelp(@enabledHelp)
|
Shortcuts.toggleHelp(@enabledHelp)
|
||||||
|
|
||||||
toggleMarkdownPreview: (e) =>
|
toggleMarkdownPreview: (e) ->
|
||||||
$(document).triggerHandler('markdown-preview:toggle', [e])
|
$(document).triggerHandler('markdown-preview:toggle', [e])
|
||||||
|
|
||||||
toggleHelp: (location) ->
|
@toggleHelp: (location) ->
|
||||||
$modal = $('#modal-shortcuts')
|
$modal = $('#modal-shortcuts')
|
||||||
|
|
||||||
if $modal.length
|
if $modal.length
|
||||||
|
|
|
@ -36,6 +36,6 @@
|
||||||
%ul.well-list
|
%ul.well-list
|
||||||
%li= link_to 'See our website for getting help', promo_url + '/getting-help/'
|
%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 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: 'Shortcuts.toggleHelp()'
|
||||||
%li= link_to 'Get a support subscription', 'https://about.gitlab.com/pricing/'
|
%li= link_to 'Get a support subscription', 'https://about.gitlab.com/pricing/'
|
||||||
%li= link_to 'Compare GitLab editions', 'https://about.gitlab.com/features/#compare'
|
%li= link_to 'Compare GitLab editions', 'https://about.gitlab.com/features/#compare'
|
||||||
|
|
Loading…
Reference in New Issue