Commit 82054e57 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'remove-DOMContentLoaded-integration-Pages' into 'master'

Remove DOMContentLoaded Eventlistener

See merge request gitlab-org/gitlab!47665
parents 4adc476b 505c04c7
import CiTemplate from './ci_template'; import CiTemplate from './ci_template';
// eslint-disable-next-line no-new
document.addEventListener('DOMContentLoaded', () => new CiTemplate()); new CiTemplate();
...@@ -38,13 +38,12 @@ const getDropdownConfig = (placeholder, apiPath, textProp) => ({ ...@@ -38,13 +38,12 @@ const getDropdownConfig = (placeholder, apiPath, textProp) => ({
}, },
}); });
document.addEventListener('DOMContentLoaded', () => { groupsSelect();
groupsSelect();
// ElasticSearch // ElasticSearch
const $container = $('#js-elasticsearch-settings'); const $container = $('#js-elasticsearch-settings');
$container $container
.find('.js-limit-checkbox') .find('.js-limit-checkbox')
.on('change', e => .on('change', e =>
onLimitCheckboxChange( onLimitCheckboxChange(
...@@ -54,7 +53,7 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -54,7 +53,7 @@ document.addEventListener('DOMContentLoaded', () => {
), ),
); );
$container $container
.find('.js-elasticsearch-namespaces') .find('.js-elasticsearch-namespaces')
.select2( .select2(
getDropdownConfig( getDropdownConfig(
...@@ -64,7 +63,7 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -64,7 +63,7 @@ document.addEventListener('DOMContentLoaded', () => {
), ),
); );
$container $container
.find('.js-elasticsearch-projects') .find('.js-elasticsearch-projects')
.select2( .select2(
getDropdownConfig( getDropdownConfig(
...@@ -73,4 +72,3 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -73,4 +72,3 @@ document.addEventListener('DOMContentLoaded', () => {
'name_with_namespace', 'name_with_namespace',
), ),
); );
});
...@@ -36,14 +36,13 @@ const getDropdownConfig = (placeholder, url) => ({ ...@@ -36,14 +36,13 @@ const getDropdownConfig = (placeholder, url) => ({
}, },
}); });
document.addEventListener('DOMContentLoaded', () => { const callout = document.querySelector('.js-admin-integrations-moved');
const callout = document.querySelector('.js-admin-integrations-moved'); PersistentUserCallout.factory(callout);
PersistentUserCallout.factory(callout);
// ElasticSearch // ElasticSearch
const $container = $('#js-elasticsearch-settings'); const $container = $('#js-elasticsearch-settings');
$container $container
.find('.js-limit-checkbox') .find('.js-limit-checkbox')
.on('change', e => .on('change', e =>
onLimitCheckboxChange( onLimitCheckboxChange(
...@@ -53,7 +52,7 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -53,7 +52,7 @@ document.addEventListener('DOMContentLoaded', () => {
), ),
); );
$container $container
.find('.js-elasticsearch-namespaces') .find('.js-elasticsearch-namespaces')
.select2( .select2(
getDropdownConfig( getDropdownConfig(
...@@ -62,7 +61,7 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -62,7 +61,7 @@ document.addEventListener('DOMContentLoaded', () => {
), ),
); );
$container $container
.find('.js-elasticsearch-projects') .find('.js-elasticsearch-projects')
.select2( .select2(
getDropdownConfig( getDropdownConfig(
...@@ -70,4 +69,3 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -70,4 +69,3 @@ document.addEventListener('DOMContentLoaded', () => {
'/-/autocomplete/project_routes.json', '/-/autocomplete/project_routes.json',
), ),
); );
});
import AdminEmailSelect from './admin_email_select'; import AdminEmailSelect from './admin_email_select';
document.addEventListener('DOMContentLoaded', () => { AdminEmailSelect();
AdminEmailSelect();
});
import initGeoSettingsForm from 'ee/geo_settings'; import initGeoSettingsForm from 'ee/geo_settings';
document.addEventListener('DOMContentLoaded', initGeoSettingsForm); initGeoSettingsForm();
import { initEpicForm } from 'ee/epic/new_epic_bundle'; import { initEpicForm } from 'ee/epic/new_epic_bundle';
document.addEventListener('DOMContentLoaded', () => { initEpicForm();
initEpicForm();
});
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