Commit 52ac5242 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'issue_13510' into 'master'

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

Closes #13510

See merge request !2945
parents ad3433f9 89d8e72b
...@@ -24,6 +24,10 @@ class @ShortcutsIssuable extends ShortcutsNavigation ...@@ -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 ...@@ -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 @@ ...@@ -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 @@ ...@@ -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
doc/workflow/shortcuts.png

47.6 KB | W: | H:

doc/workflow/shortcuts.png

24.4 KB | W: | H:

doc/workflow/shortcuts.png
doc/workflow/shortcuts.png
doc/workflow/shortcuts.png
doc/workflow/shortcuts.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment