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