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
a4515778
Commit
a4515778
authored
Jul 12, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Fix ToDo list editability.
parent
77f6f0b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
app/assets/javascripts/notes/components/issue_note.vue
app/assets/javascripts/notes/components/issue_note.vue
+1
-0
app/assets/javascripts/notes/components/issue_note_body.vue
app/assets/javascripts/notes/components/issue_note_body.vue
+24
-0
No files found.
app/assets/javascripts/notes/components/issue_note.vue
View file @
a4515778
...
...
@@ -147,6 +147,7 @@ export default {
</div>
<issue-note-body
:note=
"note"
:canEdit=
"note.current_user.can_edit"
:isEditing=
"isEditing"
:formUpdateHandler=
"formUpdateHandler"
:formCancelHandler=
"formCancelHandler"
...
...
app/assets/javascripts/notes/components/issue_note_body.vue
View file @
a4515778
...
...
@@ -2,6 +2,7 @@
import
IssueNoteEditedText
from
'
./issue_note_edited_text.vue
'
;
import
IssueNoteAwardsList
from
'
./issue_note_awards_list.vue
'
;
import
IssueNoteForm
from
'
./issue_note_form.vue
'
;
import
TaskList
from
'
../../task_list
'
;
export
default
{
props
:
{
...
...
@@ -9,6 +10,10 @@ export default {
type
:
Object
,
required
:
true
,
},
canEdit
:
{
type
:
Boolean
,
required
:
true
,
},
isEditing
:
{
type
:
Boolean
,
required
:
false
,
...
...
@@ -32,6 +37,15 @@ export default {
renderGFM
()
{
$
(
this
.
$refs
[
'
note-body
'
]).
renderGFM
();
},
initTaskList
()
{
if
(
this
.
canEdit
)
{
new
TaskList
({
dataType
:
'
note
'
,
fieldName
:
'
note
'
,
selector
:
'
.notes
'
});
}
},
handleFormUpdate
()
{
this
.
formUpdateHandler
({
note
:
this
.
$refs
.
noteForm
.
note
,
...
...
@@ -40,12 +54,17 @@ export default {
},
mounted
()
{
this
.
renderGFM
();
this
.
initTaskList
();
},
updated
()
{
this
.
initTaskList
();
},
};
</
script
>
<
template
>
<div
:class=
"
{ 'js-task-list-container': canEdit }"
ref="note-body"
class="note-body">
<div
...
...
@@ -57,6 +76,11 @@ export default {
:updateHandler=
"handleFormUpdate"
:cancelHandler=
"formCancelHandler"
:noteBody=
"note.note"
/>
<textarea
v-if=
"canEdit"
v-model=
"note.note"
:data-update-url=
"note.path"
class=
"hidden js-task-list-field"
></textarea>
<issue-note-edited-text
v-if=
"note.last_edited_by"
:editedAt=
"note.last_edited_at"
...
...
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