summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-02-23 11:28:23 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-02-23 11:28:23 -0500
commit8129d1675f8e96cd2faa9b54e284fa5de8a02006 (patch)
tree5b9bad54b7c4d9a896cdae5a30b97e08de4fa441
parent1142b327e8f87c9ecb2ed86f23bf9a1998433956 (diff)
downloadgitlab-ce-8129d1675f8e96cd2faa9b54e284fa5de8a02006.tar.gz
Add "e" shortcut to edit issuableissue_13510
-rw-r--r--app/assets/javascripts/shortcuts_issuable.coffee8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/assets/javascripts/shortcuts_issuable.coffee b/app/assets/javascripts/shortcuts_issuable.coffee
index cefa1857d7f..bbf02f1db24 100644
--- a/app/assets/javascripts/shortcuts_issuable.coffee
+++ b/app/assets/javascripts/shortcuts_issuable.coffee
@@ -24,6 +24,10 @@ class @ShortcutsIssuable extends ShortcutsNavigation
@nextIssue()
return false
)
+ Mousetrap.bind('e', =>
+ @editIssue()
+ return false
+ )
if isMergeRequest
@@ -63,3 +67,7 @@ class @ShortcutsIssuable extends ShortcutsNavigation
# Focus the input field
replyField.focus()
+
+ editIssue: ->
+ $editBtn = $('.issuable-edit')
+ Turbolinks.visit($editBtn.attr('href'))