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
f9e0a6da
Commit
f9e0a6da
authored
Aug 08, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dynamically highlight code blocks in merge conflicts widgets.
parent
1def3510
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
app/assets/javascripts/merge_conflict_resolver.js.es6
app/assets/javascripts/merge_conflict_resolver.js.es6
+9
-4
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+1
-1
No files found.
app/assets/javascripts/merge_conflict_resolver.js.es6
View file @
f9e0a6da
...
@@ -46,14 +46,19 @@ window.MergeConflictResolver = class MergeConflictResolver {
...
@@ -46,14 +46,19 @@ window.MergeConflictResolver = class MergeConflictResolver {
const dp = this.dataProvider;
const dp = this.dataProvider;
$.get('./conflicts.json')
$.get('./conflicts.json')
.done(
(data) => {
.done((data) => {
dp.decorateData(this.vue, data);
dp.decorateData(this.vue, data);
})
})
.error(
(data) => {
.error((data) => {
dp.handleFailedRequest(this.vue, data);
dp.handleFailedRequest(this.vue, data);
})
})
.always(
() => {
.always(() => {
this.vue.isLoading = false;
this.vue.isLoading = false;
this.vue.$nextTick(() => {
$('#conflicts .js-syntax-highlight').syntaxHighlight();
});
if (this.vue.diffViewType === 'parallel') {
if (this.vue.diffViewType === 'parallel') {
$('.content-wrapper .container-fluid').removeClass('container-limited');
$('.content-wrapper .container-fluid').removeClass('container-limited');
}
}
...
@@ -65,7 +70,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
...
@@ -65,7 +70,7 @@ window.MergeConflictResolver = class MergeConflictResolver {
this.vue.isSubmitting = true;
this.vue.isSubmitting = true;
$.post('./resolve_conflicts', this.dataProvider.getCommitData())
$.post('./resolve_conflicts', this.dataProvider.getCommitData())
.done(
(data) => {
.done((data) => {
window.location.href = data.redirect_to;
window.location.href = data.redirect_to;
})
})
.error(() => {
.error(() => {
...
...
app/views/projects/merge_requests/conflicts.html.haml
View file @
f9e0a6da
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blobPath"
}
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blobPath"
}
View file @{{conflictsData.shortCommitSha}}
View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight
.white
.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
%table
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%template
{
"v-for"
=>
"line in section"
}
%template
{
"v-for"
=>
"line in section"
}
...
...
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