Commit a109d6ad authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch...

Merge branch '249781-replace-bstooltip-with-gltooltip-in-app-assets-javascripts-breadcrumb-js' into 'master'

Replace tooltip api calls with facade calls in breadcrumb.js

See merge request gitlab-org/gitlab!45026
parents 6e8ab17b f84b4794
import $ from 'jquery'; import $ from 'jquery';
import { hide } from '~/tooltips';
export const addTooltipToEl = el => { export const addTooltipToEl = el => {
const textEl = el.querySelector('.js-breadcrumb-item-text'); const textEl = el.querySelector('.js-breadcrumb-item-text');
...@@ -23,9 +24,11 @@ export default () => { ...@@ -23,9 +24,11 @@ export default () => {
topLevelLinks.forEach(el => addTooltipToEl(el)); topLevelLinks.forEach(el => addTooltipToEl(el));
$expander.closest('.dropdown').on('show.bs.dropdown hide.bs.dropdown', e => { $expander.closest('.dropdown').on('show.bs.dropdown hide.bs.dropdown', e => {
$('.js-breadcrumbs-collapsed-expander', e.currentTarget) const $el = $('.js-breadcrumbs-collapsed-expander', e.currentTarget);
.toggleClass('open')
.tooltip('hide'); $el.toggleClass('open');
hide($el);
}); });
} }
}; };
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