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
fe81e7b7
Commit
fe81e7b7
authored
Aug 03, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Show errors close to the textarea
parent
0d78eeb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
8 deletions
+18
-8
issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+6
-2
issue_note.vue
app/assets/javascripts/notes/components/issue_note.vue
+6
-2
issue_note_body.vue
app/assets/javascripts/notes/components/issue_note_body.vue
+2
-2
issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+4
-2
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
fe81e7b7
...
...
@@ -98,7 +98,11 @@
if
(
res
.
errors
.
commands_only
)
{
this
.
discard
();
}
else
{
Flash
(
'Something went wrong while adding your comment. Please try again.'
);
Flash
(
'Something went wrong while adding your comment. Please try again.'
,
'alert'
,
$
(
this
.
$refs
.
commentForm
),
);
}
}
else
{
this
.
discard
();
...
...
@@ -168,7 +172,7 @@
<ul
v-if=
"isLoggedIn"
class=
"notes notes-form timeline new-note"
>
<li
class=
"timeline-entry"
>
<li
class=
"timeline-entry"
ref=
"commentForm"
>
<div
class=
"timeline-entry-inner"
>
<div
class=
"flash-container timeline-content"
></div>
<div
class=
"timeline-icon hidden-xs hidden-sm"
>
...
...
app/assets/javascripts/notes/components/issue_note.vue
View file @
fe81e7b7
...
...
@@ -75,7 +75,7 @@
});
}
},
formUpdateHandler
(
noteText
)
{
formUpdateHandler
(
noteText
,
parentElement
)
{
const
data
=
{
endpoint
:
this
.
note
.
path
,
note
:
{
...
...
@@ -92,7 +92,11 @@
// TODO: this could be moved down, by setting a prop
$
(
this
.
$refs
.
noteBody
.
$el
).
renderGFM
();
})
.
catch
(()
=>
Flash
(
'Something went wrong while editing your comment. Please try again.'
));
.
catch
(()
=>
Flash
(
'Something went wrong while editing your comment. Please try again.'
,
'alert'
,
$
(
parentElement
),
));
},
formCancelHandler
(
shouldConfirm
,
isDirty
)
{
if
(
shouldConfirm
&&
isDirty
)
{
...
...
app/assets/javascripts/notes/components/issue_note_body.vue
View file @
fe81e7b7
...
...
@@ -43,8 +43,8 @@
});
}
},
handleFormUpdate
(
note
)
{
this
.
$emit
(
'handleFormUpdate'
,
note
);
handleFormUpdate
(
note
,
parentElement
)
{
this
.
$emit
(
'handleFormUpdate'
,
note
,
parentElement
);
},
formCancelHandler
(
shouldConfirm
,
isDirty
)
{
this
.
$emit
(
'cancelFormEdition'
,
shouldConfirm
,
isDirty
);
...
...
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
fe81e7b7
...
...
@@ -68,7 +68,7 @@
methods
:
{
handleUpdate
()
{
this
.
isSubmitting
=
true
;
this
.
$emit
(
'handleFormUpdate'
,
this
.
note
);
this
.
$emit
(
'handleFormUpdate'
,
this
.
note
,
this
.
$refs
.
editNoteForm
);
},
editMyLastNote
()
{
if
(
this
.
note
===
''
)
{
...
...
@@ -94,6 +94,7 @@
},
watch
:
{
noteBody
()
{
debugger
;
if
(
this
.
note
===
this
.
initialNote
)
{
this
.
note
=
this
.
noteBody
;
}
else
{
...
...
@@ -105,7 +106,7 @@
</
script
>
<
template
>
<div
class=
"note-edit-form current-note-edit-form"
>
<div
ref=
"editNoteForm"
class=
"note-edit-form current-note-edit-form"
>
<div
v-if=
"conflictWhileEditing"
class=
"js-conflict-edit-warning alert alert-danger"
>
...
...
@@ -116,6 +117,7 @@
rel=
"noopener noreferrer"
>
updated comment
</a>
to ensure information is not lost.
</div>
<div
class=
"flash-container timeline-content"
></div>
<form
class=
"edit-note common-note-form"
>
<markdown-field
...
...
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