BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
aa3ff56c
Commit
aa3ff56c
authored
Aug 23, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Empty textarea while submitting comment and restore content if request fails.
parent
fa482111
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+4
-5
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
aa3ff56c
...
...
@@ -123,6 +123,7 @@
noteData
.
data
.
note
.
type
=
constants
.
DISCUSSION_NOTE
;
}
this
.
isSubmitting
=
true
;
this
.
note
=
''
;
// Empty textarea while being requested. Repopulate in catch
this
.
saveNote
(
noteData
)
.
then
((
res
)
=>
{
...
...
@@ -148,11 +149,9 @@
.
catch
(()
=>
{
this
.
isSubmitting
=
false
;
this
.
discard
(
false
);
Flash
(
'Your comment could not be submitted! Please check your network connection and try again.'
,
'alert'
,
$
(
this
.
$el
),
);
const
msg
=
'Your comment could not be submitted! Please check your network connection and try again.'
;
Flash
(
msg
,
'alert'
,
$
(
this
.
$el
));
this
.
note
=
noteData
.
data
.
note
.
note
;
// Restore textarea content.
this
.
removePlaceholderNotes
();
});
}
else
{
...
...
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