Skip to content
Snippets Groups Projects
Verified Commit d6fdd63f authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

logic for displaying grouped lab cards

parent d35864e3
No related branches found
No related tags found
2 merge requests!354[release] Regular merge of develop,!347Move lab cards external
Pipeline #52794 passed with warnings
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment