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
1c2d283d
Commit
1c2d283d
authored
Feb 15, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dispatcher imports for bundles used in merge request show path
parent
efdde042
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
24 deletions
+22
-24
app/assets/javascripts/diff_notes/diff_notes_bundle.js
app/assets/javascripts/diff_notes/diff_notes_bundle.js
+2
-2
app/assets/javascripts/how_to_merge.js
app/assets/javascripts/how_to_merge.js
+13
-12
app/assets/javascripts/pages/projects/merge_requests/show/index.js
...s/javascripts/pages/projects/merge_requests/show/index.js
+6
-2
app/views/projects/merge_requests/_how_to_merge.html.haml
app/views/projects/merge_requests/_how_to_merge.html.haml
+0
-3
app/views/projects/merge_requests/show.html.haml
app/views/projects/merge_requests/show.html.haml
+0
-3
config/webpack.config.js
config/webpack.config.js
+1
-2
No files found.
app/assets/javascripts/diff_notes/diff_notes_bundle.js
View file @
1c2d283d
...
@@ -15,7 +15,7 @@ import './components/resolve_discussion_btn';
...
@@ -15,7 +15,7 @@ import './components/resolve_discussion_btn';
import
'
./components/diff_note_avatars
'
;
import
'
./components/diff_note_avatars
'
;
import
'
./components/new_issue_for_discussion
'
;
import
'
./components/new_issue_for_discussion
'
;
$
(
()
=>
{
export
default
()
=>
{
const
projectPathHolder
=
document
.
querySelector
(
'
.merge-request
'
)
||
document
.
querySelector
(
'
.commit-box
'
);
const
projectPathHolder
=
document
.
querySelector
(
'
.merge-request
'
)
||
document
.
querySelector
(
'
.commit-box
'
);
const
projectPath
=
projectPathHolder
.
dataset
.
projectPath
;
const
projectPath
=
projectPathHolder
.
dataset
.
projectPath
;
const
COMPONENT_SELECTOR
=
'
resolve-btn, resolve-discussion-btn, jump-to-discussion, comment-and-resolve-btn, new-issue-for-discussion-btn
'
;
const
COMPONENT_SELECTOR
=
'
resolve-btn, resolve-discussion-btn, jump-to-discussion, comment-and-resolve-btn, new-issue-for-discussion-btn
'
;
...
@@ -75,4 +75,4 @@ $(() => {
...
@@ -75,4 +75,4 @@ $(() => {
});
});
$
(
window
).
trigger
(
'
resize.nav
'
);
$
(
window
).
trigger
(
'
resize.nav
'
);
}
)
;
};
app/assets/javascripts/how_to_merge.js
View file @
1c2d283d
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
export
default
()
=>
{
const
modal
=
$
(
'
#modal_merge_info
'
).
modal
({
const
modal
=
$
(
'
#modal_merge_info
'
);
if
(
modal
)
{
modal
.
modal
({
modal
:
true
,
modal
:
true
,
show
:
false
,
show
:
false
,
});
});
$
(
'
.how_to_merge_link
'
).
on
(
'
click
'
,
()
=>
{
modal
.
show
();
$
(
'
.how_to_merge_link
'
).
on
(
'
click
'
,
modal
.
show
);
});
$
(
'
.modal-header .close
'
).
on
(
'
click
'
,
modal
.
hide
);
$
(
'
.modal-header .close
'
).
on
(
'
click
'
,
()
=>
{
}
modal
.
hide
();
};
});
});
app/assets/javascripts/pages/projects/merge_requests/show/index.js
View file @
1c2d283d
...
@@ -2,16 +2,19 @@ import MergeRequest from '~/merge_request';
...
@@ -2,16 +2,19 @@ import MergeRequest from '~/merge_request';
import
ZenMode
from
'
~/zen_mode
'
;
import
ZenMode
from
'
~/zen_mode
'
;
import
initNotes
from
'
~/init_notes
'
;
import
initNotes
from
'
~/init_notes
'
;
import
initIssuableSidebar
from
'
~/init_issuable_sidebar
'
;
import
initIssuableSidebar
from
'
~/init_issuable_sidebar
'
;
import
initDiffNotes
from
'
~/diff_notes/diff_notes_bundle
'
;
import
ShortcutsIssuable
from
'
~/shortcuts_issuable
'
;
import
ShortcutsIssuable
from
'
~/shortcuts_issuable
'
;
import
Diff
from
'
~/diff
'
;
import
Diff
from
'
~/diff
'
;
import
{
handleLocationHash
}
from
'
~/lib/utils/common_utils
'
;
import
{
handleLocationHash
}
from
'
~/lib/utils/common_utils
'
;
import
howToMerge
from
'
~/how_to_merge
'
;
export
default
()
=>
{
export
default
()
=>
{
new
Diff
();
// eslint-disable-line no-new
new
Diff
();
// eslint-disable-line no-new
new
ZenMode
();
// eslint-disable-line no-new
new
ZenMode
();
// eslint-disable-line no-new
initIssuableSidebar
();
// eslint-disable-line no-new
initIssuableSidebar
();
initNotes
();
// eslint-disable-line no-new
initNotes
();
initDiffNotes
();
const
mrShowNode
=
document
.
querySelector
(
'
.merge-request
'
);
const
mrShowNode
=
document
.
querySelector
(
'
.merge-request
'
);
...
@@ -21,4 +24,5 @@ export default () => {
...
@@ -21,4 +24,5 @@ export default () => {
new
ShortcutsIssuable
(
true
);
// eslint-disable-line no-new
new
ShortcutsIssuable
(
true
);
// eslint-disable-line no-new
handleLocationHash
();
handleLocationHash
();
howToMerge
();
};
};
app/views/projects/merge_requests/_how_to_merge.html.haml
View file @
1c2d283d
-
content_for
:page_specific_javascripts
do
=
webpack_bundle_tag
(
'how_to_merge'
)
#modal_merge_info
.modal
#modal_merge_info
.modal
.modal-dialog
.modal-dialog
.modal-content
.modal-content
...
...
app/views/projects/merge_requests/show.html.haml
View file @
1c2d283d
...
@@ -4,9 +4,6 @@
...
@@ -4,9 +4,6 @@
-
page_title
"
#{
@merge_request
.
title
}
(
#{
@merge_request
.
to_reference
}
)"
,
"Merge Requests"
-
page_title
"
#{
@merge_request
.
title
}
(
#{
@merge_request
.
to_reference
}
)"
,
"Merge Requests"
-
page_description
@merge_request
.
description
-
page_description
@merge_request
.
description
-
page_card_attributes
@merge_request
.
card_attributes
-
page_card_attributes
@merge_request
.
card_attributes
-
content_for
:page_specific_javascripts
do
=
webpack_bundle_tag
(
'common_vue'
)
=
webpack_bundle_tag
(
'diff_notes'
)
.merge-request
{
data:
{
mr_action:
j
(
params
[
:tab
].
presence
||
'show'
),
url:
merge_request_path
(
@merge_request
,
format: :json
),
project_path:
project_path
(
@merge_request
.
project
)
}
}
.merge-request
{
data:
{
mr_action:
j
(
params
[
:tab
].
presence
||
'show'
),
url:
merge_request_path
(
@merge_request
,
format: :json
),
project_path:
project_path
(
@merge_request
.
project
)
}
}
=
render
"projects/merge_requests/mr_title"
=
render
"projects/merge_requests/mr_title"
...
...
config/webpack.config.js
View file @
1c2d283d
...
@@ -66,7 +66,6 @@ var config = {
...
@@ -66,7 +66,6 @@ var config = {
graphs_charts
:
'
./graphs/graphs_charts.js
'
,
graphs_charts
:
'
./graphs/graphs_charts.js
'
,
graphs_show
:
'
./graphs/graphs_show.js
'
,
graphs_show
:
'
./graphs/graphs_show.js
'
,
help
:
'
./help/help.js
'
,
help
:
'
./help/help.js
'
,
how_to_merge
:
'
./how_to_merge.js
'
,
issue_show
:
'
./issue_show/index.js
'
,
issue_show
:
'
./issue_show/index.js
'
,
job_details
:
'
./jobs/job_details_bundle.js
'
,
job_details
:
'
./jobs/job_details_bundle.js
'
,
locale
:
'
./locale/index.js
'
,
locale
:
'
./locale/index.js
'
,
...
...
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