2018-03-09 20:18:59 +00:00
|
|
|
import $ from 'jquery';
|
2020-08-26 00:10:31 +00:00
|
|
|
import { GitLabDropdown } from './gl_dropdown';
|
2017-03-11 07:30:44 +00:00
|
|
|
|
2020-08-24 18:10:19 +00:00
|
|
|
export default function initDeprecatedJQueryDropdown($el, opts) {
|
2020-01-29 12:09:08 +00:00
|
|
|
// eslint-disable-next-line func-names
|
2020-08-24 18:10:19 +00:00
|
|
|
return $el.each(function() {
|
|
|
|
if (!$.data(this, 'deprecatedJQueryDropdown')) {
|
|
|
|
$.data(this, 'deprecatedJQueryDropdown', new GitLabDropdown(this, opts));
|
2017-03-11 07:30:44 +00:00
|
|
|
}
|
|
|
|
});
|
2020-08-24 18:10:19 +00:00
|
|
|
}
|