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
Boxiang Sun
gitlab-ce
Commits
ebf7d52d
Commit
ebf7d52d
authored
Aug 23, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Hide note reply form when submitted and show it again if there is an error.
parent
aa3ff56c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
app/assets/javascripts/notes/components/issue_discussion.vue
app/assets/javascripts/notes/components/issue_discussion.vue
+11
-9
No files found.
app/assets/javascripts/notes/components/issue_discussion.vue
View file @
ebf7d52d
...
...
@@ -110,7 +110,7 @@
this
.
resetAutoSave
();
this
.
isReplying
=
false
;
},
saveReply
(
noteText
)
{
saveReply
(
noteText
,
form
,
callback
)
{
const
replyData
=
{
endpoint
:
this
.
newNotePath
,
flashContainer
:
this
.
$el
,
...
...
@@ -121,20 +121,22 @@
note
:
{
note
:
noteText
},
},
};
this
.
isReplying
=
false
;
this
.
saveNote
(
replyData
)
.
then
(()
=>
{
this
.
isReplying
=
false
;
this
.
resetAutoSave
();
callback
();
})
.
catch
(()
=>
{
Flash
(
'
Your comment could not be submitted! Please check your network connection and try again.
'
,
'
alert
'
,
$
(
this
.
$el
),
);
.
catch
((
err
)
=>
{
this
.
removePlaceholderNotes
();
this
.
$refs
.
noteForm
.
isSubmitting
=
false
;
this
.
isReplying
=
true
;
this
.
$nextTick
(()
=>
{
const
msg
=
'
Your comment could not be submitted! Please check your network connection and try again.
'
;
Flash
(
msg
,
'
alert
'
,
$
(
this
.
$el
));
this
.
$refs
.
noteForm
.
note
=
noteText
;
callback
(
err
);
});
});
},
},
...
...
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