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
787616d4
Commit
787616d4
authored
Jul 21, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Update order of Vue properties to match docs.
parent
cd5599a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
36 deletions
+36
-36
app/assets/javascripts/notes/components/issue_discussion.vue
app/assets/javascripts/notes/components/issue_discussion.vue
+11
-11
app/assets/javascripts/notes/components/issue_note_body.vue
app/assets/javascripts/notes/components/issue_note_body.vue
+5
-5
app/assets/javascripts/notes/components/issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+17
-17
app/assets/javascripts/notes/components/issue_note_header.vue
...assets/javascripts/notes/components/issue_note_header.vue
+3
-3
No files found.
app/assets/javascripts/notes/components/issue_discussion.vue
View file @
787616d4
...
@@ -24,17 +24,6 @@ export default {
...
@@ -24,17 +24,6 @@ export default {
isReplying
:
false
,
isReplying
:
false
,
};
};
},
},
computed
:
{
discussion
()
{
return
this
.
note
.
notes
[
0
];
},
author
()
{
return
this
.
discussion
.
author
;
},
canReply
()
{
return
window
.
gl
.
issueData
.
current_user
.
can_create_note
;
},
},
components
:
{
components
:
{
issueNote
,
issueNote
,
userAvatarLink
,
userAvatarLink
,
...
@@ -46,6 +35,17 @@ export default {
...
@@ -46,6 +35,17 @@ export default {
placeholderNote
,
placeholderNote
,
placeholderSystemNote
,
placeholderSystemNote
,
},
},
computed
:
{
discussion
()
{
return
this
.
note
.
notes
[
0
];
},
author
()
{
return
this
.
discussion
.
author
;
},
canReply
()
{
return
window
.
gl
.
issueData
.
current_user
.
can_create_note
;
},
},
methods
:
{
methods
:
{
componentName
(
note
)
{
componentName
(
note
)
{
if
(
note
.
isPlaceholderNote
)
{
if
(
note
.
isPlaceholderNote
)
{
...
...
app/assets/javascripts/notes/components/issue_note_body.vue
View file @
787616d4
...
@@ -28,16 +28,16 @@ export default {
...
@@ -28,16 +28,16 @@ export default {
required
:
true
,
required
:
true
,
},
},
},
},
computed
:
{
noteBody
()
{
return
this
.
note
.
note
;
},
},
components
:
{
components
:
{
issueNoteEditedText
,
issueNoteEditedText
,
issueNoteAwardsList
,
issueNoteAwardsList
,
issueNoteForm
,
issueNoteForm
,
},
},
computed
:
{
noteBody
()
{
return
this
.
note
.
note
;
},
},
methods
:
{
methods
:
{
renderGFM
()
{
renderGFM
()
{
$
(
this
.
$refs
[
'
note-body
'
]).
renderGFM
();
$
(
this
.
$refs
[
'
note-body
'
]).
renderGFM
();
...
...
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
787616d4
...
@@ -36,18 +36,17 @@ export default {
...
@@ -36,18 +36,17 @@ export default {
conflictWhileEditing
:
false
,
conflictWhileEditing
:
false
,
};
};
},
},
watch
:
{
noteBody
()
{
if
(
this
.
note
===
this
.
initialNote
)
{
this
.
note
=
this
.
noteBody
;
}
else
{
this
.
conflictWhileEditing
=
true
;
}
},
},
components
:
{
components
:
{
markdownField
,
markdownField
,
},
},
computed
:
{
isDirty
()
{
return
this
.
initialNote
!==
this
.
note
;
},
noteHash
()
{
return
`#note_
${
this
.
noteId
}
`
;
},
},
methods
:
{
methods
:
{
handleUpdate
()
{
handleUpdate
()
{
this
.
updateHandler
({
this
.
updateHandler
({
...
@@ -67,14 +66,6 @@ export default {
...
@@ -67,14 +66,6 @@ export default {
}
}
},
},
},
},
computed
:
{
isDirty
()
{
return
this
.
initialNote
!==
this
.
note
;
},
noteHash
()
{
return
`#note_
${
this
.
noteId
}
`
;
},
},
mounted
()
{
mounted
()
{
const
issuableDataEl
=
document
.
getElementById
(
'
js-issuable-app-initial-data
'
);
const
issuableDataEl
=
document
.
getElementById
(
'
js-issuable-app-initial-data
'
);
const
issueData
=
JSON
.
parse
(
issuableDataEl
.
innerHTML
.
replace
(
/"/g
,
'
"
'
));
const
issueData
=
JSON
.
parse
(
issuableDataEl
.
innerHTML
.
replace
(
/"/g
,
'
"
'
));
...
@@ -84,6 +75,15 @@ export default {
...
@@ -84,6 +75,15 @@ export default {
this
.
markdownPreviewUrl
=
markdownPreviewUrl
;
this
.
markdownPreviewUrl
=
markdownPreviewUrl
;
this
.
$refs
.
textarea
.
focus
();
this
.
$refs
.
textarea
.
focus
();
},
},
watch
:
{
noteBody
()
{
if
(
this
.
note
===
this
.
initialNote
)
{
this
.
note
=
this
.
noteBody
;
}
else
{
this
.
conflictWhileEditing
=
true
;
}
},
},
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/notes/components/issue_note_header.vue
View file @
787616d4
...
@@ -35,14 +35,14 @@ export default {
...
@@ -35,14 +35,14 @@ export default {
required
:
false
,
required
:
false
,
},
},
},
},
components
:
{
timeAgoTooltip
,
},
data
()
{
data
()
{
return
{
return
{
isExpanded
:
true
,
isExpanded
:
true
,
};
};
},
},
components
:
{
timeAgoTooltip
,
},
computed
:
{
computed
:
{
toggleChevronClass
()
{
toggleChevronClass
()
{
return
this
.
isExpanded
?
'
fa-chevron-up
'
:
'
fa-chevron-down
'
;
return
this
.
isExpanded
?
'
fa-chevron-up
'
:
'
fa-chevron-down
'
;
...
...
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