Commit 72dfc763 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: MR comment fixes.

parent 3c2d98f4
...@@ -175,17 +175,18 @@ export default { ...@@ -175,17 +175,18 @@ export default {
</markdown-field> </markdown-field>
<div class="note-form-actions clearfix"> <div class="note-form-actions clearfix">
<div class="pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown"> <div class="pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown">
<input <button
@click="handleSave()" @click="handleSave()"
:disabled="!note.length" :disabled="!note.length"
:value="commentButtonTitle"
class="btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button" class="btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button"
type="submit" /> type="button">
{{commentButtonTitle}}
</button>
<button <button
:disabled="!note.length" :disabled="!note.length"
name="button" name="button"
type="button" type="button"
class="btn btn-nr comment-btn note-type-toggle js-note-new-discussion" class="btn btn-nr comment-btn note-type-toggle js-note-new-discussion dropdown-toggle"
data-toggle="dropdown" data-toggle="dropdown"
aria-label="Open comment type dropdown"> aria-label="Open comment type dropdown">
<i <i
...@@ -193,7 +194,7 @@ export default { ...@@ -193,7 +194,7 @@ export default {
class="fa fa-caret-down toggle-icon"></i> class="fa fa-caret-down toggle-icon"></i>
</button> </button>
<ul <ul
class="dropdown-menu note-type-dropdown dropdown-open-top"> class="note-type-dropdown dropdown-open-top dropdown-menu">
<li <li
:class="{ 'item-selected': noteType === 'comment' }" :class="{ 'item-selected': noteType === 'comment' }"
@click.prevent="setNoteType('comment')"> @click.prevent="setNoteType('comment')">
...@@ -230,7 +231,8 @@ export default { ...@@ -230,7 +231,8 @@ export default {
<a <a
@click="handleSave(true)" @click="handleSave(true)"
:class="{'btn-reopen': !isIssueOpen, 'btn-close': isIssueOpen}" :class="{'btn-reopen': !isIssueOpen, 'btn-close': isIssueOpen}"
class="btn btn-nr btn-comment"> class="btn btn-nr btn-comment btn-comment-and-close"
role="button">
{{issueActionButtonTitle}} {{issueActionButtonTitle}}
</a> </a>
<a <a
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
PlaceholderSystemNote, PlaceholderSystemNote,
}, },
methods: { methods: {
component(note) { componentName(note) {
if (note.isPlaceholderNote) { if (note.isPlaceholderNote) {
if (note.placeholderType === 'systemNote') { if (note.placeholderType === 'systemNote') {
return PlaceholderSystemNote; return PlaceholderSystemNote;
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
<ul class="notes"> <ul class="notes">
<component <component
v-for="note in note.notes" v-for="note in note.notes"
:is="component(note)" :is="componentName(note)"
:note="componentData(note)" :note="componentData(note)"
key="note.id" /> key="note.id" />
</ul> </ul>
......
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
]), ]),
}, },
methods: { methods: {
component(note) { componentName(note) {
if (note.isPlaceholderNote) { if (note.isPlaceholderNote) {
if (note.placeholderType === 'systemNote') { if (note.placeholderType === 'systemNote') {
return PlaceholderSystemNote; return PlaceholderSystemNote;
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
class="notes main-notes-list timeline"> class="notes main-notes-list timeline">
<component <component
v-for="note in notes" v-for="note in notes"
:is="component(note)" :is="componentName(note)"
:note="componentData(note)" :note="componentData(note)"
:key="note.id" /> :key="note.id" />
</ul> </ul>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment