aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-08-04 04:52:58 +0300
committerFrederick Muriuki Muriithi2022-08-04 04:52:58 +0300
commitf895288441953ea1f52095ff421429d377cd37a1 (patch)
tree94bdafa8dc0e5ca2e793f1bce4d147eed016a28d /qc_app/templates
parent3c47afe8092ff9f5bc152320e724c07973c1941a (diff)
downloadgn-uploader-f895288441953ea1f52095ff421429d377cd37a1.tar.gz
UX: Enable selecting radio by clicking anywhere on the row
Ease the selection of a radio button by allowing the user to click on any of the table cells that are in the same row as the radio button of concern.
Diffstat (limited to 'qc_app/templates')
-rw-r--r--qc_app/templates/select_platform.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/qc_app/templates/select_platform.html b/qc_app/templates/select_platform.html
index 131003d..3ceae01 100644
--- a/qc_app/templates/select_platform.html
+++ b/qc_app/templates/select_platform.html
@@ -68,5 +68,18 @@
<script type="text/javascript">
document.getElementById(
"species").addEventListener("change", update_genechips);
+ document.getElementById(
+ "genechips-table").getElementsByTagName(
+ "tbody")[0].addEventListener(
+ "click",
+ function(event) {
+ if(event.target.tagName.toLowerCase() == "td") {
+ return select_row_radio(event.target.parentElement);
+ }
+ if(event.target.tagName.toLowerCase() == "td") {
+ return select_row_radio(event.target);
+ }
+ return false;
+ });
</script>
{%endblock%}