BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
80d21e64
Unverified
Commit
80d21e64
authored
Nov 29, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix show page toggle
parent
50d9cc6d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
clusters_bundle.js
app/assets/javascripts/clusters/clusters_bundle.js
+2
-2
show.html.haml
app/views/projects/clusters/show.html.haml
+1
-1
clusters_bundle_spec.js
spec/javascripts/clusters/clusters_bundle_spec.js
+1
-1
No files found.
app/assets/javascripts/clusters/clusters_bundle.js
View file @
80d21e64
...
...
@@ -145,8 +145,8 @@ export default class Clusters {
}
toggle
()
{
this
.
toggleButton
.
classList
.
toggle
(
'checked'
);
this
.
toggleInput
.
setAttribute
(
'value'
,
this
.
toggleButton
.
classList
.
contains
(
'checked'
).
toString
());
this
.
toggleButton
.
classList
.
toggle
(
'
is-
checked'
);
this
.
toggleInput
.
setAttribute
(
'value'
,
this
.
toggleButton
.
classList
.
contains
(
'
is-
checked'
).
toString
());
}
hideAll
()
{
...
...
app/views/projects/clusters/show.html.haml
View file @
80d21e64
...
...
@@ -48,7 +48,7 @@
=
field
.
hidden_field
:enabled
,
{
class:
'js-toggle-input'
}
%button
{
type:
'button'
,
class:
"js-toggle-cluster project-feature-toggle #{'
checked' unless !@cluster.enabled?} #{'
disabled' unless can?(current_user, :update_cluster, @cluster)}"
,
class:
"js-toggle-cluster project-feature-toggle #{'
is-checked' unless !@cluster.enabled?} #{'is-
disabled' unless can?(current_user, :update_cluster, @cluster)}"
,
'aria-label'
:
s_
(
'ClusterIntegration|Toggle Cluster'
),
disabled:
!
can?
(
current_user
,
:update_cluster
,
@cluster
),
data:
{
'enabled-text'
:
'Enabled'
,
'disabled-text'
:
'Disabled'
}
}
...
...
spec/javascripts/clusters/clusters_bundle_spec.js
View file @
80d21e64
...
...
@@ -28,7 +28,7 @@ describe('Clusters', () => {
expect
(
cluster
.
toggleButton
.
classList
,
).
not
.
toContain
(
'checked'
);
).
not
.
toContain
(
'
is-
checked'
);
expect
(
cluster
.
toggleInput
.
getAttribute
(
'value'
),
...
...
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