Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gigadoc 2
diaspora
Commits
a01cc4df
Unverified
Commit
a01cc4df
authored
Aug 17, 2017
by
Benjamin Neff
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/0.7.0.0' into next-minor
parents
68513547
aa8d46da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
1 deletion
+13
-1
app/assets/javascripts/app/views/comment_stream_view.js
app/assets/javascripts/app/views/comment_stream_view.js
+3
-1
app/assets/javascripts/app/views/comment_view.js
app/assets/javascripts/app/views/comment_view.js
+1
-0
features/step_definitions/custom_web_steps.rb
features/step_definitions/custom_web_steps.rb
+1
-0
spec/javascripts/app/views/comment_stream_view_spec.js
spec/javascripts/app/views/comment_stream_view_spec.js
+8
-0
No files found.
app/assets/javascripts/app/views/comment_stream_view.js
View file @
a01cc4df
...
...
@@ -118,7 +118,8 @@ app.views.CommentStream = app.views.Base.extend({
// on post ownership in the Comment view.
comment
.
set
({
parent
:
this
.
model
.
toJSON
()});
var
commentHtml
=
new
this
.
CommentView
({
model
:
comment
}).
render
().
el
;
var
commentView
=
new
this
.
CommentView
({
model
:
comment
});
var
commentHtml
=
commentView
.
render
().
el
;
var
commentBlocks
=
this
.
$
(
"
.comments div.comment.media
"
);
this
.
_moveInsertPoint
(
comment
.
get
(
"
created_at
"
),
commentBlocks
);
if
(
this
.
_insertPoint
>=
commentBlocks
.
length
)
{
...
...
@@ -128,6 +129,7 @@ app.views.CommentStream = app.views.Base.extend({
}
else
{
commentBlocks
.
eq
(
this
.
_insertPoint
).
before
(
commentHtml
);
}
commentView
.
renderPluginWidgets
();
},
removeComment
:
function
(
comment
)
{
...
...
app/assets/javascripts/app/views/comment_view.js
View file @
a01cc4df
...
...
@@ -4,6 +4,7 @@
app
.
views
.
Comment
=
app
.
views
.
Content
.
extend
({
templateName
:
"
comment
"
,
className
:
"
comment media
"
,
tooltipSelector
:
"
time
"
,
events
:
function
()
{
return
_
.
extend
({},
app
.
views
.
Content
.
prototype
.
events
,
{
...
...
features/step_definitions/custom_web_steps.rb
View file @
a01cc4df
...
...
@@ -109,6 +109,7 @@ When /^I click to delete the first post$/ do
accept_alert
do
step
"I prepare the deletion of the first post"
end
expect
(
find
(
".stream"
)).
to
have_no_css
(
".stream-element.loaded.deleting"
)
end
When
/^I click to hide the first post$/
do
...
...
spec/javascripts/app/views/comment_stream_view_spec.js
View file @
a01cc4df
...
...
@@ -267,6 +267,14 @@ describe("app.views.CommentStream", function(){
expect
(
this
.
view
.
$
(
"
.comments div.comment.media
"
).
length
).
toEqual
(
6
);
expect
(
this
.
view
.
$
(
"
.comments div.comment.media div.comment-content p
"
).
text
()).
toEqual
(
"
123456
"
);
});
it
(
"
calls renderPluginWidgets
"
,
function
()
{
var
comment
=
factory
.
comment
();
this
.
view
.
CommentView
=
app
.
views
.
Comment
;
spyOn
(
app
.
views
.
Comment
.
prototype
,
"
renderPluginWidgets
"
);
this
.
view
.
appendComment
(
comment
);
expect
(
app
.
views
.
Comment
.
prototype
.
renderPluginWidgets
).
toHaveBeenCalled
();
});
});
describe
(
"
removeComment
"
,
function
()
{
...
...
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