Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
diaspora
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Gigadoc 2
diaspora
Commits
3016280e
Unverified
Commit
3016280e
authored
Aug 13, 2017
by
ivan sebastian
Committed by
Steffen van Bergerem
Aug 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add jquery are you sure to comment form
closes #7530
parent
7e0cbff4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
0 deletions
+10
-0
Changelog.md
Changelog.md
+1
-0
app/assets/javascripts/app/views/comment_stream_view.js
app/assets/javascripts/app/views/comment_stream_view.js
+2
-0
features/desktop/comments.feature
features/desktop/comments.feature
+1
-0
spec/javascripts/app/views/comment_stream_view_spec.js
spec/javascripts/app/views/comment_stream_view_spec.js
+6
-0
No files found.
Changelog.md
View file @
3016280e
...
...
@@ -5,6 +5,7 @@
## Bug fixes
## Features
*
Ask for confirmation when leaving a submittable comment field
[
#7530
](
https://github.com/diaspora/diaspora/pull/7530
)
# 0.7.0.0
...
...
app/assets/javascripts/app/views/comment_stream_view.js
View file @
3016280e
...
...
@@ -37,6 +37,8 @@ app.views.CommentStream = app.views.Base.extend({
}.
bind
(
this
),
onFocus
:
this
.
openForm
.
bind
(
this
)
});
this
.
$
(
"
form
"
).
areYouSure
();
},
presenter
:
function
(){
...
...
features/desktop/comments.feature
View file @
3016280e
...
...
@@ -19,6 +19,7 @@ Feature: commenting
When
I focus the comment field
And I fill in the following
:
|
text
|
is
that
a
poodle?
|
And
I
reject
the
alert
after
I
follow
"My
activity"
And
I press
"Comment"
Then
I should see
"is that a poodle?"
within
".comment"
And
I should see
"less than a minute ago"
within
".comment time"
...
...
spec/javascripts/app/views/comment_stream_view_spec.js
View file @
3016280e
...
...
@@ -92,6 +92,12 @@ describe("app.views.CommentStream", function(){
expect
(
renderedPreview
).
toBe
(
"
<div class='preview-content'>
"
+
renderedText
+
"
</div>
"
);
expect
(
renderedPreview
).
toContain
(
"
Alice Awesome
"
);
});
it
(
"
calls jQuery.AreYouSure()
"
,
function
()
{
spyOn
(
$
.
fn
,
"
areYouSure
"
);
this
.
view
.
postRenderTemplate
();
expect
(
$
.
fn
.
areYouSure
).
toHaveBeenCalled
();
});
});
describe
(
"
createComment
"
,
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