Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « deprecated_jquery_dropdown « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 38236707e06e3d734964a765502458143a82ddf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import $ from 'jquery';
import { GitLabDropdown } from './gl_dropdown';

export default function initDeprecatedJQueryDropdown($el, opts) {
  // eslint-disable-next-line func-names
  return $el.each(function () {
    if (!$.data(this, 'deprecatedJQueryDropdown')) {
      const instance = new GitLabDropdown(this, opts);

      $.data(this, 'deprecatedJQueryDropdown', instance);
      this.GitLabDropdownInstance = instance;
    }
  });
}