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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d2b5c3f6
Commit
d2b5c3f6
authored
Jun 25, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trigger sticky_kit:recalc when diffs are pre-loaded
parent
4e7f23fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
app/assets/javascripts/merge_request_tabs.js.coffee
app/assets/javascripts/merge_request_tabs.js.coffee
+9
-3
No files found.
app/assets/javascripts/merge_request_tabs.js.coffee
View file @
d2b5c3f6
...
...
@@ -50,8 +50,10 @@ class @MergeRequestTabs
@
_location
=
location
switch
@
opts
.
action
when
'commits'
then
@
commitsLoaded
=
true
when
'diffs'
then
@
diffsLoaded
=
true
when
'commits'
@
commitsLoaded
=
true
when
'diffs'
@
diffsLoaded
=
true
@
bindEvents
()
@
activateTab
(
@
opts
.
action
)
...
...
@@ -67,6 +69,7 @@ class @MergeRequestTabs
@
loadCommits
(
$target
.
attr
(
'href'
))
else
if
action
==
'diffs'
@
loadDiff
(
$target
.
attr
(
'href'
))
@
stickyDiffHeaders
()
@
setCurrentAction
(
action
)
...
...
@@ -134,12 +137,15 @@ class @MergeRequestTabs
url
:
"
#{
source
}
.json"
success
:
(
data
)
=>
document
.
getElementById
(
'diffs'
).
innerHTML
=
data
.
html
$
(
'.diff-header'
).
trigger
(
'sticky_kit:recalc'
)
@
stickyDiffHeaders
(
)
@
diffsLoaded
=
true
toggleLoading
:
->
$
(
'.mr-loading-status .loading'
).
toggle
()
stickyDiffHeaders
:
->
$
(
'.diff-header'
).
trigger
(
'sticky_kit:recalc'
)
_get
:
(
options
)
->
defaults
=
{
beforeSend
:
@
toggleLoading
...
...
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