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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a905afd8
Commit
a905afd8
authored
Jan 18, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor dispatcher project mr edit and creation diff path
parent
07d0214f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
11 deletions
+34
-11
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+9
-11
app/assets/javascripts/pages/projects/merge_requests/creations/diffs/index.js
...ts/pages/projects/merge_requests/creations/diffs/index.js
+3
-0
app/assets/javascripts/pages/projects/merge_requests/edit/index.js
...s/javascripts/pages/projects/merge_requests/edit/index.js
+3
-0
app/assets/javascripts/pages/projects/merge_requests/init_merge_request.js
...ripts/pages/projects/merge_requests/init_merge_request.js
+19
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
a905afd8
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */
import
projectSelect
from
'
./project_select
'
;
import
Milestone
from
'
./milestone
'
;
import
IssuableForm
from
'
./issuable_form
'
;
import
LabelsSelect
from
'
./labels_select
'
;
import
MilestoneSelect
from
'
./milestone_select
'
;
import
NotificationsForm
from
'
./notifications_form
'
;
import
notificationsDropdown
from
'
./notifications_dropdown
'
;
import
groupAvatar
from
'
./group_avatar
'
;
...
...
@@ -14,7 +11,6 @@ import Compare from './compare';
import
Labels
from
'
./labels
'
;
import
LabelManager
from
'
./label_manager
'
;
import
Sidebar
from
'
./right_sidebar
'
;
import
IssuableTemplateSelectors
from
'
./templates/issuable_template_selectors
'
;
import
Flash
from
'
./flash
'
;
import
BindInOut
from
'
./behaviors/bind_in_out
'
;
import
SecretValues
from
'
./behaviors/secret_values
'
;
...
...
@@ -245,14 +241,16 @@ import Activities from './activities';
});
}
case
'
projects:merge_requests:creations:diffs
'
:
import
(
'
./pages/projects/merge_requests/creations/diffs
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:merge_requests:edit
'
:
new
Diff
();
shortcut_handler
=
new
ShortcutsNavigation
();
new
GLForm
(
$
(
'
.merge-request-form
'
),
true
);
new
IssuableForm
(
$
(
'
.merge-request-form
'
));
new
LabelsSelect
();
new
MilestoneSelect
();
new
IssuableTemplateSelectors
();
import
(
'
./pages/projects/merge_requests/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:tags:new
'
:
import
(
'
./pages/projects/tags/new
'
)
...
...
app/assets/javascripts/pages/projects/merge_requests/creations/diffs/index.js
0 → 100644
View file @
a905afd8
import
initMergeRequest
from
'
~/pages/projects/merge_requests/init_merge_request
'
;
export
default
initMergeRequest
;
app/assets/javascripts/pages/projects/merge_requests/edit/index.js
0 → 100644
View file @
a905afd8
import
initMergeRequest
from
'
~/pages/projects/merge_requests/init_merge_request
'
;
export
default
initMergeRequest
;
app/assets/javascripts/pages/projects/merge_requests/init_merge_request.js
0 → 100644
View file @
a905afd8
/* eslint-disable no-new */
import
Diff
from
'
~/diff
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
GLForm
from
'
~/gl_form
'
;
import
IssuableForm
from
'
~/issuable_form
'
;
import
LabelsSelect
from
'
~/labels_select
'
;
import
MilestoneSelect
from
'
~/milestone_select
'
;
import
IssuableTemplateSelectors
from
'
~/templates/issuable_template_selectors
'
;
export
default
()
=>
{
new
Diff
();
new
ShortcutsNavigation
();
new
GLForm
(
$
(
'
.merge-request-form
'
),
true
);
new
IssuableForm
(
$
(
'
.merge-request-form
'
));
new
LabelsSelect
();
new
MilestoneSelect
();
new
IssuableTemplateSelectors
();
};
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