Commit f8705d4f authored by Clement Ho's avatar Clement Ho

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

parent cefeeaea
......@@ -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) {
......
......@@ -214,7 +214,7 @@ export default () => {
if (this.disabled) {
$tooltip.tooltip();
} else {
$tooltip.tooltip('destroy');
$tooltip.tooltip('dispose');
}
});
},
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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();
});
......
......@@ -10,6 +10,6 @@ export default {
},
unbind(el) {
$(el).tooltip('destroy');
$(el).tooltip('dispose');
},
};
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