Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e107ebc3
Commit
e107ebc3
authored
Feb 21, 2019
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor PersistentUserCallout instantiations
Uses a new factory method to DRY instantiation.
parent
f100c9ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
9 deletions
+5
-9
app/assets/javascripts/clusters/clusters_bundle.js
app/assets/javascripts/clusters/clusters_bundle.js
+1
-2
app/assets/javascripts/pages/groups/clusters/index/index.js
app/assets/javascripts/pages/groups/clusters/index/index.js
+1
-2
app/assets/javascripts/pages/groups/index.js
app/assets/javascripts/pages/groups/index.js
+1
-2
app/assets/javascripts/pages/projects/clusters/index/index.js
...assets/javascripts/pages/projects/clusters/index/index.js
+1
-2
app/assets/javascripts/pages/projects/index.js
app/assets/javascripts/pages/projects/index.js
+1
-1
No files found.
app/assets/javascripts/clusters/clusters_bundle.js
View file @
e107ebc3
...
...
@@ -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
()
{
...
...
app/assets/javascripts/pages/groups/clusters/index/index.js
View file @
e107ebc3
...
...
@@ -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
);
});
app/assets/javascripts/pages/groups/index.js
View file @
e107ebc3
...
...
@@ -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
'
,
()
=>
{
...
...
app/assets/javascripts/pages/projects/clusters/index/index.js
View file @
e107ebc3
...
...
@@ -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
);
});
app/assets/javascripts/pages/projects/index.js
View file @
e107ebc3
...
...
@@ -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
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment