Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
howto-cards LEGACY VERSION
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
R3
howto-cards LEGACY VERSION
Commits
d6fdd63f
Verified
Commit
d6fdd63f
authored
3 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
logic for displaying grouped lab cards
parent
d35864e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!354
[release] Regular merge of develop
,
!347
Move lab cards external
Pipeline
#52794
passed with warnings
3 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
assets/js/box_hider.js
+17
-5
17 additions, 5 deletions
assets/js/box_hider.js
with
17 additions
and
5 deletions
assets/js/box_hider.js
+
17
−
5
View file @
d6fdd63f
...
...
@@ -23,13 +23,17 @@ window.boxHider = (function() {
function
GetSelectedBoxElement
(
id
)
{
var
allBoxesArray
=
GetAllBoxElementsArray
();
var
element
=
document
.
getElementById
(
id
);
// note: handbook and lab are actually grouped sections
if
(
id
.
startsWith
(
'
handbook
'
)
||
id
.
startsWith
(
'
lab
'
))
{
return
true
;
}
else
{
var
element
=
document
.
getElementById
(
id
);
if
(
allBoxesArray
.
includes
(
element
))
{
return
element
;
if
(
allBoxesArray
.
includes
(
element
))
{
return
element
;
}
return
false
;
}
return
false
;
}
function
HideElement
(
element
)
{
...
...
@@ -84,6 +88,14 @@ window.boxHider = (function() {
ShowElement
(
box
);
}
});
}
else
if
(
boxId
.
startsWith
(
'
lab
'
))
{
allBoxes
.
map
(
function
(
box
)
{
if
(
!
box
.
id
.
startsWith
(
'
lab
'
))
{
HideElement
(
box
);
}
else
{
ShowElement
(
box
);
}
});
}
else
{
allBoxes
.
map
(
function
(
box
)
{
if
(
box
!=
selectedBox
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment