summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r--app/assets/javascripts/notes/components/comment_form.vue26
-rw-r--r--app/assets/javascripts/notes/components/diff_file_header.vue12
-rw-r--r--app/assets/javascripts/notes/components/diff_with_note.vue6
-rw-r--r--app/assets/javascripts/notes/components/discussion_counter.vue6
-rw-r--r--app/assets/javascripts/notes/components/discussion_locked_widget.vue2
-rw-r--r--app/assets/javascripts/notes/components/note_actions.vue28
-rw-r--r--app/assets/javascripts/notes/components/note_awards_list.vue16
-rw-r--r--app/assets/javascripts/notes/components/note_body.vue10
-rw-r--r--app/assets/javascripts/notes/components/note_form.vue20
-rw-r--r--app/assets/javascripts/notes/components/note_header.vue12
-rw-r--r--app/assets/javascripts/notes/components/noteable_discussion.vue18
-rw-r--r--app/assets/javascripts/notes/components/noteable_note.vue6
12 files changed, 81 insertions, 81 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue
index 72d7e22fba0..dbe398cc694 100644
--- a/app/assets/javascripts/notes/components/comment_form.vue
+++ b/app/assets/javascripts/notes/components/comment_form.vue
@@ -312,8 +312,8 @@ Please check your network connection and try again.`;
<div>
<note-signed-out-widget v-if="!isLoggedIn" />
<discussion-locked-widget
- issuable-type="issue"
v-else-if="isLocked(getNoteableData) && !canCreateNote"
+ issuable-type="issue"
/>
<ul
v-else-if="canCreateNote"
@@ -345,22 +345,22 @@ Please check your network connection and try again.`;
/>
<markdown-field
+ ref="markdownField"
:markdown-preview-path="markdownPreviewPath"
:markdown-docs-path="markdownDocsPath"
:quick-actions-docs-path="quickActionsDocsPath"
- :add-spacing-classes="false"
- ref="markdownField">
+ :add-spacing-classes="false">
<textarea
id="note-body"
+ ref="textarea"
+ slot="textarea"
+ v-model="note"
+ :disabled="isSubmitting"
name="note[note]"
class="note-textarea js-vue-comment-form
js-gfm-input js-autosize markdown-area js-vue-textarea"
data-supports-quick-actions="true"
aria-label="Description"
- v-model="note"
- ref="textarea"
- slot="textarea"
- :disabled="isSubmitting"
placeholder="Write a comment or drag your files here..."
@keydown.up="editCurrentUserLastNote()"
@keydown.meta.enter="handleSave()"
@@ -372,10 +372,10 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
class="float-left btn-group
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
<button
- @click.prevent="handleSave()"
:disabled="isSubmitButtonDisabled"
class="btn btn-create comment-btn js-comment-button js-comment-submit-button"
- type="submit">
+ type="submit"
+ @click.prevent="handleSave()">
{{ __(commentButtonTitle) }}
</button>
<button
@@ -434,20 +434,20 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
<loading-button
v-if="canUpdateIssue"
:loading="isToggleStateButtonLoading"
- @click="handleSave(true)"
:container-class="[
actionButtonClassNames,
'btn btn-comment btn-comment-and-close js-action-button'
]"
:disabled="isToggleStateButtonLoading || isSubmitting"
:label="issueActionButtonTitle"
+ @click="handleSave(true)"
/>
<button
- type="button"
v-if="note.length"
- @click="discard"
- class="btn btn-cancel js-note-discard">
+ type="button"
+ class="btn btn-cancel js-note-discard"
+ @click="discard">
Discard draft
</button>
</div>
diff --git a/app/assets/javascripts/notes/components/diff_file_header.vue b/app/assets/javascripts/notes/components/diff_file_header.vue
index 94d9dc69964..fc7b52be241 100644
--- a/app/assets/javascripts/notes/components/diff_file_header.vue
+++ b/app/assets/javascripts/notes/components/diff_file_header.vue
@@ -29,12 +29,12 @@ export default {
<span>
<icon name="archive" />
<strong
- v-html="diffFile.submoduleLink"
class="file-title-name"
+ v-html="diffFile.submoduleLink"
></strong>
<clipboard-button
- title="Copy file path to clipboard"
:text="diffFile.submoduleLink"
+ title="Copy file path to clipboard"
css-class="btn-default btn-transparent btn-clipboard"
/>
</span>
@@ -48,16 +48,16 @@ export default {
<span v-html="diffFile.blobIcon"></span>
<span v-if="diffFile.renamedFile">
<strong
- class="file-title-name has-tooltip"
:title="diffFile.oldPath"
+ class="file-title-name has-tooltip"
data-container="body"
>
{{ diffFile.oldPath }}
</strong>
&rarr;
<strong
- class="file-title-name has-tooltip"
:title="diffFile.newPath"
+ class="file-title-name has-tooltip"
data-container="body"
>
{{ diffFile.newPath }}
@@ -66,8 +66,8 @@ export default {
<strong
v-else
- class="file-title-name has-tooltip"
:title="diffFile.oldPath"
+ class="file-title-name has-tooltip"
data-container="body"
>
{{ diffFile.filePath }}
@@ -78,8 +78,8 @@ export default {
</component>
<clipboard-button
- title="Copy file path to clipboard"
:text="diffFile.filePath"
+ title="Copy file path to clipboard"
css-class="btn-default btn-transparent btn-clipboard"
/>
diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue
index ee01ec85bbb..cafb28910eb 100644
--- a/app/assets/javascripts/notes/components/diff_with_note.vue
+++ b/app/assets/javascripts/notes/components/diff_with_note.vue
@@ -60,8 +60,8 @@ export default {
<template>
<div
ref="fileHolder"
- class="diff-file file-holder"
:class="diffFileClass"
+ class="diff-file file-holder"
>
<div class="js-file-title file-title file-title-flex-parent">
<diff-file-header
@@ -74,11 +74,11 @@ export default {
>
<table>
<component
+ v-for="(html, index) in diffRows"
:is="rowTag(html)"
:class="html.className"
- v-for="(html, index) in diffRows"
- v-html="html.outerHTML"
:key="index"
+ v-html="html.outerHTML"
/>
<tr class="notes_holder">
<td
diff --git a/app/assets/javascripts/notes/components/discussion_counter.vue b/app/assets/javascripts/notes/components/discussion_counter.vue
index cbe4774a360..68e17ac8055 100644
--- a/app/assets/javascripts/notes/components/discussion_counter.vue
+++ b/app/assets/javascripts/notes/components/discussion_counter.vue
@@ -95,8 +95,8 @@ export default {
class="btn-group"
role="group">
<a
- :href="resolveAllDiscussionsIssuePath"
v-tooltip
+ :href="resolveAllDiscussionsIssuePath"
title="Resolve all discussions in new issue"
data-container="body"
class="new-issue-for-discussion btn btn-default discussion-create-issue-btn">
@@ -108,11 +108,11 @@ export default {
class="btn-group"
role="group">
<button
- @click="jumpToFirstDiscussion"
v-tooltip
title="Jump to first unresolved discussion"
data-container="body"
- class="btn btn-default discussion-next-btn">
+ class="btn btn-default discussion-next-btn"
+ @click="jumpToFirstDiscussion">
<span v-html="nextDiscussionSvg"></span>
</button>
</div>
diff --git a/app/assets/javascripts/notes/components/discussion_locked_widget.vue b/app/assets/javascripts/notes/components/discussion_locked_widget.vue
index 13283b187d1..de0a5f8489b 100644
--- a/app/assets/javascripts/notes/components/discussion_locked_widget.vue
+++ b/app/assets/javascripts/notes/components/discussion_locked_widget.vue
@@ -14,8 +14,8 @@ export default {
<div class="disabled-comment text-center">
<span class="issuable-note-warning inline">
<icon
- name="lock"
:size="16"
+ name="lock"
class="icon"
/>
<span>
diff --git a/app/assets/javascripts/notes/components/note_actions.vue b/app/assets/javascripts/notes/components/note_actions.vue
index 626b0799581..0bf4258a257 100644
--- a/app/assets/javascripts/notes/components/note_actions.vue
+++ b/app/assets/javascripts/notes/components/note_actions.vue
@@ -129,12 +129,12 @@ export default {
class="note-actions-item">
<button
v-tooltip
- @click="onResolve"
:class="{ 'is-disabled': !resolvable, 'is-active': isResolved }"
:title="resolveButtonTitle"
:aria-label="resolveButtonTitle"
type="button"
- class="line-resolve-btn note-action-button">
+ class="line-resolve-btn note-action-button"
+ @click="onResolve">
<template v-if="!isResolving">
<div
v-if="isResolved"
@@ -164,16 +164,16 @@ export default {
>
<loading-icon :inline="true" />
<span
- v-html="emojiSmiling"
- class="link-highlight award-control-icon-neutral">
+ class="link-highlight award-control-icon-neutral"
+ v-html="emojiSmiling">
</span>
<span
- v-html="emojiSmiley"
- class="link-highlight award-control-icon-positive">
+ class="link-highlight award-control-icon-positive"
+ v-html="emojiSmiley">
</span>
<span
- v-html="emojiSmile"
- class="link-highlight award-control-icon-super-positive">
+ class="link-highlight award-control-icon-super-positive"
+ v-html="emojiSmile">
</span>
</a>
</div>
@@ -181,16 +181,16 @@ export default {
v-if="canEdit"
class="note-actions-item">
<button
- @click="onEdit"
v-tooltip
type="button"
title="Edit comment"
class="note-action-button js-note-edit btn btn-transparent"
data-container="body"
- data-placement="bottom">
+ data-placement="bottom"
+ @click="onEdit">
<span
- v-html="editSvg"
- class="link-highlight">
+ class="link-highlight"
+ v-html="editSvg">
</span>
</button>
</div>
@@ -218,9 +218,9 @@ export default {
</li>
<li v-if="canEdit">
<button
- @click.prevent="onDelete"
class="btn btn-transparent js-note-delete js-note-delete"
- type="button">
+ type="button"
+ @click.prevent="onDelete">
<span class="text-danger">
Delete comment
</span>
diff --git a/app/assets/javascripts/notes/components/note_awards_list.vue b/app/assets/javascripts/notes/components/note_awards_list.vue
index e8fd155a1ee..521b4d16286 100644
--- a/app/assets/javascripts/notes/components/note_awards_list.vue
+++ b/app/assets/javascripts/notes/components/note_awards_list.vue
@@ -199,10 +199,10 @@ export default {
:key="index"
:class="getAwardClassBindings(awardList, awardName)"
:title="awardTitle(awardList)"
- @click="handleAward(awardName)"
class="btn award-control"
data-placement="bottom"
- type="button">
+ type="button"
+ @click="handleAward(awardName)">
<span v-html="getAwardHTML(awardName)"></span>
<span class="award-control-text js-counter">
{{ awardList.length }}
@@ -220,16 +220,16 @@ export default {
data-placement="bottom"
type="button">
<span
- v-html="emojiSmiling"
- class="award-control-icon award-control-icon-neutral">
+ class="award-control-icon award-control-icon-neutral"
+ v-html="emojiSmiling">
</span>
<span
- v-html="emojiSmiley"
- class="award-control-icon award-control-icon-positive">
+ class="award-control-icon award-control-icon-positive"
+ v-html="emojiSmiley">
</span>
<span
- v-html="emojiSmile"
- class="award-control-icon award-control-icon-super-positive">
+ class="award-control-icon award-control-icon-super-positive"
+ v-html="emojiSmile">
</span>
<i
aria-hidden="true"
diff --git a/app/assets/javascripts/notes/components/note_body.vue b/app/assets/javascripts/notes/components/note_body.vue
index 0cb626c14f4..864edcd2ec6 100644
--- a/app/assets/javascripts/notes/components/note_body.vue
+++ b/app/assets/javascripts/notes/components/note_body.vue
@@ -80,20 +80,20 @@ export default {
<template>
<div
- :class="{ 'js-task-list-container': canEdit }"
ref="note-body"
+ :class="{ 'js-task-list-container': canEdit }"
class="note-body">
<div
- v-html="note.note_html"
- class="note-text md"></div>
+ class="note-text md"
+ v-html="note.note_html"></div>
<note-form
v-if="isEditing"
ref="noteForm"
- @handleFormUpdate="handleFormUpdate"
- @cancelFormEdition="formCancelHandler"
:is-editing="isEditing"
:note-body="noteBody"
:note-id="note.id"
+ @handleFormUpdate="handleFormUpdate"
+ @cancelFormEdition="formCancelHandler"
/>
<textarea
v-if="canEdit"
diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue
index c59a2e7a406..a752f634c07 100644
--- a/app/assets/javascripts/notes/components/note_form.vue
+++ b/app/assets/javascripts/notes/components/note_form.vue
@@ -165,14 +165,14 @@ export default {
:add-spacing-classes="false">
<textarea
id="note_note"
+ ref="textarea"
+ slot="textarea"
+ :data-supports-quick-actions="!isEditing"
+ v-model="updatedNoteBody"
name="note[note]"
class="note-textarea js-gfm-input
js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
- :data-supports-quick-actions="!isEditing"
aria-label="Description"
- v-model="updatedNoteBody"
- ref="textarea"
- slot="textarea"
placeholder="Write a comment or drag your files here..."
@keydown.meta.enter="handleUpdate()"
@keydown.ctrl.enter="handleUpdate()"
@@ -182,23 +182,23 @@ js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
</markdown-field>
<div class="note-form-actions clearfix">
<button
- type="button"
- @click="handleUpdate()"
:disabled="isDisabled"
- class="js-vue-issue-save btn btn-save">
+ type="button"
+ class="js-vue-issue-save btn btn-save"
+ @click="handleUpdate()">
{{ saveButtonTitle }}
</button>
<button
v-if="note.resolvable"
- @click.prevent="handleUpdate(true)"
class="btn btn-nr btn-default append-right-10 js-comment-resolve-button"
+ @click.prevent="handleUpdate(true)"
>
{{ resolveButtonTitle }}
</button>
<button
- @click="cancelHandler()"
class="btn btn-cancel note-edit-cancel"
- type="button">
+ type="button"
+ @click="cancelHandler()">
Cancel
</button>
</div>
diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue
index a4081957207..ffe3ba9c805 100644
--- a/app/assets/javascripts/notes/components/note_header.vue
+++ b/app/assets/javascripts/notes/components/note_header.vue
@@ -66,9 +66,9 @@ export default {
v-if="includeToggle"
class="discussion-actions">
<button
- @click="handleToggle"
class="note-action-button discussion-toggle-button js-vue-toggle-button"
- type="button">
+ type="button"
+ @click="handleToggle">
<i
:class="toggleChevronClass"
class="fa"
@@ -90,16 +90,16 @@ export default {
</template>
<span
v-if="actionTextHtml"
- v-html="actionTextHtml"
- class="system-note-message">
+ class="system-note-message"
+ v-html="actionTextHtml">
</span>
<span class="system-note-separator">
&middot;
</span>
<a
:href="noteTimestampLink"
- @click="updateTargetNoteHash"
- class="note-timestamp system-note-separator">
+ class="note-timestamp system-note-separator"
+ @click="updateTargetNoteHash">
<time-ago-tooltip
:time="createdAt"
tooltip-placement="bottom"
diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue
index 7f5aacaa3a2..f9f5041a9f9 100644
--- a/app/assets/javascripts/notes/components/noteable_discussion.vue
+++ b/app/assets/javascripts/notes/components/noteable_discussion.vue
@@ -229,9 +229,9 @@ Please check your network connection and try again.`;
:note-id="discussion.id"
:include-toggle="true"
:expanded="note.expanded"
- @toggleHandler="toggleDiscussionHandler"
action-text="started a discussion"
class="discussion"
+ @toggleHandler="toggleDiscussionHandler"
/>
<note-edited-text
v-if="lastUpdatedAt"
@@ -269,19 +269,19 @@ Please check your network connection and try again.`;
class="btn-group"
role="group">
<button
- @click="showReplyForm"
type="button"
class="js-vue-discussion-reply btn btn-text-field"
- title="Add a reply">Reply...</button>
+ title="Add a reply"
+ @click="showReplyForm">Reply...</button>
</div>
<div
v-if="note.resolvable"
class="btn-group"
role="group">
<button
- @click="resolveHandler()"
type="button"
class="btn btn-default"
+ @click="resolveHandler()"
>
<i
v-if="isResolving"
@@ -301,8 +301,8 @@ Please check your network connection and try again.`;
class="btn-group"
role="group">
<a
- :href="note.resolve_with_issue_path"
v-tooltip
+ :href="note.resolve_with_issue_path"
class="new-issue-for-discussion btn
btn-default discussion-create-issue-btn"
title="Resolve this discussion in a new issue"
@@ -316,11 +316,11 @@ Please check your network connection and try again.`;
class="btn-group"
role="group">
<button
- @click="jumpToDiscussion"
v-tooltip
class="btn btn-default discussion-next-btn"
title="Jump to next unresolved discussion"
data-container="body"
+ @click="jumpToDiscussion"
>
<span v-html="nextDiscussionsSvg"></span>
</button>
@@ -330,12 +330,12 @@ Please check your network connection and try again.`;
</template>
<note-form
v-if="isReplying"
- save-button-title="Comment"
+ ref="noteForm"
:note="note"
:is-editing="false"
+ save-button-title="Comment"
@handleFormUpdate="saveReply"
- @cancelFormEdition="cancelReplyForm"
- ref="noteForm" />
+ @cancelFormEdition="cancelReplyForm" />
<note-signed-out-widget v-if="!canReply" />
</div>
</div>
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue
index 566f5c68e66..ec3ee407f0a 100644
--- a/app/assets/javascripts/notes/components/noteable_note.vue
+++ b/app/assets/javascripts/notes/components/noteable_note.vue
@@ -151,10 +151,10 @@ export default {
<template>
<li
- class="note timeline-entry"
:id="noteAnchorId"
:class="classNameBindings"
- :data-award-url="note.toggle_award_path">
+ :data-award-url="note.toggle_award_path"
+ class="note timeline-entry">
<div class="timeline-entry-inner">
<div class="timeline-icon">
<user-avatar-link
@@ -191,12 +191,12 @@ export default {
/>
</div>
<note-body
+ ref="noteBody"
:note="note"
:can-edit="note.current_user.can_edit"
:is-editing="isEditing"
@handleFormUpdate="formUpdateHandler"
@cancelFormEdition="formCancelHandler"
- ref="noteBody"
/>
</div>
</div>