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
4f954d6a
Commit
4f954d6a
authored
Feb 25, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error for ajax:error when submitting comments
Fixes #13814
parent
26541240
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+7
-0
No files found.
app/assets/javascripts/notes.js.coffee
View file @
4f954d6a
...
...
@@ -30,6 +30,9 @@ class @Notes
$
(
document
).
on
"ajax:success"
,
".js-main-target-form"
,
@
addNote
$
(
document
).
on
"ajax:success"
,
".js-discussion-note-form"
,
@
addDiscussionNote
# catch note ajax errors
$
(
document
).
on
"ajax:error"
,
".js-main-target-form"
,
@
addNoteError
# change note in UI after update
$
(
document
).
on
"ajax:success"
,
"form.edit-note"
,
@
updateNote
...
...
@@ -309,6 +312,10 @@ class @Notes
addNote
:
(
xhr
,
note
,
status
)
=>
@
renderNote
(
note
)
addNoteError
:
(
xhr
,
note
,
status
)
=>
flash
=
new
Flash
(
'Your comment could not be submitted! Please check your network connection and try again.'
,
'alert'
)
flash
.
pinTo
(
'.md-area'
)
###
Called in response to the new note form being submitted
...
...
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