Commit 13a73325 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

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

Remove DOMContentLoaded Eventlisteners

See merge request gitlab-org/gitlab!47781
parents 49092058 63338f0f
import initCycleAnalyticsApp from 'ee/analytics/cycle_analytics/index'; import initCycleAnalyticsApp from 'ee/analytics/cycle_analytics/index';
document.addEventListener('DOMContentLoaded', initCycleAnalyticsApp); initCycleAnalyticsApp();
...@@ -2,19 +2,16 @@ import Vue from 'vue'; ...@@ -2,19 +2,16 @@ import Vue from 'vue';
import EnvironmentDashboardComponent from 'ee/environments_dashboard/components/dashboard/dashboard.vue'; import EnvironmentDashboardComponent from 'ee/environments_dashboard/components/dashboard/dashboard.vue';
import createStore from 'ee/vue_shared/dashboards/store'; import createStore from 'ee/vue_shared/dashboards/store';
document.addEventListener( // eslint-disable-next-line no-new
'DOMContentLoaded', new Vue({
() => el: '#js-environments',
new Vue({ store: createStore(),
el: '#js-environments', components: {
store: createStore(), EnvironmentDashboardComponent,
components: { },
EnvironmentDashboardComponent, render(createElement) {
}, return createElement(EnvironmentDashboardComponent, {
render(createElement) { props: this.$el.dataset,
return createElement(EnvironmentDashboardComponent, { });
props: this.$el.dataset, },
}); });
},
}),
);
...@@ -2,24 +2,21 @@ import Vue from 'vue'; ...@@ -2,24 +2,21 @@ import Vue from 'vue';
import createStore from 'ee/vue_shared/dashboards/store'; import createStore from 'ee/vue_shared/dashboards/store';
import DashboardComponent from 'ee/operations/components/dashboard/dashboard.vue'; import DashboardComponent from 'ee/operations/components/dashboard/dashboard.vue';
document.addEventListener( // eslint-disable-next-line no-new
'DOMContentLoaded', new Vue({
() => el: '#js-operations',
new Vue({ store: createStore(),
el: '#js-operations', components: {
store: createStore(), DashboardComponent,
components: { },
DashboardComponent, render(createElement) {
return createElement(DashboardComponent, {
props: {
listPath: this.$el.dataset.listPath,
addPath: this.$el.dataset.addPath,
emptyDashboardSvgPath: this.$el.dataset.emptyDashboardSvgPath,
emptyDashboardHelpPath: this.$el.dataset.emptyDashboardHelpPath,
}, },
render(createElement) { });
return createElement(DashboardComponent, { },
props: { });
listPath: this.$el.dataset.listPath,
addPath: this.$el.dataset.addPath,
emptyDashboardSvgPath: this.$el.dataset.emptyDashboardSvgPath,
emptyDashboardHelpPath: this.$el.dataset.emptyDashboardHelpPath,
},
});
},
}),
);
import '~/pages/search/show/index'; import '~/pages/search/show/index';
import UserCallout from '~/user_callout'; import UserCallout from '~/user_callout';
document.addEventListener('DOMContentLoaded', () => new UserCallout()); // eslint-disable-next-line no-new
new UserCallout();
...@@ -5,9 +5,7 @@ import GroupPathValidator from '~/pages/groups/new/group_path_validator'; ...@@ -5,9 +5,7 @@ import GroupPathValidator from '~/pages/groups/new/group_path_validator';
import BindInOut from '~/behaviors/bind_in_out'; import BindInOut from '~/behaviors/bind_in_out';
import Group from '~/group'; import Group from '~/group';
document.addEventListener('DOMContentLoaded', () => { mountProgressBar();
mountProgressBar(); new GroupPathValidator();
new GroupPathValidator(); BindInOut.initAll();
BindInOut.initAll(); new Group();
new Group();
});
import mountSubscriptionsApplication from 'ee/subscriptions/new'; import mountSubscriptionsApplication from 'ee/subscriptions/new';
document.addEventListener('DOMContentLoaded', () => mountSubscriptionsApplication()); mountSubscriptionsApplication();
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