From 6cb575d612cd2470ee4224159fa16458f5426f73 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 6 Jun 2017 15:46:31 -0500 Subject: Add support for multiple tooltips in the same Vue component Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33223 --- .../environments/components/environment_actions.vue | 11 +++++++---- .../environments/components/environment_external_url.vue | 9 ++++++++- .../environments/components/environment_monitoring.vue | 9 ++++++++- .../javascripts/environments/components/environment_stop.vue | 8 +++++++- .../environments/components/environment_terminal_button.vue | 8 +++++++- 5 files changed, 37 insertions(+), 8 deletions(-) (limited to 'app/assets/javascripts/environments') diff --git a/app/assets/javascripts/environments/components/environment_actions.vue b/app/assets/javascripts/environments/components/environment_actions.vue index a2448520a5f..e7495677e7c 100644 --- a/app/assets/javascripts/environments/components/environment_actions.vue +++ b/app/assets/javascripts/environments/components/environment_actions.vue @@ -2,6 +2,7 @@ import playIconSvg from 'icons/_icon_play.svg'; import eventHub from '../event_hub'; import loadingIcon from '../../vue_shared/components/loading_icon.vue'; +import tooltip from '../../vue_shared/directives/tooltip'; export default { props: { @@ -12,6 +13,10 @@ export default { }, }, + directives: { + tooltip, + }, + components: { loadingIcon, }, @@ -33,8 +38,6 @@ export default { onClickAction(endpoint) { this.isLoading = true; - $(this.$refs.tooltip).tooltip('destroy'); - eventHub.$emit('postAction', endpoint); }, @@ -53,11 +56,11 @@ export default { class="btn-group" role="group">