Replace tooltip('destroy') with tooltip('dispose')

This commit is contained in:
Clement Ho 2018-04-19 14:16:18 -05:00
parent cefeeaea33
commit f8705d4fa1
6 changed files with 8 additions and 8 deletions

View File

@ -345,7 +345,7 @@ class AwardsHandler {
counter.text(counterNumber - 1);
this.removeYouFromUserList($emojiButton);
} else if (emoji === 'thumbsup' || emoji === 'thumbsdown') {
$emojiButton.tooltip('destroy');
$emojiButton.tooltip('dispose');
counter.text('0');
this.removeYouFromUserList($emojiButton);
if ($emojiButton.parents('.note').length) {
@ -358,7 +358,7 @@ class AwardsHandler {
}
removeEmoji($emojiButton) {
$emojiButton.tooltip('destroy');
$emojiButton.tooltip('dispose');
$emojiButton.remove();
const $votesBlock = this.getVotesBlock();
if ($votesBlock.find('.js-emoji-btn').length === 0) {

View File

@ -214,7 +214,7 @@ export default () => {
if (this.disabled) {
$tooltip.tooltip();
} else {
$tooltip.tooltip('destroy');
$tooltip.tooltip('dispose');
}
});
},

View File

@ -43,7 +43,7 @@
if (confirm('Are you sure you want to stop this environment?')) {
this.isLoading = true;
$(this.$el).tooltip('destroy');
$(this.$el).tooltip('dispose');
eventHub.$emit('postAction', this.stopUrl);
}

View File

@ -35,7 +35,7 @@ export default class LabelManager {
const $label = $(`#${$btn.data('domId')}`);
const action = $btn.parents('.js-prioritized-labels').length ? 'remove' : 'add';
const $tooltip = $(`#${$btn.find('.has-tooltip:visible').attr('aria-describedby')}`);
$tooltip.tooltip('destroy');
$tooltip.tooltip('dispose');
_this.toggleLabelPriority($label, action);
_this.toggleEmptyState($label, $btn, action);
}

View File

@ -46,7 +46,7 @@ document.addEventListener('beforeunload', () => {
// Unbind scroll events
$(document).off('scroll');
// Close any open tooltips
$('.has-tooltip, [data-toggle="tooltip"]').tooltip('destroy');
$('.has-tooltip, [data-toggle="tooltip"]').tooltip('dispose');
// Close any open popover
$('[data-toggle="popover"]').popover('destroy');
});
@ -108,7 +108,7 @@ document.addEventListener('DOMContentLoaded', () => {
addSelectOnFocusBehaviour('.js-select-on-focus');
$('.remove-row').on('ajax:success', function removeRowAjaxSuccessCallback() {
$(this).tooltip('destroy')
$(this).tooltip('dispose')
.closest('li')
.fadeOut();
});

View File

@ -10,6 +10,6 @@ export default {
},
unbind(el) {
$(el).tooltip('destroy');
$(el).tooltip('dispose');
},
};