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
iv
gitlab-ce
Commits
e27f5aef
Commit
e27f5aef
authored
Feb 25, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sticky diff header
parent
a9eba1bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/assets/javascripts/diff.js.coffee
app/assets/javascripts/diff.js.coffee
+2
-1
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+1
-0
No files found.
app/assets/javascripts/diff.js.coffee
View file @
e27f5aef
class
@
Diff
UNFOLD_COUNT
=
20
constructor
:
->
$
(
document
).
off
(
'click'
,
'.js-unfold'
)
$
(
document
).
on
(
'click'
,
'.js-unfold'
,
(
event
)
=>
target
=
$
(
event
.
target
)
unfoldBottom
=
target
.
hasClass
(
'js-unfold-bottom'
)
...
...
@@ -36,7 +37,7 @@ class @Diff
)
)
$
(
'.diff-header'
).
stick_in_parent
(
offset_top
:
$
(
'.navbar'
).
height
())
$
(
'.diff-header'
).
stick_in_parent
(
recalc_every
:
1
,
offset_top
:
$
(
'.navbar'
).
height
())
lineNumbers
:
(
line
)
->
return
([
0
,
0
])
unless
line
.
children
().
length
...
...
app/assets/javascripts/merge_request.js.coffee
View file @
e27f5aef
...
...
@@ -95,6 +95,7 @@ class @MergeRequest
this
.
$
(
'.merge-request-tabs .diffs-tab'
).
addClass
'active'
this
.
loadDiff
()
unless
@
diffs_loaded
this
.
$
(
'.diffs'
).
show
()
$
(
".diff-header"
).
trigger
(
"sticky_kit:recalc"
)
when
'commits'
this
.
$
(
'.merge-request-tabs .commits-tab'
).
addClass
'active'
this
.
$
(
'.commits'
).
show
()
...
...
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