debian-mirror-gitlab/app/assets/javascripts/init_issuable_sidebar.js

27 lines
748 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
/* eslint-disable no-new */
2018-03-17 18:26:18 +05:30
import MilestoneSelect from './milestone_select';
import LabelsSelect from './labels_select';
import IssuableContext from './issuable_context';
import Sidebar from './right_sidebar';
import DueDateSelectors from './due_date_select';
2021-01-03 14:25:43 +05:30
import { mountSidebarLabels, getSidebarOptions } from '~/sidebar/mount_sidebar';
2017-09-10 17:25:29 +05:30
export default () => {
2021-01-03 14:25:43 +05:30
const sidebarOptEl = document.querySelector('.js-sidebar-options');
if (!sidebarOptEl) return;
const sidebarOptions = getSidebarOptions(sidebarOptEl);
2017-09-10 17:25:29 +05:30
new MilestoneSelect({
full_path: sidebarOptions.fullPath,
});
new LabelsSelect();
new IssuableContext(sidebarOptions.currentUser);
2018-03-17 18:26:18 +05:30
new DueDateSelectors();
Sidebar.initialize();
2020-11-24 15:15:51 +05:30
mountSidebarLabels();
2017-09-10 17:25:29 +05:30
};