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
Tatuya Kamada
gitlab-ce
Commits
4d7c2014
Commit
4d7c2014
authored
Aug 10, 2016
by
Douwe Maan
Committed by
Fatih Acet
Aug 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don’t hardcode paths
parent
add01596
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
app/assets/javascripts/merge_conflict_resolver.js.es6
app/assets/javascripts/merge_conflict_resolver.js.es6
+2
-2
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+2
-1
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
.../projects/merge_requests/conflicts/_submit_form.html.haml
+1
-3
No files found.
app/assets/javascripts/merge_conflict_resolver.js.es6
View file @
4d7c2014
...
@@ -45,7 +45,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
...
@@ -45,7 +45,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
fetchData() {
fetchData() {
const dp = this.dataProvider;
const dp = this.dataProvider;
$.get(
'./conflicts.json'
)
$.get(
$('#conflicts').data('conflictsPath')
)
.done((data) => {
.done((data) => {
dp.decorateData(this.vue, data);
dp.decorateData(this.vue, data);
})
})
...
@@ -69,7 +69,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
...
@@ -69,7 +69,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
commit() {
commit() {
this.vue.isSubmitting = true;
this.vue.isSubmitting = true;
$.post(
'./resolve_conflicts'
, this.dataProvider.getCommitData())
$.post(
$('#conflicts').data('resolveConflictsPath')
, this.dataProvider.getCommitData())
.done((data) => {
.done((data) => {
window.location.href = data.redirect_to;
window.location.href = data.redirect_to;
})
})
...
...
app/views/projects/merge_requests/conflicts.html.haml
View file @
4d7c2014
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
#conflicts
{
"v-cloak"
=>
"true"
}
#conflicts
{
"v-cloak"
=>
"true"
,
data:
{
conflicts_path:
conflicts_namespace_project_merge_request_path
(
@merge_request
.
project
.
namespace
,
@merge_request
.
project
,
@merge_request
,
format: :json
),
resolve_conflicts_path:
resolve_conflicts_namespace_project_merge_request_path
(
@merge_request
.
project
.
namespace
,
@merge_request
.
project
,
@merge_request
)
}
}
.loading
{
"v-if"
=>
"isLoading"
}
.loading
{
"v-if"
=>
"isLoading"
}
%i
.fa.fa-spinner.fa-spin
%i
.fa.fa-spinner.fa-spin
...
...
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
View file @
4d7c2014
...
@@ -13,6 +13,4 @@
...
@@ -13,6 +13,4 @@
%span
Commit conflict resolution
%span
Commit conflict resolution
%a
.fa.fa-spin.fa-spinner
{
":class"
=>
"{'hidden': !isSubmitting}"
}
%a
.fa.fa-spin.fa-spinner
{
":class"
=>
"{'hidden': !isSubmitting}"
}
/ FIXME: Hardcoded path
=
link_to
"Cancel"
,
namespace_project_merge_request_path
(
@merge_request
.
project
.
namespace
,
@merge_request
.
project
,
@merge_request
),
class:
"btn btn-cancel"
%a
.btn.btn-cancel
{
"href"
=>
"diffs"
}
Cancel
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