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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
31330e4a
Commit
31330e4a
authored
Oct 05, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix anchors to comments in diffs
parent
0de7c83a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/merge_request_tabs.js.coffee
app/assets/javascripts/merge_request_tabs.js.coffee
+7
-0
No files found.
CHANGELOG
View file @
31330e4a
...
@@ -29,6 +29,7 @@ v 8.1.0 (unreleased)
...
@@ -29,6 +29,7 @@ v 8.1.0 (unreleased)
- Ensure code blocks are properly highlighted after a note is updated
- Ensure code blocks are properly highlighted after a note is updated
- Fix wrong access level badge on MR comments
- Fix wrong access level badge on MR comments
- Hide password in the service settings form
- Hide password in the service settings form
- Fix anchors to comments in diffs
v 8.0.3
v 8.0.3
- Fix URL shown in Slack notifications
- Fix URL shown in Slack notifications
...
...
app/assets/javascripts/merge_request_tabs.js.coffee
View file @
31330e4a
...
@@ -66,6 +66,11 @@ class @MergeRequestTabs
...
@@ -66,6 +66,11 @@ class @MergeRequestTabs
@
setCurrentAction
(
action
)
@
setCurrentAction
(
action
)
scrollToElement
:
(
container
)
->
if
window
.
location
.
hash
top
=
$
(
container
+
" "
+
window
.
location
.
hash
).
offset
().
top
$
(
'body'
).
scrollTo
(
top
);
# Activate a tab based on the current action
# Activate a tab based on the current action
activateTab
:
(
action
)
->
activateTab
:
(
action
)
->
action
=
'notes'
if
action
==
'show'
action
=
'notes'
if
action
==
'show'
...
@@ -122,6 +127,7 @@ class @MergeRequestTabs
...
@@ -122,6 +127,7 @@ class @MergeRequestTabs
document
.
getElementById
(
'commits'
).
innerHTML
=
data
.
html
document
.
getElementById
(
'commits'
).
innerHTML
=
data
.
html
$
(
'.js-timeago'
).
timeago
()
$
(
'.js-timeago'
).
timeago
()
@
commitsLoaded
=
true
@
commitsLoaded
=
true
@
scrollToElement
(
".commits"
)
loadDiff
:
(
source
)
->
loadDiff
:
(
source
)
->
return
if
@
diffsLoaded
return
if
@
diffsLoaded
...
@@ -131,6 +137,7 @@ class @MergeRequestTabs
...
@@ -131,6 +137,7 @@ class @MergeRequestTabs
success
:
(
data
)
=>
success
:
(
data
)
=>
document
.
getElementById
(
'diffs'
).
innerHTML
=
data
.
html
document
.
getElementById
(
'diffs'
).
innerHTML
=
data
.
html
@
diffsLoaded
=
true
@
diffsLoaded
=
true
@
scrollToElement
(
".diffs"
)
toggleLoading
:
->
toggleLoading
:
->
$
(
'.mr-loading-status .loading'
).
toggle
()
$
(
'.mr-loading-status .loading'
).
toggle
()
...
...
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