提交 37027613 编写于 作者: T Tim Zallmann

Merge branch 'ce-billings-gold-trial-callout-fe-persistent-callout' into 'master'

CE FE Refactor PersistentUserCallout instantiation

See merge request gitlab-org/gitlab-ce!25484
......@@ -119,8 +119,7 @@ export default class Clusters {
static initDismissableCallout() {
const callout = document.querySelector('.js-cluster-security-warning');
if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
PersistentUserCallout.factory(callout);
}
addListeners() {
......
......@@ -2,6 +2,5 @@ import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', () => {
const callout = document.querySelector('.gcp-signup-offer');
if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
PersistentUserCallout.factory(callout);
});
......@@ -3,8 +3,7 @@ import initGkeDropdowns from '~/projects/gke_cluster_dropdowns';
function initGcpSignupCallout() {
const callout = document.querySelector('.gcp-signup-offer');
if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
PersistentUserCallout.factory(callout);
}
document.addEventListener('DOMContentLoaded', () => {
......
......@@ -2,6 +2,5 @@ import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', () => {
const callout = document.querySelector('.gcp-signup-offer');
if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
PersistentUserCallout.factory(callout);
});
......@@ -13,7 +13,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (newClusterViews.indexOf(page) > -1) {
const callout = document.querySelector('.gcp-signup-offer');
if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
PersistentUserCallout.factory(callout);
initGkeDropdowns();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册