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
2021-03-11 19:13:27 +05:30
import { mountSidebarLabels, getSidebarOptions } from '~/sidebar/mount_sidebar';
import DueDateSelectors from './due_date_select';
2018-03-17 18:26:18 +05:30
import IssuableContext from './issuable_context';
2021-03-11 19:13:27 +05:30
import LabelsSelect from './labels_select';
import MilestoneSelect from './milestone_select';
2018-03-17 18:26:18 +05:30
import Sidebar from './right_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
};