BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9240f84b
Commit
9240f84b
authored
Feb 26, 2018
by
Filipa Lacerda
Committed by
Ian Baum
Mar 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'issue-edit-shortcut' into 'master'
Fixed issue edit shortcut not working Closes #43560 See merge request gitlab-org/gitlab-ce!17360
parent
76cec370
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
shortcuts_issuable.js
app/assets/javascripts/shortcuts_issuable.js
+3
-4
issue-edit-shortcut.yml
changelogs/unreleased/issue-edit-shortcut.yml
+5
-0
form_spec.rb
spec/features/issues/form_spec.rb
+12
-0
No files found.
app/assets/javascripts/shortcuts_issuable.js
View file @
9240f84b
...
...
@@ -9,13 +9,12 @@ export default class ShortcutsIssuable extends Shortcuts {
super
();
this
.
$replyField
=
isMergeRequest
?
$
(
'.js-main-target-form #note_note'
)
:
$
(
'.js-main-target-form .js-vue-comment-form'
);
this
.
editBtn
=
document
.
querySelector
(
'.js-issuable-edit'
);
Mousetrap
.
bind
(
'a'
,
()
=>
ShortcutsIssuable
.
openSidebarDropdown
(
'assignee'
));
Mousetrap
.
bind
(
'm'
,
()
=>
ShortcutsIssuable
.
openSidebarDropdown
(
'milestone'
));
Mousetrap
.
bind
(
'l'
,
()
=>
ShortcutsIssuable
.
openSidebarDropdown
(
'labels'
));
Mousetrap
.
bind
(
'r'
,
this
.
replyWithSelectedText
.
bind
(
this
));
Mousetrap
.
bind
(
'e'
,
this
.
editIssue
.
bind
(
this
)
);
Mousetrap
.
bind
(
'e'
,
ShortcutsIssuable
.
editIssue
);
if
(
isMergeRequest
)
{
this
.
enabledHelp
.
push
(
'.hidden-shortcut.merge_requests'
);
...
...
@@ -58,10 +57,10 @@ export default class ShortcutsIssuable extends Shortcuts {
return
false
;
}
editIssue
()
{
static
editIssue
()
{
// Need to click the element as on issues, editing is inline
// on merge request, editing is on a different page
this
.
editBtn
.
click
();
document
.
querySelector
(
'.js-issuable-edit'
)
.
click
();
return
false
;
}
...
...
changelogs/unreleased/issue-edit-shortcut.yml
0 → 100644
View file @
9240f84b
---
title
:
Fixed issue edit shortcut not opening edit form
merge_request
:
author
:
type
:
fixed
spec/features/issues/form_spec.rb
View file @
9240f84b
...
...
@@ -271,6 +271,18 @@ describe 'New/edit issue', :js do
end
end
context
'inline edit'
do
before
do
visit
project_issue_path
(
project
,
issue
)
end
it
'opens inline edit form with shortcut'
do
find
(
'body'
).
send_keys
(
'e'
)
expect
(
page
).
to
have_selector
(
'.detail-page-description form'
)
end
end
describe
'sub-group project'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:nested_group_1
)
{
create
(
:group
,
parent:
group
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment