From d8e45721c5c90789e43865729faec05b73266e37 Mon Sep 17 00:00:00 2001 From: William Moore Date: Wed, 30 Oct 2024 11:25:45 +0000 Subject: [PATCH 01/15] Only search studies by name if key is 'Any' --- .../static/idr_gallery/omero_search_form.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/idr_gallery/static/idr_gallery/omero_search_form.js b/idr_gallery/static/idr_gallery/omero_search_form.js index 17001593..1790bf76 100644 --- a/idr_gallery/static/idr_gallery/omero_search_form.js +++ b/idr_gallery/static/idr_gallery/omero_search_form.js @@ -168,14 +168,15 @@ async function getAutoCompleteResults(key, query, knownKeys, operator) { let kvp_url = `${SEARCH_ENGINE_URL}resources/all/searchvalues/?` + params; let urls = [kvp_url]; - // We always check for Names... - // Need to load data from 2 end-points - let names_url = `${SEARCH_ENGINE_URL}resources/all/names/?value=${query}`; - // NB: Don't show auto-complete for Description yet - issues with 'equals' search - // if (key == "Any" || key == "description") { - // names_url += `&use_description=true`; - // } - urls.push(names_url); + // We check for Names if "Any" + if (key == "Any") { + let names_url = `${SEARCH_ENGINE_URL}resources/all/names/?value=${query}`; + // NB: Don't show auto-complete for Description yet - issues with 'equals' search + // if (key == "Any" || key == "description") { + // names_url += `&use_description=true`; + // } + urls.push(names_url); + } const promises = urls.map((p) => fetch(p).then((rsp) => rsp.json())); const responses = await Promise.all(promises); From 2742212c2925166f4db74aa28a7bf8b4ed982179 Mon Sep 17 00:00:00 2001 From: William Moore Date: Wed, 30 Oct 2024 11:50:49 +0000 Subject: [PATCH 02/15] Move study link under search results section --- idr_gallery/static/idr_gallery/omero_search_form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idr_gallery/static/idr_gallery/omero_search_form.js b/idr_gallery/static/idr_gallery/omero_search_form.js index 1790bf76..db20acb2 100644 --- a/idr_gallery/static/idr_gallery/omero_search_form.js +++ b/idr_gallery/static/idr_gallery/omero_search_form.js @@ -856,12 +856,12 @@ class OmeroSearchForm { return `
  • - +
    ${studyId}
    ${count}
    ${title}
    +
    Open study: ${studyName}
      ${SPINNER_SVG} From 16e9d4959a4efed474814fc5016494f08ef5140d Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 1 Nov 2024 15:28:06 +0000 Subject: [PATCH 03/15] Thumnnail links show popup --- .../static/idr_gallery/omero_search_form.js | 4 +- idr_gallery/templates/idr_gallery/search.html | 156 ++++++++++++++++++ 2 files changed, 158 insertions(+), 2 deletions(-) diff --git a/idr_gallery/static/idr_gallery/omero_search_form.js b/idr_gallery/static/idr_gallery/omero_search_form.js index db20acb2..0a0ecd29 100644 --- a/idr_gallery/static/idr_gallery/omero_search_form.js +++ b/idr_gallery/static/idr_gallery/omero_search_form.js @@ -939,8 +939,8 @@ class OmeroSearchForm { .map((img) => { // Each thumbnail links to image viewer. Hover menu links to viewer (eye) and webclient (i) return `
    • - - + +