Commit 2978be2e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'rs-fix-shortcut-help' into 'master'

Fix the "Show all" link for the keyboard shortcut modal

18cb430f introduced a typo that made this stop working.

See merge request !2218
parents 202010e3 e7314e4c
...@@ -49,7 +49,7 @@ class Dispatcher ...@@ -49,7 +49,7 @@ class Dispatcher
new DropzoneInput($('.release-form')) new DropzoneInput($('.release-form'))
when 'projects:merge_requests:show' when 'projects:merge_requests:show'
new Diff() new Diff()
shortcut_handler = new ShortcutsIssuable() shortcut_handler = new ShortcutsIssuable(true)
new ZenMode() new ZenMode()
when "projects:merge_requests:diffs" when "projects:merge_requests:diffs"
new Diff() new Diff()
......
...@@ -7,7 +7,7 @@ class @Shortcuts ...@@ -7,7 +7,7 @@ class @Shortcuts
selectiveHelp: (e) => selectiveHelp: (e) =>
Shortcuts.showHelp(e, @enabledHelp) Shortcuts.showHelp(e, @enabledHelp)
@showHelp: (e, location) -> @showHelp: (e, location) ->
if $('#modal-shortcuts').length > 0 if $('#modal-shortcuts').length > 0
$('#modal-shortcuts').modal('show') $('#modal-shortcuts').modal('show')
...@@ -17,8 +17,7 @@ class @Shortcuts ...@@ -17,8 +17,7 @@ class @Shortcuts
dataType: 'script', dataType: 'script',
success: (e) -> success: (e) ->
if location and location.length > 0 if location and location.length > 0
for l in location $(l).show() for l in location
$(l).show()
else else
$('.hidden-shortcut').show() $('.hidden-shortcut').show()
$('.js-more-help-button').remove() $('.js-more-help-button').remove()
...@@ -28,3 +27,8 @@ class @Shortcuts ...@@ -28,3 +27,8 @@ class @Shortcuts
@focusSearch: (e) -> @focusSearch: (e) ->
$('#search').focus() $('#search').focus()
e.preventDefault() e.preventDefault()
$(document).on 'click.more_help', '.js-more-help-button', (e) ->
$(@).remove()
$('.hidden-shortcut').show()
e.preventDefault()
...@@ -219,11 +219,3 @@ ...@@ -219,11 +219,3 @@
%td.shortcut %td.shortcut
.key r .key r
%td Reply (quoting selected text) %td Reply (quoting selected text)
:javascript
$('.js-more-help-button').click(function (e) {
$(this).remove()l
$('.hidden-shortcut').show();
e.preventDefault();
});
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