From e776304054655cd0a98b57574355bc66defea42e Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Fri, 5 Apr 2024 17:32:29 +1100 Subject: [PATCH] publications & tool modal --- _includes/table.html | 161 +++++++++++++++++++++++-------------------- 1 file changed, 86 insertions(+), 75 deletions(-) diff --git a/_includes/table.html b/_includes/table.html index d5194f0..57064cc 100644 --- a/_includes/table.html +++ b/_includes/table.html @@ -28,18 +28,6 @@ .cursor-pointer { cursor: pointer; } - .popover { - display: flex; - flex-direction: column; - max-height: 50vh; - max-width: 50vw; - } - .popover-body { - overflow: scroll; - } - .popover a:hover { - text-decoration: underline; - } .col-publications, .col-galaxy, .col-description { @@ -55,6 +43,9 @@ .btn-toggle { width: 48px; } + .modal-content { + max-height: 60vh !important; + } {%- if include.tag %} {%- assign tools = site.data.data | add_related_pages | @@ -193,24 +184,39 @@

Relevant tools and resources

{%- if tool.publications.size > 1 %} {{tool.publications.size}} publications + {%- else %} {{tool.publications[0].title}} @@ -236,37 +242,61 @@

Relevant tools and resources

{%- if tool.galaxy.size > 1 %}
{{tool.galaxy.size}} tools + {%- else %} {{tool.galaxy[0].title}} {%- endif %} @@ -357,8 +387,8 @@

Relevant tools and resources

if (paramType) { searchType = paramType; - document.getElementById('btnradio1').checked = (searchType === 'and'); - document.getElementById('btnradio2').checked = (searchType === 'or'); + document.getElementById("btnradio1").checked = searchType === "and"; + document.getElementById("btnradio2").checked = searchType === "or"; } if (paramTopics) { paramTopics = paramTopics.includes("dna") @@ -395,7 +425,7 @@

Relevant tools and resources

searchTerm = searchType === "and" ? searchTerm.replace(/\|/g, " ").trim() - : searchTerm.trim().replace(/ ([A-Z])/g, '|$1'); + : searchTerm.trim().replace(/ ([A-Z])/g, "|$1"); searchFilter(table, searchTerm); } @@ -503,24 +533,5 @@

Relevant tools and resources

document.querySelector(".filter-message").style.display = "inline-block"; document.querySelector(".clear-all-button").style.display = "none"; } - - // Allow table elements in popovers - const myDefaultAllowList = bootstrap.Tooltip.Default.allowList; - myDefaultAllowList.table = []; - myDefaultAllowList.thead = []; - myDefaultAllowList.tbody = []; - myDefaultAllowList.th = []; - myDefaultAllowList.tr = []; - myDefaultAllowList.td = []; - - const popoverTriggerList = document.querySelectorAll( - '[data-bs-toggle="popover"]' - ); - const popoverList = [...popoverTriggerList].map( - (popoverTriggerEl) => - new bootstrap.Popover(popoverTriggerEl, { - trigger: "focus", - }) - ); });