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'; ...@@ -2,8 +2,6 @@ import UsersSelect from '~/users_select';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation'; import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import initBoards from '~/boards'; import initBoards from '~/boards';
document.addEventListener('DOMContentLoaded', () => { new UsersSelect(); // eslint-disable-line no-new
new UsersSelect(); // eslint-disable-line no-new new ShortcutsNavigation(); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new initBoards();
initBoards();
});
import initForm from '../../../../shared/milestones/form'; import initForm from '../../../../shared/milestones/form';
document.addEventListener('DOMContentLoaded', () => initForm(false)); initForm(false);
import initForm from '../../../../shared/milestones/form'; import initForm from '../../../../shared/milestones/form';
document.addEventListener('DOMContentLoaded', () => initForm(false)); initForm(false);
...@@ -4,13 +4,11 @@ import Group from '~/group'; ...@@ -4,13 +4,11 @@ import Group from '~/group';
import GroupPathValidator from './group_path_validator'; import GroupPathValidator from './group_path_validator';
import initFilePickers from '~/file_pickers'; import initFilePickers from '~/file_pickers';
document.addEventListener('DOMContentLoaded', () => { const parentId = $('#group_parent_id');
const parentId = $('#group_parent_id'); if (!parentId.val()) {
if (!parentId.val()) { new GroupPathValidator(); // eslint-disable-line no-new
new GroupPathValidator(); // eslint-disable-line no-new }
} BindInOut.initAll();
BindInOut.initAll(); initFilePickers();
initFilePickers();
return new Group(); new Group(); // eslint-disable-line no-new
});
import initPackageList from '~/packages/list/packages_list_app_bundle'; import initPackageList from '~/packages/list/packages_list_app_bundle';
document.addEventListener('DOMContentLoaded', () => { if (document.getElementById('js-vue-packages-list')) {
if (document.getElementById('js-vue-packages-list')) { initPackageList();
initPackageList(); }
}
});
...@@ -2,7 +2,5 @@ import '~/pages/groups/milestones/show/index'; ...@@ -2,7 +2,5 @@ import '~/pages/groups/milestones/show/index';
import initBurndownChart from 'ee/burndown_chart'; import initBurndownChart from 'ee/burndown_chart';
import UserCallout from '~/user_callout'; import UserCallout from '~/user_callout';
document.addEventListener('DOMContentLoaded', () => { new UserCallout(); // eslint-disable-line no-new
new UserCallout(); // eslint-disable-line no-new initBurndownChart();
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