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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-14
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