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
32e31d62
Commit
32e31d62
authored
Aug 15, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve feedback.
parent
15950477
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
app/assets/javascripts/diff_notes/components/jump_to_discussion.js.es6
...vascripts/diff_notes/components/jump_to_discussion.js.es6
+5
-6
app/views/discussions/_jump_to_next.html.haml
app/views/discussions/_jump_to_next.html.haml
+1
-3
db/schema.rb
db/schema.rb
+10
-0
No files found.
app/assets/javascripts/diff_notes/components/jump_to_discussion.js.es6
View file @
32e31d62
...
...
@@ -149,6 +149,11 @@
if (activeTab === 'notes') {
$target = $target.closest('.note-discussion');
// If the next discussion is closed, toggle it open.
if ($target.find('.js-toggle-content').is(':hidden')) {
$target.find('.js-toggle-button i').trigger('click')
}
} else if (activeTab === 'diffs') {
// Resolved discussions are hidden in the diffs tab by default.
// If they are marked unresolved on the notes tab, they will still be hidden on the diffs tab.
...
...
@@ -176,12 +181,6 @@
$.scrollTo($target, {
offset: -($('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight())
});
// If the next discussion is closed, toggle it open.
if ($target.find(".js-toggle-content").attr('style') == "display: none;") {
$target.find('.js-toggle-button i').toggleClass('fa fa-chevron-down').toggleClass('fa fa-chevron-up');
$target.find(".js-toggle-content").toggle();
}
}
}
});
...
...
app/views/discussions/_jump_to_next.html.haml
View file @
32e31d62
-
discussion
=
local_assigns
.
fetch
(
:discussion
,
nil
)
-
if
current_user
%jump-to-discussion
{
"inline-template"
=>
true
,
":discussion-id"
=>
"'#{discussion.try(:id)}'"
}
.btn-group
{
role:
"group"
,
"v-show"
=>
"!allResolved"
,
"v-if"
=>
"showButton"
}
.btn-group
{
role:
"group"
,
"v-show"
=>
"!allResolved"
,
"v-if"
=>
"showButton"
}
%button
.btn.btn-default.discussion-next-btn.has-tooltip
{
"@click"
=>
"jumpToNextUnresolvedDiscussion"
,
title:
"Jump to next unresolved discussion"
,
"aria-label"
=>
"Jump to next unresolved discussion"
,
...
...
db/schema.rb
View file @
32e31d62
...
...
@@ -652,6 +652,16 @@ ActiveRecord::Schema.define(version: 20160810142633) do
add_index
"namespaces"
,
[
"path"
],
name:
"index_namespaces_on_path_trigram"
,
using: :gin
,
opclasses:
{
"path"
=>
"gin_trgm_ops"
}
add_index
"namespaces"
,
[
"type"
],
name:
"index_namespaces_on_type"
,
using: :btree
create_table
"note_templates"
,
force: :cascade
do
|
t
|
t
.
integer
"user_id"
t
.
string
"title"
t
.
text
"note"
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
end
add_index
"note_templates"
,
[
"user_id"
],
name:
"index_note_templates_on_user_id"
,
using: :btree
create_table
"notes"
,
force: :cascade
do
|
t
|
t
.
text
"note"
t
.
string
"noteable_type"
...
...
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