2019-07-09 07:46:16 -04:00
|
|
|
import issuableBulkUpdateActions from './issuable_bulk_update_actions';
|
2021-02-14 13:09:20 -05:00
|
|
|
import IssuableBulkUpdateSidebar from './issuable_bulk_update_sidebar';
|
2019-07-09 07:46:16 -04:00
|
|
|
|
|
|
|
export default {
|
|
|
|
bulkUpdateSidebar: null,
|
|
|
|
|
|
|
|
init(prefixId) {
|
|
|
|
const bulkUpdateEl = document.querySelector('.issues-bulk-update');
|
|
|
|
const alreadyInitialized = Boolean(this.bulkUpdateSidebar);
|
|
|
|
|
|
|
|
if (bulkUpdateEl && !alreadyInitialized) {
|
|
|
|
issuableBulkUpdateActions.init({ prefixId });
|
|
|
|
|
|
|
|
this.bulkUpdateSidebar = new IssuableBulkUpdateSidebar();
|
|
|
|
}
|
|
|
|
|
|
|
|
return this.bulkUpdateSidebar;
|
|
|
|
},
|
|
|
|
};
|