Commit 964bb72e authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'remove-Event-listener-for-merge-request-pages' into 'master'

Remove DOMContentLoaded Eventlistener

See merge request gitlab-org/gitlab!47631
parents 568ae87f 4dca0710
import initDependenciesApp from 'ee/dependencies';
document.addEventListener('DOMContentLoaded', initDependenciesApp);
initDependenciesApp();
import initSidebarBundle from 'ee/sidebar/sidebar_bundle';
import initMergeConflicts from '~/merge_conflicts/merge_conflicts_bundle';
document.addEventListener('DOMContentLoaded', () => {
initSidebarBundle();
initMergeConflicts();
});
initSidebarBundle();
initMergeConflicts();
......@@ -2,7 +2,6 @@ import '~/pages/projects/merge_requests/creations/new/index';
import UserCallout from '~/user_callout';
import initForm from '../../shared/init_form';
document.addEventListener('DOMContentLoaded', () => {
initForm();
return new UserCallout();
});
initForm();
// eslint-disable-next-line no-new
new UserCallout();
import '~/pages/projects/merge_requests/edit/index';
import initForm from '../shared/init_form';
document.addEventListener('DOMContentLoaded', initForm);
initForm();
import '~/pages/projects/show/index';
import initVueAlerts from '~/vue_alerts';
document.addEventListener('DOMContentLoaded', () => {
initVueAlerts();
});
initVueAlerts();
import $ from 'jquery';
document.addEventListener('DOMContentLoaded', () => {
const namespaceId = $('#namespace_id');
const newGroupName = $('#group_name');
const namespaceId = $('#namespace_id');
const newGroupName = $('#group_name');
namespaceId.on('change', () => {
const enableNewGroupName = namespaceId.val() === '0';
namespaceId.on('change', () => {
const enableNewGroupName = namespaceId.val() === '0';
newGroupName
.toggleClass('hidden', !enableNewGroupName)
.find('input')
.prop('required', enableNewGroupName);
});
namespaceId.trigger('change');
newGroupName
.toggleClass('hidden', !enableNewGroupName)
.find('input')
.prop('required', enableNewGroupName);
});
namespaceId.trigger('change');
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