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
Boxiang Sun
gitlab-ce
Commits
b0464fa4
Commit
b0464fa4
authored
Aug 03, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '35232-next-unresolved' into 'master'
fix Jump to next discussion Closes #35232 See merge request !13076
parents
2f05a6a4
9b9c8678
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
app/assets/javascripts/diff_notes/components/jump_to_discussion.js
...s/javascripts/diff_notes/components/jump_to_discussion.js
+5
-5
changelogs/unreleased/35232-next-unresolved.yml
changelogs/unreleased/35232-next-unresolved.yml
+4
-0
No files found.
app/assets/javascripts/diff_notes/components/jump_to_discussion.js
View file @
b0464fa4
...
@@ -94,7 +94,7 @@ const JumpToDiscussion = Vue.extend({
...
@@ -94,7 +94,7 @@ const JumpToDiscussion = Vue.extend({
hasDiscussionsToJumpTo
=
false
;
hasDiscussionsToJumpTo
=
false
;
}
}
}
}
}
else
if
(
activeTab
!==
'
notes
'
)
{
}
else
if
(
activeTab
!==
'
show
'
)
{
// If we are on the commits or builds tabs,
// If we are on the commits or builds tabs,
// there are no discussions to jump to.
// there are no discussions to jump to.
hasDiscussionsToJumpTo
=
false
;
hasDiscussionsToJumpTo
=
false
;
...
@@ -103,12 +103,12 @@ const JumpToDiscussion = Vue.extend({
...
@@ -103,12 +103,12 @@ const JumpToDiscussion = Vue.extend({
if
(
!
hasDiscussionsToJumpTo
)
{
if
(
!
hasDiscussionsToJumpTo
)
{
// If there are no discussions to jump to on the current page,
// If there are no discussions to jump to on the current page,
// switch to the notes tab and jump to the first disucssion there.
// switch to the notes tab and jump to the first disucssion there.
window
.
mrTabs
.
activateTab
(
'
notes
'
);
window
.
mrTabs
.
activateTab
(
'
show
'
);
activeTab
=
'
notes
'
;
activeTab
=
'
show
'
;
jumpToFirstDiscussion
=
true
;
jumpToFirstDiscussion
=
true
;
}
}
if
(
activeTab
===
'
notes
'
)
{
if
(
activeTab
===
'
show
'
)
{
discussionsSelector
=
'
.discussion[data-discussion-id]
'
;
discussionsSelector
=
'
.discussion[data-discussion-id]
'
;
discussionIdsInScope
=
discussionIdsForElements
(
$
(
discussionsSelector
));
discussionIdsInScope
=
discussionIdsForElements
(
$
(
discussionsSelector
));
}
}
...
@@ -156,7 +156,7 @@ const JumpToDiscussion = Vue.extend({
...
@@ -156,7 +156,7 @@ const JumpToDiscussion = Vue.extend({
let
$target
=
$
(
`
${
discussionsSelector
}
[data-discussion-id="
${
nextUnresolvedDiscussionId
}
"]`
);
let
$target
=
$
(
`
${
discussionsSelector
}
[data-discussion-id="
${
nextUnresolvedDiscussionId
}
"]`
);
if
(
activeTab
===
'
notes
'
)
{
if
(
activeTab
===
'
show
'
)
{
$target
=
$target
.
closest
(
'
.note-discussion
'
);
$target
=
$target
.
closest
(
'
.note-discussion
'
);
// If the next discussion is closed, toggle it open.
// If the next discussion is closed, toggle it open.
...
...
changelogs/unreleased/35232-next-unresolved.yml
0 → 100644
View file @
b0464fa4
---
title
:
fix jump to next discussion button
merge_request
:
author
:
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