diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-19 10:50:06 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-19 10:50:06 +0100 |
commit | 8752b99f88f631d0e63c4795b89d3eec50b21274 (patch) | |
tree | e3f5268daf7bfc83ae45905742f7872f68dadaf7 /app/assets | |
parent | 4038d50db0b33cb223108a6a0f4fd9b3e44a95c1 (diff) | |
download | gitlab-ce-8752b99f88f631d0e63c4795b89d3eec50b21274.tar.gz |
Only destroy the component's tooltip
Diffstat (limited to 'app/assets')
5 files changed, 14 insertions, 10 deletions
diff --git a/app/assets/javascripts/environments/components/environment_actions.js b/app/assets/javascripts/environments/components/environment_actions.js index c199c7abcac..1f325d66e87 100644 --- a/app/assets/javascripts/environments/components/environment_actions.js +++ b/app/assets/javascripts/environments/components/environment_actions.js @@ -35,7 +35,7 @@ export default { onClickAction(endpoint) { this.isLoading = true; - $('.has-tooltip').tooltip('destroy'); + $(this.$el.querySelector('.has-tooltip')).tooltip('destroy'); this.service.postAction(endpoint) .then(() => { diff --git a/app/assets/javascripts/environments/components/environment_rollback.js b/app/assets/javascripts/environments/components/environment_rollback.js index 7f3c4b78a51..7cbfb651525 100644 --- a/app/assets/javascripts/environments/components/environment_rollback.js +++ b/app/assets/javascripts/environments/components/environment_rollback.js @@ -36,7 +36,7 @@ export default { onClick() { this.isLoading = true; - $('.has-tooltip').tooltip('destroy'); + $(this.$el).tooltip('destroy'); this.service.postAction(this.retryUrl) .then(() => { diff --git a/app/assets/javascripts/environments/components/environment_stop.js b/app/assets/javascripts/environments/components/environment_stop.js index 949de9a9604..9e5465c1785 100644 --- a/app/assets/javascripts/environments/components/environment_stop.js +++ b/app/assets/javascripts/environments/components/environment_stop.js @@ -36,7 +36,7 @@ export default { if (confirm('Are you sure you want to stop this environment?')) { this.isLoading = true; - $('.has-tooltip').tooltip('destroy'); + $(this.$el).tooltip('destroy'); this.service.postAction(this.retryUrl) .then(() => { diff --git a/app/assets/javascripts/vue_pipelines_index/components/async_button.vue b/app/assets/javascripts/vue_pipelines_index/components/async_button.vue index fb1f8a9e2a3..bc42586a770 100644 --- a/app/assets/javascripts/vue_pipelines_index/components/async_button.vue +++ b/app/assets/javascripts/vue_pipelines_index/components/async_button.vue @@ -54,7 +54,7 @@ export default { }, methods: { - onClick() { + onClick(e) { if (this.confirmActionMessage && confirm(this.confirmActionMessage)) { this.makeRequest(); } else if (!this.confirmActionMessage) { @@ -65,7 +65,7 @@ export default { makeRequest() { this.isLoading = true; - $('.has-tooltip').tooltip('destroy'); + $(this.$el).tooltip('destroy'); this.service.postAction(this.endpoint) .then(() => { @@ -90,9 +90,13 @@ export default { :aria-label="title" data-container="body" data-placement="top" - :disabled="isLoading" - > - <i :class="iconClass" aria-hidden="true"></i> - <i class="fa fa-spinner fa-spin" aria-hidden="true" v-if="isLoading"></i> + :disabled="isLoading"> + <i + :class="iconClass" + aria-hidden="true" /> + <i + class="fa fa-spinner fa-spin" + aria-hidden="true" + v-if="isLoading" /> </button> </template> diff --git a/app/assets/javascripts/vue_pipelines_index/components/pipelines_actions.js b/app/assets/javascripts/vue_pipelines_index/components/pipelines_actions.js index 74396d8249b..535064f610e 100644 --- a/app/assets/javascripts/vue_pipelines_index/components/pipelines_actions.js +++ b/app/assets/javascripts/vue_pipelines_index/components/pipelines_actions.js @@ -28,7 +28,7 @@ export default { onClickAction(endpoint) { this.isLoading = true; - $('.has-tooltip').tooltip('destroy'); + $(this.$el.querySelector('.has-tooltip')).tooltip('destroy'); this.service.postAction(endpoint) .then(() => { |