gitlab-org--gitlab-foss/app/assets/javascripts/init_issuable_sidebar.js

27 lines
748 B
JavaScript
Raw Normal View History

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