2022-03-02 08:16:31 +05:30
|
|
|
import Vue from 'vue';
|
2022-11-25 23:54:43 +05:30
|
|
|
import StatusDropdown from './components/status_dropdown.vue';
|
|
|
|
import SubscriptionsDropdown from './components/subscriptions_dropdown.vue';
|
2022-03-02 08:16:31 +05:30
|
|
|
import issuableBulkUpdateActions from './issuable_bulk_update_actions';
|
|
|
|
import IssuableBulkUpdateSidebar from './issuable_bulk_update_sidebar';
|
|
|
|
|
|
|
|
export function initBulkUpdateSidebar(prefixId) {
|
|
|
|
const el = document.querySelector('.issues-bulk-update');
|
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
issuableBulkUpdateActions.init({ prefixId });
|
|
|
|
new IssuableBulkUpdateSidebar(); // eslint-disable-line no-new
|
|
|
|
}
|
|
|
|
|
2022-11-25 23:54:43 +05:30
|
|
|
export function initStatusDropdown() {
|
|
|
|
const el = document.querySelector('.js-status-dropdown');
|
2022-03-02 08:16:31 +05:30
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2022-11-25 23:54:43 +05:30
|
|
|
name: 'StatusDropdownRoot',
|
|
|
|
render: (createElement) => createElement(StatusDropdown),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function initSubscriptionsDropdown() {
|
|
|
|
const el = document.querySelector('.js-subscriptions-dropdown');
|
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
|
|
|
name: 'SubscriptionsDropdownRoot',
|
|
|
|
render: (createElement) => createElement(SubscriptionsDropdown),
|
2022-03-02 08:16:31 +05:30
|
|
|
});
|
|
|
|
}
|