Commit 8752b99f authored by Filipa Lacerda's avatar Filipa Lacerda

Only destroy the component's tooltip

parent 4038d50d
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
onClickAction(endpoint) { onClickAction(endpoint) {
this.isLoading = true; this.isLoading = true;
$('.has-tooltip').tooltip('destroy'); $(this.$el.querySelector('.has-tooltip')).tooltip('destroy');
this.service.postAction(endpoint) this.service.postAction(endpoint)
.then(() => { .then(() => {
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
onClick() { onClick() {
this.isLoading = true; this.isLoading = true;
$('.has-tooltip').tooltip('destroy'); $(this.$el).tooltip('destroy');
this.service.postAction(this.retryUrl) this.service.postAction(this.retryUrl)
.then(() => { .then(() => {
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
if (confirm('Are you sure you want to stop this environment?')) { if (confirm('Are you sure you want to stop this environment?')) {
this.isLoading = true; this.isLoading = true;
$('.has-tooltip').tooltip('destroy'); $(this.$el).tooltip('destroy');
this.service.postAction(this.retryUrl) this.service.postAction(this.retryUrl)
.then(() => { .then(() => {
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
}, },
methods: { methods: {
onClick() { onClick(e) {
if (this.confirmActionMessage && confirm(this.confirmActionMessage)) { if (this.confirmActionMessage && confirm(this.confirmActionMessage)) {
this.makeRequest(); this.makeRequest();
} else if (!this.confirmActionMessage) { } else if (!this.confirmActionMessage) {
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
makeRequest() { makeRequest() {
this.isLoading = true; this.isLoading = true;
$('.has-tooltip').tooltip('destroy'); $(this.$el).tooltip('destroy');
this.service.postAction(this.endpoint) this.service.postAction(this.endpoint)
.then(() => { .then(() => {
...@@ -90,9 +90,13 @@ export default { ...@@ -90,9 +90,13 @@ export default {
:aria-label="title" :aria-label="title"
data-container="body" data-container="body"
data-placement="top" data-placement="top"
:disabled="isLoading" :disabled="isLoading">
> <i
<i :class="iconClass" aria-hidden="true"></i> :class="iconClass"
<i class="fa fa-spinner fa-spin" aria-hidden="true" v-if="isLoading"></i> aria-hidden="true" />
<i
class="fa fa-spinner fa-spin"
aria-hidden="true"
v-if="isLoading" />
</button> </button>
</template> </template>
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
onClickAction(endpoint) { onClickAction(endpoint) {
this.isLoading = true; this.isLoading = true;
$('.has-tooltip').tooltip('destroy'); $(this.$el.querySelector('.has-tooltip')).tooltip('destroy');
this.service.postAction(endpoint) this.service.postAction(endpoint)
.then(() => { .then(() => {
......
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