Commit 4f331405 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'remove-DOMContentLoaded-milestone-show-Pages' into 'master'

Remove DOMContentLoaded Eventlisteners

See merge request gitlab-org/gitlab!47790
parents cc322367 5a07d564
......@@ -2,8 +2,6 @@ import UsersSelect from '~/users_select';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import initBoards from '~/boards';
document.addEventListener('DOMContentLoaded', () => {
new UsersSelect(); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new
initBoards();
});
new UsersSelect(); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new
initBoards();
import initForm from '../../../../shared/milestones/form';
document.addEventListener('DOMContentLoaded', () => initForm(false));
initForm(false);
import initForm from '../../../../shared/milestones/form';
document.addEventListener('DOMContentLoaded', () => initForm(false));
initForm(false);
......@@ -4,13 +4,11 @@ import Group from '~/group';
import GroupPathValidator from './group_path_validator';
import initFilePickers from '~/file_pickers';
document.addEventListener('DOMContentLoaded', () => {
const parentId = $('#group_parent_id');
if (!parentId.val()) {
new GroupPathValidator(); // eslint-disable-line no-new
}
BindInOut.initAll();
initFilePickers();
const parentId = $('#group_parent_id');
if (!parentId.val()) {
new GroupPathValidator(); // eslint-disable-line no-new
}
BindInOut.initAll();
initFilePickers();
return new Group();
});
new Group(); // eslint-disable-line no-new
import initPackageList from '~/packages/list/packages_list_app_bundle';
document.addEventListener('DOMContentLoaded', () => {
if (document.getElementById('js-vue-packages-list')) {
initPackageList();
}
});
if (document.getElementById('js-vue-packages-list')) {
initPackageList();
}
......@@ -2,7 +2,5 @@ import '~/pages/groups/milestones/show/index';
import initBurndownChart from 'ee/burndown_chart';
import UserCallout from '~/user_callout';
document.addEventListener('DOMContentLoaded', () => {
new UserCallout(); // eslint-disable-line no-new
initBurndownChart();
});
new UserCallout(); // eslint-disable-line no-new
initBurndownChart();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment