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:
commit
52ac5242d1
3 changed files with 16 additions and 0 deletions
|
@ -24,6 +24,10 @@ class @ShortcutsIssuable extends ShortcutsNavigation
|
||||||
@nextIssue()
|
@nextIssue()
|
||||||
return false
|
return false
|
||||||
)
|
)
|
||||||
|
Mousetrap.bind('e', =>
|
||||||
|
@editIssue()
|
||||||
|
return false
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if isMergeRequest
|
if isMergeRequest
|
||||||
|
@ -63,3 +67,7 @@ class @ShortcutsIssuable extends ShortcutsNavigation
|
||||||
|
|
||||||
# Focus the input field
|
# Focus the input field
|
||||||
replyField.focus()
|
replyField.focus()
|
||||||
|
|
||||||
|
editIssue: ->
|
||||||
|
$editBtn = $('.issuable-edit')
|
||||||
|
Turbolinks.visit($editBtn.attr('href'))
|
||||||
|
|
|
@ -229,6 +229,10 @@
|
||||||
%td.shortcut
|
%td.shortcut
|
||||||
.key r
|
.key r
|
||||||
%td Reply (quoting selected text)
|
%td Reply (quoting selected text)
|
||||||
|
%tr
|
||||||
|
%td.shortcut
|
||||||
|
.key e
|
||||||
|
%td Edit issue
|
||||||
%tbody{ class: 'hidden-shortcut merge_requests', style: 'display:none' }
|
%tbody{ class: 'hidden-shortcut merge_requests', style: 'display:none' }
|
||||||
%tr
|
%tr
|
||||||
%th
|
%th
|
||||||
|
@ -245,3 +249,7 @@
|
||||||
%td.shortcut
|
%td.shortcut
|
||||||
.key r
|
.key r
|
||||||
%td Reply (quoting selected text)
|
%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 |
Loading…
Reference in a new issue