Commit a2f03fdc authored by Simon Knox's avatar Simon Knox Committed by Mike Greiling

add tooltip directive from gitlab-ui

parent ebd8931e
...@@ -3,8 +3,10 @@ import progressBar from '@gitlab-org/gitlab-ui/dist/components/base/progress_bar ...@@ -3,8 +3,10 @@ import progressBar from '@gitlab-org/gitlab-ui/dist/components/base/progress_bar
import modal from '@gitlab-org/gitlab-ui/dist/components/base/modal'; import modal from '@gitlab-org/gitlab-ui/dist/components/base/modal';
import dModal from '@gitlab-org/gitlab-ui/dist/directives/modal'; import dModal from '@gitlab-org/gitlab-ui/dist/directives/modal';
import dTooltip from '@gitlab-org/gitlab-ui/dist/directives/tooltip';
Vue.component('gl-progress-bar', progressBar); Vue.component('gl-progress-bar', progressBar);
Vue.component('gl-ui-modal', modal); Vue.component('gl-ui-modal', modal);
Vue.directive('gl-modal', dModal); Vue.directive('gl-modal', dModal);
Vue.directive('gl-tooltip', dTooltip);
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
import { pluralize, truncate } from '~/lib/utils/text_utility'; import { pluralize, truncate } from '~/lib/utils/text_utility';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue'; import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
import { COUNT_OF_AVATARS_IN_GUTTER, LENGTH_OF_AVATAR_TOOLTIP } from '../constants'; import { COUNT_OF_AVATARS_IN_GUTTER, LENGTH_OF_AVATAR_TOOLTIP } from '../constants';
export default { export default {
directives: {
tooltip,
},
components: { components: {
Icon, Icon,
UserAvatarImage, UserAvatarImage,
...@@ -91,10 +87,10 @@ export default { ...@@ -91,10 +87,10 @@ export default {
@click.native="toggleDiscussions" @click.native="toggleDiscussions"
/> />
<span <span
v-tooltip v-gl-tooltip
v-if="moreText" v-if="moreText"
:title="moreText" :title="moreText"
class="diff-comments-more-count has-tooltip js-diff-comment-avatar js-diff-comment-plus" class="diff-comments-more-count js-diff-comment-avatar js-diff-comment-plus"
data-container="body" data-container="body"
data-placement="top" data-placement="top"
role="button" role="button"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}, },
"dependencies": { "dependencies": {
"@gitlab-org/gitlab-svgs": "^1.29.0", "@gitlab-org/gitlab-svgs": "^1.29.0",
"@gitlab-org/gitlab-ui": "^1.1.0", "@gitlab-org/gitlab-ui": "^1.2.0",
"autosize": "^4.0.0", "autosize": "^4.0.0",
"axios": "^0.17.1", "axios": "^0.17.1",
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
......
...@@ -82,9 +82,9 @@ ...@@ -82,9 +82,9 @@
version "1.29.0" version "1.29.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-svgs/-/gitlab-svgs-1.29.0.tgz#03b65b513f9099bbda6ecf94d673a2952f8c6c70" resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-svgs/-/gitlab-svgs-1.29.0.tgz#03b65b513f9099bbda6ecf94d673a2952f8c6c70"
"@gitlab-org/gitlab-ui@^1.1.0": "@gitlab-org/gitlab-ui@^1.2.0":
version "1.1.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.1.0.tgz#4216b84c142e37653666da6a088384a44c9d5727" resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.2.0.tgz#1d9bf067c2ccf70bcc8e8150644dac475106f3c8"
dependencies: dependencies:
"@gitlab-org/gitlab-svgs" "^1.23.0" "@gitlab-org/gitlab-svgs" "^1.23.0"
bootstrap-vue "^2.0.0-rc.11" bootstrap-vue "^2.0.0-rc.11"
......
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