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
27a0310f
Commit
27a0310f
authored
Feb 19, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make diff view name getter less error prone
parent
ebceae3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
merge_request_tabs.js.coffee
app/assets/javascripts/merge_request_tabs.js.coffee
+2
-4
diff_helper.rb
app/helpers/diff_helper.rb
+1
-1
No files found.
app/assets/javascripts/merge_request_tabs.js.coffee
View file @
27a0310f
...
...
@@ -179,11 +179,9 @@ class @MergeRequestTabs
$
.
ajax
(
options
)
# Returns diff view type
diffViewMode
:
->
# Gets diff view mode based from its ID
# See diff_btn helper method
btnID
=
$
(
'a[id$="-diff-btn"].active'
).
attr
(
'id'
)
btnID
.
substr
(
0
,
btnID
.
indexOf
(
'-'
))
$
(
'.diffs a[id$="-diff-btn"].active'
).
data
(
'view-type'
)
expandViewContainer
:
->
$
(
'.container-fluid'
).
removeClass
(
'container-limited'
)
app/helpers/diff_helper.rb
View file @
27a0310f
...
...
@@ -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
...
...
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