Skip to content

Commit

Permalink
Render Sections 2 and 3 hidden until tumor type fetch processes
Browse files Browse the repository at this point in the history
  • Loading branch information
dlian7890 committed Mar 20, 2024
1 parent 2c17fc1 commit fd96cb8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 15 additions & 2 deletions main/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ <h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times N
name="cancerTypes[]"
multiple="multiple"
id="cancerTypeMultipleSelection"
onchange="fillClinicalSelectBox(), displayNumberSamples(), saveInLocalStorage()"
onchange="
fillClinicalSelectBox(),
displayNumberSamples(),
saveInLocalStorage(),
showOrHideGeneAndClinicalSelection()
"
>
<!-- Filled by fillSelectBoxes.js -->
</select>
Expand Down Expand Up @@ -319,6 +324,8 @@ <h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times N

<script>
$(document).ready(function () {
$(".geneOneMultipleSelection, .clinicalMultipleSelection, .geneTwoMultipleSelection, .pathwayMultipleSelection")
.prop("disabled", true).trigger("change.select2");

var cancerType = false;

Expand Down Expand Up @@ -352,7 +359,6 @@ <h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times N
placeholder: "Pathway(s)",
});
fillPathwaySelectBox();

});

validGeneListFetch = getValidGeneList();
Expand Down Expand Up @@ -398,6 +404,13 @@ <h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times N
fillGeneSelectBoxes(".geneTwoMultipleSelection");
});
});

const showOrHideGeneAndClinicalSelection = () => {
cohorts = $(".cancerTypeMultipleSelection").select2("data");
$(".geneOneMultipleSelection, .clinicalMultipleSelection, .geneTwoMultipleSelection, .pathwayMultipleSelection")
.prop("disabled", true).trigger("change.select2");

}
</script>

</html>
2 changes: 2 additions & 0 deletions main/js/smartCache/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,8 @@ function CacheInterface(nameOfDb) {
return undefined
});
}
$(".geneOneMultipleSelection, .clinicalMultipleSelection, .geneTwoMultipleSelection, .pathwayMultipleSelection")
.prop("disabled", true).trigger("change.select2");
}

let [missingInterface, hasInterface] = constructQueriesCLIN(listOfCohorts, this.interface)
Expand Down

0 comments on commit fd96cb8

Please sign in to comment.