Merge branch 'issue_13510' into 'master'

Adds "e" shortcut to issuable pages which redirects to the Edit page

Closes #13510

See merge request !2945
This commit is contained in:
Jacob Schatz 2016-02-23 18:21:45 +00:00
commit 52ac5242d1
3 changed files with 16 additions and 0 deletions

View file

@ -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'))

View file

@ -229,6 +229,10 @@
%td.shortcut
.key r
%td Reply (quoting selected text)
%tr
%td.shortcut
.key e
%td Edit issue
%tbody{ class: 'hidden-shortcut merge_requests', style: 'display:none' }
%tr
%th
@ -245,3 +249,7 @@
%td.shortcut
.key r
%td Reply (quoting selected text)
%tr
%td.shortcut
.key e
%td Edit merge request

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 24 KiB