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
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
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