debian-mirror-gitlab/app/assets/javascripts/deprecated_jquery_dropdown/index.js

12 lines
359 B
JavaScript
Raw Normal View History

2020-11-24 15:15:51 +05:30
import $ from 'jquery';
import { GitLabDropdown } from './gl_dropdown';
export default function initDeprecatedJQueryDropdown($el, opts) {
// eslint-disable-next-line func-names
2021-03-08 18:12:59 +05:30
return $el.each(function () {
2020-11-24 15:15:51 +05:30
if (!$.data(this, 'deprecatedJQueryDropdown')) {
$.data(this, 'deprecatedJQueryDropdown', new GitLabDropdown(this, opts));
}
});
}