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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
af261c1b
Commit
af261c1b
authored
Jun 06, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attach a single event handler to detect radio button changes instead of one per input
parent
ff582303
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
...s/javascripts/pages/projects/settings/ci_cd/show/index.js
+8
-8
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
+1
-1
No files found.
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
View file @
af261c1b
...
...
@@ -24,15 +24,15 @@ document.addEventListener('DOMContentLoaded', () => {
});
// hide extra auto devops settings based on data-attributes
const
autoDevOpsSettings
=
document
.
querySelector
All
(
'
input[data-hide-extra-settings]
'
);
const
autoDevOpsSettings
=
document
.
querySelector
(
'
.js-auto-devops-settings
'
);
const
autoDevOpsExtraSettings
=
document
.
querySelector
(
'
.js-extra-settings
'
);
autoDevOpsSettings
.
forEach
(
inpu
t
=>
{
input
.
addEventListener
(
'
click
'
,
()
=>
autoDevOpsExtraSettings
.
classList
.
toggle
(
'
hidden
'
,
input
.
dataset
.
hideExtraSettings
===
'
true
'
,
),
);
autoDevOpsSettings
.
addEventListener
(
'
click
'
,
even
t
=>
{
const
targetData
=
event
.
target
&&
event
.
target
.
dataset
;
if
(
targetData
.
hideExtraSettings
===
'
true
'
)
{
autoDevOpsExtraSettings
.
classList
.
add
(
'
hidden
'
);
}
else
if
(
targetData
.
hideExtraSettings
===
'
false
'
)
{
autoDevOpsExtraSettings
.
classList
.
remove
(
'
hidden
'
);
}
});
});
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
View file @
af261c1b
...
...
@@ -2,7 +2,7 @@
.col-lg-12
=
form_for
@project
,
url:
project_settings_ci_cd_path
(
@project
)
do
|
f
|
=
form_errors
(
@project
)
%fieldset
.builds-feature.auto-devops-settings
%fieldset
.builds-feature.
js-
auto-devops-settings
.form-group
-
message
=
auto_devops_warning_message
(
@project
)
-
ci_file_formatted
=
'<code>.gitlab-ci.yml</code>'
.
html_safe
...
...
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