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
3158fa7e
Commit
3158fa7e
authored
Aug 10, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Improve code as per code reviews
parent
c4381067
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+10
-11
app/assets/javascripts/notes/components/issue_discussion.vue
app/assets/javascripts/notes/components/issue_discussion.vue
+1
-1
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
3158fa7e
...
...
@@ -29,18 +29,10 @@
},
watch
:
{
note
(
newNote
)
{
if
(
!
_
.
isEmpty
(
newNote
)
&&
!
this
.
isSubmitting
)
{
this
.
isSubmitButtonDisabled
=
false
;
}
else
{
this
.
isSubmitButtonDisabled
=
true
;
}
this
.
setIsSubmitButtonDisabled
(
newNote
,
this
.
isSubmitting
);
},
isSubmitting
(
newValue
)
{
if
(
!
_
.
isEmpty
(
this
.
note
)
&&
!
newValue
)
{
this
.
isSubmitButtonDisabled
=
false
;
}
else
{
this
.
isSubmitButtonDisabled
=
true
;
}
this
.
setIsSubmitButtonDisabled
(
this
.
note
,
newValue
);
},
},
computed
:
{
...
...
@@ -99,6 +91,13 @@
...
mapActions
([
'
saveNote
'
,
]),
setIsSubmitButtonDisabled
(
note
,
isSubmitting
)
{
if
(
!
_
.
isEmpty
(
note
)
&&
!
isSubmitting
)
{
this
.
isSubmitButtonDisabled
=
false
;
}
else
{
this
.
isSubmitButtonDisabled
=
true
;
}
},
handleSave
(
withIssueAction
)
{
if
(
this
.
note
.
length
)
{
const
noteData
=
{
...
...
@@ -176,7 +175,7 @@
},
editCurrentUserLastNote
()
{
if
(
this
.
note
===
''
)
{
const
lastNote
=
this
.
getCurrentUserLastNote
(
window
.
gon
.
current_user_id
)
;
const
lastNote
=
this
.
getCurrentUserLastNote
;
if
(
lastNote
)
{
eventHub
.
$emit
(
'
enterEditMode
'
,
{
...
...
app/assets/javascripts/notes/components/issue_discussion.vue
View file @
3158fa7e
...
...
@@ -183,7 +183,7 @@
title=
"Add a reply"
>
Reply...
</button>
<issue-note-form
v-if=
"isReplying"
save
ButtonT
itle=
"Comment"
save
-button-t
itle=
"Comment"
:discussion=
"note"
:is-editing=
"false"
@
handleFormUpdate=
"saveReply"
...
...
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