Merge branch 'rs-fix-shortcut-help' into 'master'
Fix the "Show all" link for the keyboard shortcut modal
18cb430f79
introduced a typo that made this stop working.
See merge request !2218
This commit is contained in:
commit
2978be2e22
|
@ -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
|
||||||
|
|
||||||
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
|
||||||
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
|
||||||
@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 @@
|
||||||
%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();
|
|
||||||
});
|
|
||||||
|
|
Loading…
Reference in New Issue