Commit f15be51b authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Wrap comment form with needed element.

parent a4515778
...@@ -137,100 +137,102 @@ export default { ...@@ -137,100 +137,102 @@ export default {
v-if="isLoggedIn" v-if="isLoggedIn"
class="notes notes-form timeline new-note"> class="notes notes-form timeline new-note">
<li class="timeline-entry"> <li class="timeline-entry">
<div class="timeline-icon hidden-xs hidden-sm"> <div class="timeline-entry-inner">
<user-avatar-link <div class="timeline-icon hidden-xs hidden-sm">
v-if="author" <user-avatar-link
:linkHref="author.path" v-if="author"
:imgSrc="author.avatar_url" :linkHref="author.path"
:imgAlt="author.name" :imgSrc="author.avatar_url"
:imgSize="40" /> :imgAlt="author.name"
</div> :imgSize="40" />
<div class="timeline-content timeline-content-form common-note-form"> </div>
<markdown-field <div class="timeline-content timeline-content-form common-note-form">
:markdown-preview-url="markdownPreviewUrl" <markdown-field
:markdown-docs="markdownDocsUrl" :markdown-preview-url="markdownPreviewUrl"
:addSpacingClasses="false"> :markdown-docs="markdownDocsUrl"
<textarea :addSpacingClasses="false">
id="note-body" <textarea
class="note-textarea js-gfm-input js-autosize markdown-area" id="note-body"
data-supports-slash-commands="true" class="note-textarea js-gfm-input js-autosize markdown-area"
data-supports-quick-actions="true" data-supports-slash-commands="true"
aria-label="Description" data-supports-quick-actions="true"
v-model="note" aria-label="Description"
ref="textarea" v-model="note"
slot="textarea" ref="textarea"
placeholder="Write a comment or drag your files here..." slot="textarea"
@keydown.up="editMyLastNote" placeholder="Write a comment or drag your files here..."
@keydown.meta.enter="handleSave()"> @keydown.up="editMyLastNote"
</textarea> @keydown.meta.enter="handleSave()">
</markdown-field> </textarea>
<div class="note-form-actions clearfix"> </markdown-field>
<div class="pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown"> <div class="note-form-actions clearfix">
<input <div class="pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown">
@click="handleSave()" <input
:disabled="!note.length" @click="handleSave()"
:value="commentButtonTitle" :disabled="!note.length"
class="btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button" :value="commentButtonTitle"
type="submit" /> class="btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button"
<button type="submit" />
:disabled="!note.length" <button
name="button" :disabled="!note.length"
type="button" name="button"
class="btn btn-nr comment-btn note-type-toggle js-note-new-discussion" type="button"
data-toggle="dropdown" class="btn btn-nr comment-btn note-type-toggle js-note-new-discussion"
aria-label="Open comment type dropdown"> data-toggle="dropdown"
<i aria-label="Open comment type dropdown">
aria-hidden="true" <i
class="fa fa-caret-down toggle-icon"></i> aria-hidden="true"
</button> class="fa fa-caret-down toggle-icon"></i>
<ul </button>
class="dropdown-menu note-type-dropdown dropdown-open-top"> <ul
<li class="dropdown-menu note-type-dropdown dropdown-open-top">
:class="{ 'item-selected': noteType === 'comment' }" <li
@click.prevent="setNoteType('comment')"> :class="{ 'item-selected': noteType === 'comment' }"
<a href="#"> @click.prevent="setNoteType('comment')">
<i <a href="#">
aria-hidden="true" <i
class="fa fa-check"></i> aria-hidden="true"
<div class="description"> class="fa fa-check"></i>
<strong>Comment</strong> <div class="description">
<p> <strong>Comment</strong>
Add a general comment to this issue. <p>
</p> Add a general comment to this issue.
</div> </p>
</a> </div>
</li> </a>
<li class="divider"></li> </li>
<li <li class="divider"></li>
:class="{ 'item-selected': noteType === 'discussion' }" <li
@click.prevent="setNoteType('discussion')"> :class="{ 'item-selected': noteType === 'discussion' }"
<a href="#"> @click.prevent="setNoteType('discussion')">
<i <a href="#">
aria-hidden="true" <i
class="fa fa-check"></i> aria-hidden="true"
<div class="description"> class="fa fa-check"></i>
<strong>Start discussion</strong> <div class="description">
<p> <strong>Start discussion</strong>
Discuss a specific suggestion or question. <p>
</p> Discuss a specific suggestion or question.
</div> </p>
</a> </div>
</li> </a>
</ul> </li>
</ul>
</div>
<a
@click="handleSave(true)"
:class="{'btn-reopen': !isIssueOpen, 'btn-close': isIssueOpen}"
class="btn btn-nr btn-comment">
{{issueActionButtonTitle}}
</a>
<a
v-if="note.length"
@click="discard"
class="btn btn-cancel js-note-discard"
role="button">
Discard draft
</a>
</div> </div>
<a
@click="handleSave(true)"
:class="{'btn-reopen': !isIssueOpen, 'btn-close': isIssueOpen}"
class="btn btn-nr btn-comment">
{{issueActionButtonTitle}}
</a>
<a
v-if="note.length"
@click="discard"
class="btn btn-cancel js-note-discard"
role="button">
Discard draft
</a>
</div> </div>
</div> </div>
</li> </li>
......
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