Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-12-28 04:34:46 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-12-28 04:34:46 +0300
commite7314e4c278dc754882c95a4c037e72fd583f4d2 (patch)
tree222f6787e70fb8dde7e32431eb7a4abc7ba2a2f6 /app/assets/javascripts/shortcuts.js.coffee
parenta97a2d27205637ea2ff6da112dabc1499c37ccfe (diff)
Fix the "Show all" link for the keyboard shortcut modal
Diffstat (limited to 'app/assets/javascripts/shortcuts.js.coffee')
-rw-r--r--app/assets/javascripts/shortcuts.js.coffee10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/shortcuts.js.coffee b/app/assets/javascripts/shortcuts.js.coffee
index e9aeb1e9525..4d915bfc8c5 100644
--- a/app/assets/javascripts/shortcuts.js.coffee
+++ b/app/assets/javascripts/shortcuts.js.coffee
@@ -7,7 +7,7 @@ class @Shortcuts
selectiveHelp: (e) =>
Shortcuts.showHelp(e, @enabledHelp)
-
+
@showHelp: (e, location) ->
if $('#modal-shortcuts').length > 0
$('#modal-shortcuts').modal('show')
@@ -17,8 +17,7 @@ class @Shortcuts
dataType: 'script',
success: (e) ->
if location and location.length > 0
- for l in location
- $(l).show()
+ $(l).show() for l in location
else
$('.hidden-shortcut').show()
$('.js-more-help-button').remove()
@@ -28,3 +27,8 @@ class @Shortcuts
@focusSearch: (e) ->
$('#search').focus()
e.preventDefault()
+
+$(document).on 'click.more_help', '.js-more-help-button', (e) ->
+ $(@).remove()
+ $('.hidden-shortcut').show()
+ e.preventDefault()