diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-02-23 18:21:45 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-02-23 18:21:45 +0000 |
commit | 52ac5242d13a4a3c468f542d361002b8ad6dff68 (patch) | |
tree | 9eea0108e684b21eab562f966371620de8e577ba | |
parent | ad3433f91e4366b7ee9f92ae6e16792536c65795 (diff) | |
parent | 89d8e72b6cd04482b7b9b59ffa73c3a7c322cd12 (diff) | |
download | gitlab-ce-52ac5242d13a4a3c468f542d361002b8ad6dff68.tar.gz |
Merge branch 'issue_13510' into 'master'
Adds "e" shortcut to issuable pages which redirects to the Edit page
Closes #13510
See merge request !2945
-rw-r--r-- | app/assets/javascripts/shortcuts_issuable.coffee | 8 | ||||
-rw-r--r-- | app/views/help/_shortcuts.html.haml | 8 | ||||
-rw-r--r-- | doc/workflow/shortcuts.png | bin | 48782 -> 25005 bytes |
3 files changed, 16 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')) diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml index 8e982718d23..82d2d4aabed 100644 --- a/app/views/help/_shortcuts.html.haml +++ b/app/views/help/_shortcuts.html.haml @@ -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 diff --git a/doc/workflow/shortcuts.png b/doc/workflow/shortcuts.png Binary files differindex e5914aa8e67..83e562d6929 100644 --- a/doc/workflow/shortcuts.png +++ b/doc/workflow/shortcuts.png |