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
Jérome Perrin
gitlab-ce
Commits
905ad9cd
Commit
905ad9cd
authored
Jun 21, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Implement show/hide of discussion reply form.
parent
b3704daf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
+33
-4
app/assets/javascripts/notes/components/issue_discussion.vue
app/assets/javascripts/notes/components/issue_discussion.vue
+20
-2
app/assets/javascripts/notes/components/issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+9
-2
app/assets/stylesheets/pages/issues.scss
app/assets/stylesheets/pages/issues.scss
+4
-0
No files found.
app/assets/javascripts/notes/components/issue_discussion.vue
View file @
905ad9cd
...
...
@@ -4,6 +4,7 @@ import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_
import
IssueNoteHeader
from
'
./issue_note_header.vue
'
;
import
IssueNoteActions
from
'
./issue_note_actions.vue
'
;
import
IssueNoteEditedText
from
'
./issue_note_edited_text.vue
'
;
import
IssueNoteForm
from
'
./issue_note_form.vue
'
;
export
default
{
props
:
{
...
...
@@ -16,6 +17,7 @@ export default {
return
{
registerLink
:
'
#
'
,
signInLink
:
'
#
'
,
isReplying
:
false
,
};
},
computed
:
{
...
...
@@ -32,6 +34,7 @@ export default {
IssueNoteHeader
,
IssueNoteActions
,
IssueNoteEditedText
,
IssueNoteForm
,
},
mounted
()
{
// We need to grab the register and sign in links from DOM for the time being.
...
...
@@ -49,6 +52,15 @@ export default {
discussionId
:
this
.
note
.
id
,
});
},
showReplyForm
()
{
this
.
isReplying
=
true
;
},
cancelReplyForm
()
{
this
.
isReplying
=
false
;
},
saveReply
()
{
this
.
isReplying
=
false
;
},
},
};
</
script
>
...
...
@@ -95,10 +107,16 @@ export default {
<div
class=
"flash-container"
></div>
<div
class=
"discussion-reply-holder"
>
<button
v-if=
"note.can_reply"
v-if=
"note.can_reply && !isReplying"
@
click=
"showReplyForm"
type=
"button"
class=
"btn btn-text-field
js-discussion-reply-button
"
class=
"btn btn-text-field"
title=
"Add a reply"
>
Reply...
</button>
<issue-note-form
v-if=
"isReplying"
saveButtonTitle=
"Comment"
:updateHandler=
"saveReply"
:cancelHandler=
"cancelReplyForm"
/>
<div
v-if=
"!note.can_reply"
class=
"disabled-comment text-center"
>
...
...
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
905ad9cd
...
...
@@ -5,7 +5,8 @@ export default {
props
:
{
noteBody
:
{
type
:
String
,
required
:
true
,
required
:
false
,
default
:
''
,
},
updateHandler
:
{
type
:
Function
,
...
...
@@ -15,6 +16,11 @@ export default {
type
:
Function
,
required
:
true
,
},
saveButtonTitle
:
{
type
:
String
,
required
:
false
,
default
:
'
Save comment
'
,
}
},
data
()
{
return
{
...
...
@@ -40,6 +46,7 @@ export default {
this
.
markdownDocsUrl
=
markdownDocs
;
this
.
markdownPreviewUrl
=
markdownPreviewUrl
;
this
.
$refs
.
textarea
.
focus
();
},
};
</
script
>
...
...
@@ -68,7 +75,7 @@ export default {
@
click=
"handleUpdate"
type=
"button"
class=
"btn btn-nr btn-save"
>
Save comment
{{
saveButtonTitle
}}
</button>
<button
@
click=
"cancelHandler"
...
...
app/assets/stylesheets/pages/issues.scss
View file @
905ad9cd
...
...
@@ -250,6 +250,10 @@ ul.related-merge-requests > li {
}
}
.discussion-reply-holder
.note-edit-form
{
display
:
block
;
}
@media
(
min-width
:
$screen-sm-min
)
{
.emoji-block
.row
{
display
:
flex
;
...
...
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