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
705d7f70
Commit
705d7f70
authored
Apr 12, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] Use toggleClass instead of toggle
parent
b8401cd0
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
17 additions
and
17 deletions
+17
-17
app/assets/javascripts/behaviors/secret_values.js
app/assets/javascripts/behaviors/secret_values.js
+2
-2
app/assets/javascripts/behaviors/toggler_behavior.js
app/assets/javascripts/behaviors/toggler_behavior.js
+1
-1
app/assets/javascripts/build_variables.js
app/assets/javascripts/build_variables.js
+1
-1
app/assets/javascripts/ci_variable_list/ajax_variable_list.js
...assets/javascripts/ci_variable_list/ajax_variable_list.js
+5
-5
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+1
-1
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+2
-2
app/assets/javascripts/pages/admin/admin.js
app/assets/javascripts/pages/admin/admin.js
+1
-1
app/assets/javascripts/pages/explore/groups/index.js
app/assets/javascripts/pages/explore/groups/index.js
+1
-1
app/assets/javascripts/pages/users/user_tabs.js
app/assets/javascripts/pages/users/user_tabs.js
+1
-1
app/assets/javascripts/project_fork.js
app/assets/javascripts/project_fork.js
+1
-1
app/helpers/icons_helper.rb
app/helpers/icons_helper.rb
+1
-1
No files found.
app/assets/javascripts/behaviors/secret_values.js
View file @
705d7f70
...
...
@@ -33,12 +33,12 @@ export default class SecretValues {
updateDom
(
isRevealed
)
{
const
values
=
this
.
container
.
querySelectorAll
(
this
.
valueSelector
);
values
.
forEach
((
value
)
=>
{
value
.
classList
.
toggle
(
'
hid
e
'
,
!
isRevealed
);
value
.
classList
.
toggle
(
'
hid
den
'
,
!
isRevealed
);
});
const
placeholders
=
this
.
container
.
querySelectorAll
(
this
.
placeholderSelector
);
placeholders
.
forEach
((
placeholder
)
=>
{
placeholder
.
classList
.
toggle
(
'
hid
e
'
,
isRevealed
);
placeholder
.
classList
.
toggle
(
'
hid
den
'
,
isRevealed
);
});
this
.
revealButton
.
textContent
=
isRevealed
?
n__
(
'
Hide value
'
,
'
Hide values
'
,
values
.
length
)
:
n__
(
'
Reveal value
'
,
'
Reveal values
'
,
values
.
length
);
...
...
app/assets/javascripts/behaviors/toggler_behavior.js
View file @
705d7f70
...
...
@@ -20,7 +20,7 @@ $(() => {
$container
.
find
(
'
.js-toggle-content
'
)
.
toggle
(
toggleState
);
.
toggle
Class
(
'
hidden
'
,
toggleState
);
}
$
(
'
body
'
).
on
(
'
click
'
,
'
.js-toggle-button
'
,
function
toggleButton
(
e
)
{
...
...
app/assets/javascripts/build_variables.js
View file @
705d7f70
...
...
@@ -4,7 +4,7 @@ export default function handleRevealVariables() {
$
(
'
.js-reveal-variables
'
)
.
off
(
'
click
'
)
.
on
(
'
click
'
,
function
click
()
{
$
(
'
.js-build-variables
'
).
toggle
(
);
$
(
'
.js-build-variables
'
).
toggle
Class
(
'
hidden
'
);
$
(
this
).
hide
();
});
}
app/assets/javascripts/ci_variable_list/ajax_variable_list.js
View file @
705d7f70
...
...
@@ -52,8 +52,8 @@ export default class AjaxVariableList {
onSaveClicked
()
{
const
loadingIcon
=
this
.
saveButton
.
querySelector
(
'
.js-secret-variables-save-loading-icon
'
);
loadingIcon
.
classList
.
toggle
(
'
hid
e
'
,
false
);
this
.
errorBox
.
classList
.
toggle
(
'
hid
e
'
,
true
);
loadingIcon
.
classList
.
toggle
(
'
hid
den
'
,
false
);
this
.
errorBox
.
classList
.
toggle
(
'
hid
den
'
,
true
);
// We use this to prevent a user from changing a key before we have a chance
// to match it up in `updateRowsWithPersistedVariables`
this
.
variableList
.
toggleEnableRow
(
false
);
...
...
@@ -70,7 +70,7 @@ export default class AjaxVariableList {
status
===
statusCodes
.
BAD_REQUEST
,
})
.
then
((
res
)
=>
{
loadingIcon
.
classList
.
toggle
(
'
hid
e
'
,
true
);
loadingIcon
.
classList
.
toggle
(
'
hid
den
'
,
true
);
this
.
variableList
.
toggleEnableRow
(
true
);
if
(
res
.
status
===
statusCodes
.
OK
&&
res
.
data
)
{
...
...
@@ -79,11 +79,11 @@ export default class AjaxVariableList {
}
else
if
(
res
.
status
===
statusCodes
.
BAD_REQUEST
)
{
// Validation failed
this
.
errorBox
.
innerHTML
=
generateErrorBoxContent
(
res
.
data
);
this
.
errorBox
.
classList
.
toggle
(
'
hid
e
'
,
false
);
this
.
errorBox
.
classList
.
toggle
(
'
hid
den
'
,
false
);
}
})
.
catch
(()
=>
{
loadingIcon
.
classList
.
toggle
(
'
hid
e
'
,
true
);
loadingIcon
.
classList
.
toggle
(
'
hid
den
'
,
true
);
this
.
variableList
.
toggleEnableRow
(
true
);
Flash
(
s__
(
'
CiVariable|Error occured while saving variables
'
));
});
...
...
app/assets/javascripts/merge_request_tabs.js
View file @
705d7f70
...
...
@@ -367,7 +367,7 @@ export default class MergeRequestTabs {
//
// status - Boolean, true to show, false to hide
toggleLoading
(
status
)
{
$
(
'
.mr-loading-status .loading
'
).
toggle
(
status
);
$
(
'
.mr-loading-status .loading
'
).
toggle
Class
(
'
hidden
'
,
status
);
}
diffViewType
()
{
...
...
app/assets/javascripts/notes.js
View file @
705d7f70
...
...
@@ -1229,8 +1229,8 @@ export default class Notes {
const
isForced
=
forceShow
===
true
||
forceShow
===
false
;
const
showNow
=
forceShow
===
true
||
(
!
isCurrentlyShown
&&
!
isForced
);
targetRow
.
toggle
(
showNow
);
notesContent
.
toggle
(
showNow
);
targetRow
.
toggle
Class
(
'
hidden
'
,
showNow
);
notesContent
.
toggle
Class
(
'
hidden
'
,
showNow
);
}
if
(
addForm
)
{
...
...
app/assets/javascripts/pages/admin/admin.js
View file @
705d7f70
...
...
@@ -25,7 +25,7 @@ export default function adminInit() {
$
(
'
body
'
).
on
(
'
click
'
,
'
.js-toggle-colors-link
'
,
(
e
)
=>
{
e
.
preventDefault
();
$
(
'
.js-toggle-colors-container
'
).
toggle
(
);
$
(
'
.js-toggle-colors-container
'
).
toggle
Class
(
'
hidden
'
);
});
$
(
'
.log-tabs a
'
).
on
(
'
click
'
,
function
logTabsClick
(
e
)
{
...
...
app/assets/javascripts/pages/explore/groups/index.js
View file @
705d7f70
...
...
@@ -12,5 +12,5 @@ document.addEventListener('DOMContentLoaded', () => {
landingElement
.
querySelector
(
'
.dismiss-button
'
),
'
explore_groups_landing_dismissed
'
,
);
exploreGroupsLanding
.
toggle
(
);
exploreGroupsLanding
.
toggle
Class
(
'
hidden
'
);
});
app/assets/javascripts/pages/users/user_tabs.js
View file @
705d7f70
...
...
@@ -181,7 +181,7 @@ export default class UserTabs {
toggleLoading
(
status
)
{
return
this
.
$parentEl
.
find
(
'
.loading-status .loading
'
)
.
toggle
(
status
);
.
toggle
Class
(
'
hidden
'
,
status
);
}
setCurrentAction
(
source
)
{
...
...
app/assets/javascripts/project_fork.js
View file @
705d7f70
...
...
@@ -4,6 +4,6 @@ export default () => {
$
(
'
.js-fork-thumbnail
'
).
on
(
'
click
'
,
function
forkThumbnailClicked
()
{
if
(
$
(
this
).
hasClass
(
'
disabled
'
))
return
false
;
return
$
(
'
.js-fork-content
'
).
toggle
(
);
return
$
(
'
.js-fork-content
'
).
toggle
Class
(
'
hidden
'
);
});
};
app/helpers/icons_helper.rb
View file @
705d7f70
...
...
@@ -56,7 +56,7 @@ module IconsHelper
def
spinner
(
text
=
nil
,
visible
=
false
)
css_class
=
'loading'
css_class
<<
' hid
e
'
unless
visible
css_class
<<
' hid
den
'
unless
visible
content_tag
:div
,
class:
css_class
do
icon
(
'spinner spin'
)
+
text
...
...
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