Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
eb74c22d
Commit
eb74c22d
authored
Jan 18, 2018
by
Clement Ho
Committed by
Jacob Schatz
Jan 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor dispatcher project mr creations new path
parent
0eb8c67b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-14
app/assets/javascripts/pages/projects/merge_requests/creations/new/index.js
...ipts/pages/projects/merge_requests/creations/new/index.js
+18
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
eb74c22d
...
...
@@ -10,7 +10,6 @@ import groupAvatar from './group_avatar';
import
GroupLabelSubscription
from
'
./group_label_subscription
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
MergeRequest
from
'
./merge_request
'
;
import
Compare
from
'
./compare
'
;
import
Labels
from
'
./labels
'
;
import
LabelManager
from
'
./label_manager
'
;
import
Sidebar
from
'
./right_sidebar
'
;
...
...
@@ -231,19 +230,9 @@ import Activities from './activities';
shortcut_handler
=
true
;
break
;
case
'
projects:merge_requests:creations:new
'
:
const
mrNewCompareNode
=
document
.
querySelector
(
'
.js-merge-request-new-compare
'
);
if
(
mrNewCompareNode
)
{
new
Compare
({
targetProjectUrl
:
mrNewCompareNode
.
dataset
.
targetProjectUrl
,
sourceBranchUrl
:
mrNewCompareNode
.
dataset
.
sourceBranchUrl
,
targetBranchUrl
:
mrNewCompareNode
.
dataset
.
targetBranchUrl
,
});
}
else
{
const
mrNewSubmitNode
=
document
.
querySelector
(
'
.js-merge-request-new-submit
'
);
new
MergeRequest
({
action
:
mrNewSubmitNode
.
dataset
.
mrSubmitAction
,
});
}
import
(
'
./pages/projects/merge_requests/creations/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
case
'
projects:merge_requests:creations:diffs
'
:
case
'
projects:merge_requests:edit
'
:
new
Diff
();
...
...
app/assets/javascripts/pages/projects/merge_requests/creations/new/index.js
0 → 100644
View file @
eb74c22d
import
Compare
from
'
~/compare
'
;
import
MergeRequest
from
'
~/merge_request
'
;
export
default
()
=>
{
const
mrNewCompareNode
=
document
.
querySelector
(
'
.js-merge-request-new-compare
'
);
if
(
mrNewCompareNode
)
{
new
Compare
({
// eslint-disable-line no-new
targetProjectUrl
:
mrNewCompareNode
.
dataset
.
targetProjectUrl
,
sourceBranchUrl
:
mrNewCompareNode
.
dataset
.
sourceBranchUrl
,
targetBranchUrl
:
mrNewCompareNode
.
dataset
.
targetBranchUrl
,
});
}
else
{
const
mrNewSubmitNode
=
document
.
querySelector
(
'
.js-merge-request-new-submit
'
);
new
MergeRequest
({
// eslint-disable-line no-new
action
:
mrNewSubmitNode
.
dataset
.
mrSubmitAction
,
});
}
};
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