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
5803a530
Commit
5803a530
authored
Feb 22, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_13463' into 'master'
Fix Side-by-side view after loading diff results Fixes #13463 See merge request !2880
parents
f51d8af5
cd569a66
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
merge_request_tabs.js.coffee
app/assets/javascripts/merge_request_tabs.js.coffee
+8
-0
diff_helper.rb
app/helpers/diff_helper.rb
+1
-1
nav_helper.rb
app/helpers/nav_helper.rb
+1
-0
No files found.
app/assets/javascripts/merge_request_tabs.js.coffee
View file @
5803a530
...
...
@@ -146,6 +146,7 @@ class @MergeRequestTabs
success
:
(
data
)
=>
document
.
querySelector
(
"div#diffs"
).
innerHTML
=
data
.
html
$
(
'div#diffs .js-syntax-highlight'
).
syntaxHighlight
()
@
expandViewContainer
()
if
@
diffViewType
()
is
'parallel'
@
diffsLoaded
=
true
@
scrollToElement
(
"#diffs"
)
...
...
@@ -177,3 +178,10 @@ class @MergeRequestTabs
options
=
$
.
extend
({},
defaults
,
options
)
$
.
ajax
(
options
)
# Returns diff view type
diffViewType
:
->
$
(
'.inline-parallel-buttons a.active'
).
data
(
'view-type'
)
expandViewContainer
:
->
$
(
'.container-fluid'
).
removeClass
(
'container-limited'
)
app/helpers/diff_helper.rb
View file @
5803a530
...
...
@@ -137,7 +137,7 @@ module DiffHelper
# Always use HTML to handle case where JSON diff rendered this button
params_copy
.
delete
(
:format
)
link_to
url_for
(
params_copy
),
id:
"
#{
name
}
-diff-btn"
,
class:
(
selected
?
'btn active'
:
'btn'
)
do
link_to
url_for
(
params_copy
),
id:
"
#{
name
}
-diff-btn"
,
class:
(
selected
?
'btn active'
:
'btn'
)
,
data:
{
view_type:
name
}
do
title
end
end
...
...
app/helpers/nav_helper.rb
View file @
5803a530
...
...
@@ -23,6 +23,7 @@ module NavHelper
if
current_path?
(
'merge_requests#show'
)
||
current_path?
(
'merge_requests#diffs'
)
||
current_path?
(
'merge_requests#commits'
)
||
current_path?
(
'merge_requests#builds'
)
||
current_path?
(
'issues#show'
)
if
cookies
[
:collapsed_gutter
]
==
'true'
"page-gutter right-sidebar-collapsed"
...
...
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