2017-07-25 15:27:51 +00:00
|
|
|
/* eslint-disable no-new */
|
2017-12-28 20:07:05 +00:00
|
|
|
|
2021-02-01 15:08:56 +00:00
|
|
|
import { mountSidebarLabels, getSidebarOptions } from '~/sidebar/mount_sidebar';
|
2021-02-14 18:09:20 +00:00
|
|
|
import DueDateSelectors from './due_date_select';
|
2017-10-26 20:14:18 +00:00
|
|
|
import IssuableContext from './issuable_context';
|
2021-02-14 18:09:20 +00:00
|
|
|
import LabelsSelect from './labels_select';
|
|
|
|
import MilestoneSelect from './milestone_select';
|
2017-12-15 12:57:08 +00:00
|
|
|
import Sidebar from './right_sidebar';
|
2017-10-18 11:31:01 +00:00
|
|
|
|
2017-07-25 15:27:51 +00:00
|
|
|
export default () => {
|
2020-09-22 15:09:37 +00:00
|
|
|
const sidebarOptEl = document.querySelector('.js-sidebar-options');
|
|
|
|
|
|
|
|
if (!sidebarOptEl) return;
|
|
|
|
|
|
|
|
const sidebarOptions = getSidebarOptions(sidebarOptEl);
|
2017-07-25 15:46:15 +00:00
|
|
|
|
2017-07-25 15:27:51 +00:00
|
|
|
new MilestoneSelect({
|
2017-07-25 15:46:15 +00:00
|
|
|
full_path: sidebarOptions.fullPath,
|
2017-07-25 15:27:51 +00:00
|
|
|
});
|
|
|
|
new LabelsSelect();
|
2017-07-25 15:46:15 +00:00
|
|
|
new IssuableContext(sidebarOptions.currentUser);
|
2017-10-18 11:31:01 +00:00
|
|
|
new DueDateSelectors();
|
2017-12-15 12:57:08 +00:00
|
|
|
Sidebar.initialize();
|
2020-09-17 15:09:24 +00:00
|
|
|
|
|
|
|
mountSidebarLabels();
|
2017-07-25 15:27:51 +00:00
|
|
|
};
|