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
Léo-Paul Géneau
gitlab-ce
Commits
674cbe15
Commit
674cbe15
authored
Jun 25, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix diff comments toggle button
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
907548a0
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
12 deletions
+20
-12
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+8
-0
app/views/projects/commits/_diffs.html.haml
app/views/projects/commits/_diffs.html.haml
+2
-2
app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
.../projects/notes/_diff_notes_with_reply_parallel.html.haml
+4
-2
app/views/projects/notes/discussions/_active.html.haml
app/views/projects/notes/discussions/_active.html.haml
+1
-1
app/views/projects/notes/discussions/_commit.html.haml
app/views/projects/notes/discussions/_commit.html.haml
+1
-1
app/views/projects/notes/discussions/_diff.html.haml
app/views/projects/notes/discussions/_diff.html.haml
+0
-0
app/views/projects/notes/discussions/_outdated.html.haml
app/views/projects/notes/discussions/_outdated.html.haml
+1
-1
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+3
-5
No files found.
app/assets/javascripts/application.js.coffee
View file @
674cbe15
...
...
@@ -143,6 +143,14 @@ $ ->
$
(
@
).
next
(
'table'
).
show
()
$
(
@
).
remove
()
# Show/hide comments on diff
$
(
"body"
).
on
"click"
,
".js-toggle-diff-comments"
,
(
e
)
->
$
(
@
).
find
(
'i'
).
toggleClass
(
'icon-chevron-down'
).
toggleClass
(
'icon-chevron-up'
)
$
(
@
).
closest
(
".diff-file"
).
find
(
".notes_holder"
).
toggle
()
e
.
preventDefault
()
((
$
)
->
# Disable an element and add the 'disabled' Bootstrap class
$
.
fn
.
extend
disable
:
->
...
...
app/views/projects/commits/_diffs.html.haml
View file @
674cbe15
...
...
@@ -45,7 +45,7 @@
-
file
=
project
.
repository
.
blob_at
(
@commit
.
id
,
diff
.
new_path
)
-
file
=
project
.
repository
.
blob_at
(
@commit
.
parent_id
,
diff
.
old_path
)
unless
file
-
next
unless
file
.diff-file
.js-toggle-container
{
id:
"diff-#{i}"
}
.diff-file
{
id:
"diff-#{i}"
}
.diff-header
{
id:
"file-path-#{hexdigest(diff.new_path || diff.old_path)}"
}
-
if
diff
.
deleted_file
%span
=
diff
.
old_path
...
...
@@ -61,7 +61,7 @@
%span
.file-mode
=
"
#{
diff
.
a_mode
}
→
#{
diff
.
b_mode
}
"
.diff-btn-group
=
link_to
"#"
,
class:
"js-toggle-
button
btn btn-small"
do
=
link_to
"#"
,
class:
"js-toggle-
diff-comments
btn btn-small"
do
%i
.icon-chevron-down
Diff comments
...
...
app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
View file @
674cbe15
...
...
@@ -12,6 +12,7 @@
%ul
.notes
{
rel:
note1
.
discussion_id
}
=
render
notes1
.discussion-reply-holder
=
link_to_reply_diff
(
note1
)
-
else
%td
=
""
...
...
@@ -26,6 +27,7 @@
%ul
.notes
{
rel:
note2
.
discussion_id
}
=
render
notes2
.discussion-reply-holder
=
link_to_reply_diff
(
note2
)
-
else
%td
=
""
...
...
app/views/projects/notes/discussions/_active.html.haml
View file @
674cbe15
...
...
@@ -18,4 +18,4 @@
%span
.discussion-last-update
#{
time_ago_with_tooltip
(
last_note
.
updated_at
,
'bottom'
,
'discussion_updated_ago'
)
}
.discussion-body.js-toggle-content
=
render
"projects/notes/discussion
_
diff"
,
discussion_notes:
discussion_notes
,
note:
note
=
render
"projects/notes/discussion
s/
diff"
,
discussion_notes:
discussion_notes
,
note:
note
app/views/projects/notes/discussions/_commit.html.haml
View file @
674cbe15
...
...
@@ -18,7 +18,7 @@
#{
time_ago_with_tooltip
(
last_note
.
updated_at
,
'bottom'
,
'discussion_updated_ago'
)
}
.discussion-body.js-toggle-content
-
if
note
.
for_diff_line?
=
render
"projects/notes/discussion
_
diff"
,
discussion_notes:
discussion_notes
,
note:
note
=
render
"projects/notes/discussion
s/
diff"
,
discussion_notes:
discussion_notes
,
note:
note
-
else
.panel.panel-default
.notes
{
rel:
discussion_notes
.
first
.
discussion_id
}
...
...
app/views/projects/notes/
_discussion
_diff.html.haml
→
app/views/projects/notes/
discussions/
_diff.html.haml
View file @
674cbe15
File moved
app/views/projects/notes/discussions/_outdated.html.haml
View file @
674cbe15
...
...
@@ -17,4 +17,4 @@
%span
.discussion-last-update
#{
time_ago_with_tooltip
(
last_note
.
updated_at
,
'bottom'
,
'discussion_updated_ago'
)
}
.discussion-body.js-toggle-content.hide
=
render
"projects/notes/discussion
_
diff"
,
discussion_notes:
discussion_notes
,
note:
note
=
render
"projects/notes/discussion
s/
diff"
,
discussion_notes:
discussion_notes
,
note:
note
features/steps/project/merge_requests.rb
View file @
674cbe15
...
...
@@ -131,8 +131,8 @@ class ProjectMergeRequests < Spinach::FeatureSteps
end
step
'I should see a discussion has started on line 185'
do
page
.
should
have_content
"
#{
current_user
.
name
}
started a discussion
on this merge request diff
"
page
.
should
have_content
"app/assets/stylesheets/tree.scss
:L185
"
page
.
should
have_content
"
#{
current_user
.
name
}
started a discussion"
page
.
should
have_content
"app/assets/stylesheets/tree.scss"
page
.
should
have_content
"Line is wrong"
end
...
...
@@ -257,10 +257,8 @@ class ProjectMergeRequests < Spinach::FeatureSteps
click_button
"Add Comment"
end
within
".note-text"
do
page
.
should
have_content
message
end
end
def
init_diff_note_first_file
find
(
'a[data-line-code="a5cc2925ca8258af241be7e5b0381edf30266302_12_12"]'
).
click
...
...
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