Commit 57b1b815 authored by Filipa Lacerda's avatar Filipa Lacerda

[ci skip] use tooltip directive

parent 0663eb4c
...@@ -136,7 +136,8 @@ ...@@ -136,7 +136,8 @@
:edited-at="note.last_updated_at" :edited-at="note.last_updated_at"
:edited-by="note.last_updated_by" :edited-by="note.last_updated_by"
action-text="Last updated" action-text="Last updated"
className="discussion-headline-light js-discussion-headline" /> class-name="discussion-headline-light js-discussion-headline"
/>
</div> </div>
</div> </div>
<div <div
...@@ -149,7 +150,7 @@ ...@@ -149,7 +150,7 @@
v-for="note in note.notes" v-for="note in note.notes"
:is="componentName(note)" :is="componentName(note)"
:note="componentData(note)" :note="componentData(note)"
key="note.id" :key="note.id"
/> />
</ul> </ul>
<div class="flash-container"></div> <div class="flash-container"></div>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import emojiSmile from 'icons/_emoji_smile.svg'; import emojiSmile from 'icons/_emoji_smile.svg';
import emojiSmiley from 'icons/_emoji_smiley.svg'; import emojiSmiley from 'icons/_emoji_smiley.svg';
import loadingIcon from '../../vue_shared/components/loading_icon.vue'; import loadingIcon from '../../vue_shared/components/loading_icon.vue';
import tooltip from '../../vue_shared/directives/tooltip';
export default { export default {
props: { props: {
...@@ -44,6 +45,9 @@ ...@@ -44,6 +45,9 @@
required: true, required: true,
}, },
}, },
directives: {
tooltip,
},
data() { data() {
return { return {
emojiSmiling, emojiSmiling,
...@@ -76,9 +80,10 @@ ...@@ -76,9 +80,10 @@
{{accessLevel}} {{accessLevel}}
</span> </span>
<a <a
v-tooltip
v-if="canAddAwardEmoji" v-if="canAddAwardEmoji"
:class="{ 'js-user-authored': isAuthoredByMe }" :class="{ 'js-user-authored': isAuthoredByMe }"
class="note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip" class="note-action-button note-emoji-button js-add-award js-note-emoji"
data-position="right" data-position="right"
href="#" href="#"
title="Add reaction"> title="Add reaction">
...@@ -100,9 +105,10 @@ ...@@ -100,9 +105,10 @@
v-if="shouldShowActionsDropdown" v-if="shouldShowActionsDropdown"
class="dropdown more-actions"> class="dropdown more-actions">
<button <button
v-tooltip
type="button" type="button"
title="More actions" title="More actions"
class="note-action-button more-actions-toggle has-tooltip btn btn-transparent" class="note-action-button more-actions-toggle btn btn-transparent"
data-toggle="dropdown" data-toggle="dropdown"
data-container="body"> data-container="body">
<i <i
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import emojiSmile from 'icons/_emoji_smile.svg'; import emojiSmile from 'icons/_emoji_smile.svg';
import emojiSmiley from 'icons/_emoji_smiley.svg'; import emojiSmiley from 'icons/_emoji_smiley.svg';
import * as Emoji from '../../emoji'; import * as Emoji from '../../emoji';
import tooltip from '../../vue_shared/directives/tooltip';
export default { export default {
props: { props: {
...@@ -26,6 +27,9 @@ ...@@ -26,6 +27,9 @@
required: true, required: true,
}, },
}, },
directives: {
tooltip,
},
data() { data() {
const userId = window.gon.current_user_id; const userId = window.gon.current_user_id;
...@@ -154,9 +158,6 @@ ...@@ -154,9 +158,6 @@
}; };
this.toggleAward(data) this.toggleAward(data)
.then(() => {
$(this.$el).find('.award-control').tooltip('fixTitle');
})
.catch(() => Flash('Something went wrong on our end.')); .catch(() => Flash('Something went wrong on our end.'));
}, },
}, },
...@@ -167,11 +168,12 @@ ...@@ -167,11 +168,12 @@
<div class="note-awards"> <div class="note-awards">
<div class="awards js-awards-block"> <div class="awards js-awards-block">
<button <button
v-tooltip
v-for="(awardList, awardName) in groupedAwards" v-for="(awardList, awardName) in groupedAwards"
:class="getAwardClassBindings(awardList, awardName)" :class="getAwardClassBindings(awardList, awardName)"
:title="awardTitle(awardList)" :title="awardTitle(awardList)"
@click="handleAward(awardName)" @click="handleAward(awardName)"
class="btn award-control has-tooltip" class="btn award-control"
data-placement="bottom" data-placement="bottom"
type="button"> type="button">
<span v-html="getAwardHTML(awardName)"></span> <span v-html="getAwardHTML(awardName)"></span>
...@@ -183,8 +185,9 @@ ...@@ -183,8 +185,9 @@
v-if="canAward" v-if="canAward"
class="award-menu-holder"> class="award-menu-holder">
<button <button
v-tooltip
:class="{ 'js-user-authored': isAuthoredByMe }" :class="{ 'js-user-authored': isAuthoredByMe }"
class="award-control btn has-tooltip js-add-award" class="award-control btn js-add-award"
title="Add reaction" title="Add reaction"
aria-label="Add reaction" aria-label="Add reaction"
data-placement="bottom" data-placement="bottom"
......
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