fix the search function/display
This commit is contained in:
@@ -3462,6 +3462,19 @@
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.planet-layout.alpha-text-global-search-only {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.planet-layout.alpha-text-global-search-only > .planet-list-panel,
|
||||||
|
.planet-layout.alpha-text-global-search-only > .planet-detail-panel > .alpha-text-detail-heading,
|
||||||
|
.planet-layout.alpha-text-global-search-only .alpha-text-heading-tools,
|
||||||
|
.planet-layout.alpha-text-global-search-only .alpha-text-controls--heading,
|
||||||
|
.planet-layout.alpha-text-global-search-only .alpha-text-search-controls--detail,
|
||||||
|
.planet-layout.alpha-text-global-search-only .alpha-text-search-inline {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 1040px) {
|
@media (max-width: 1040px) {
|
||||||
.alpha-text-heading-tools {
|
.alpha-text-heading-tools {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
@@ -5377,6 +5390,9 @@
|
|||||||
grid-template-columns: minmax(0, 1fr);
|
grid-template-columns: minmax(0, 1fr);
|
||||||
grid-template-rows: minmax(220px, 42svh) minmax(0, 1fr);
|
grid-template-rows: minmax(220px, 42svh) minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
|
.planet-layout.alpha-text-global-search-only {
|
||||||
|
grid-template-rows: minmax(0, 1fr);
|
||||||
|
}
|
||||||
.planet-layout.layout-sidebar-collapsed,
|
.planet-layout.layout-sidebar-collapsed,
|
||||||
.planet-layout.layout-detail-collapsed,
|
.planet-layout.layout-detail-collapsed,
|
||||||
.tarot-layout.layout-sidebar-collapsed,
|
.tarot-layout.layout-sidebar-collapsed,
|
||||||
|
|||||||
@@ -37,8 +37,10 @@
|
|||||||
let localSearchInputEl;
|
let localSearchInputEl;
|
||||||
let workSelectEl;
|
let workSelectEl;
|
||||||
let sectionSelectEl;
|
let sectionSelectEl;
|
||||||
|
let detailHeadingEl;
|
||||||
let detailNameEl;
|
let detailNameEl;
|
||||||
let detailSubEl;
|
let detailSubEl;
|
||||||
|
let detailHeadingToolsEl;
|
||||||
let detailBodyEl;
|
let detailBodyEl;
|
||||||
let textLayoutEl;
|
let textLayoutEl;
|
||||||
let lexiconPopupEl;
|
let lexiconPopupEl;
|
||||||
@@ -63,13 +65,34 @@
|
|||||||
localSearchInputEl = document.getElementById("alpha-text-local-search-input");
|
localSearchInputEl = document.getElementById("alpha-text-local-search-input");
|
||||||
workSelectEl = document.getElementById("alpha-text-work-select");
|
workSelectEl = document.getElementById("alpha-text-work-select");
|
||||||
sectionSelectEl = document.getElementById("alpha-text-section-select");
|
sectionSelectEl = document.getElementById("alpha-text-section-select");
|
||||||
|
detailHeadingEl = document.querySelector("#alphabet-text-section .alpha-text-detail-heading");
|
||||||
detailNameEl = document.getElementById("alpha-text-detail-name");
|
detailNameEl = document.getElementById("alpha-text-detail-name");
|
||||||
detailSubEl = document.getElementById("alpha-text-detail-sub");
|
detailSubEl = document.getElementById("alpha-text-detail-sub");
|
||||||
|
detailHeadingToolsEl = document.querySelector("#alphabet-text-section .alpha-text-heading-tools");
|
||||||
detailBodyEl = document.getElementById("alpha-text-detail-body");
|
detailBodyEl = document.getElementById("alpha-text-detail-body");
|
||||||
textLayoutEl = sourceListEl?.closest?.(".planet-layout") || detailBodyEl?.closest?.(".planet-layout") || null;
|
textLayoutEl = sourceListEl?.closest?.(".planet-layout") || detailBodyEl?.closest?.(".planet-layout") || null;
|
||||||
ensureLexiconPopup();
|
ensureLexiconPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setGlobalSearchHeadingMode(isGlobalSearchOnly) {
|
||||||
|
if (textLayoutEl instanceof HTMLElement) {
|
||||||
|
textLayoutEl.classList.toggle("alpha-text-global-search-only", Boolean(isGlobalSearchOnly));
|
||||||
|
textLayoutEl.setAttribute("data-global-search-only", isGlobalSearchOnly ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (detailHeadingEl instanceof HTMLElement) {
|
||||||
|
detailHeadingEl.hidden = Boolean(isGlobalSearchOnly);
|
||||||
|
detailHeadingEl.setAttribute("aria-hidden", isGlobalSearchOnly ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(detailHeadingToolsEl instanceof HTMLElement)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
detailHeadingToolsEl.hidden = Boolean(isGlobalSearchOnly);
|
||||||
|
detailHeadingToolsEl.setAttribute("aria-hidden", isGlobalSearchOnly ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
function showDetailOnlyMode() {
|
function showDetailOnlyMode() {
|
||||||
if (!(textLayoutEl instanceof HTMLElement)) {
|
if (!(textLayoutEl instanceof HTMLElement)) {
|
||||||
return;
|
return;
|
||||||
@@ -1411,7 +1434,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isGlobalSearchOnlyMode() {
|
function isGlobalSearchOnlyMode() {
|
||||||
return state.activeSearchScope === "global"
|
return (state.activeSearchScope === "global" || state.activeSearchScope === "source")
|
||||||
&& Boolean(state.searchQuery)
|
&& Boolean(state.searchQuery)
|
||||||
&& !state.highlightedVerseId;
|
&& !state.highlightedVerseId;
|
||||||
}
|
}
|
||||||
@@ -1421,6 +1444,7 @@
|
|||||||
const work = getSelectedWork(source);
|
const work = getSelectedWork(source);
|
||||||
const section = getSelectedSection(source, work);
|
const section = getSelectedSection(source, work);
|
||||||
const globalSearchOnlyMode = isGlobalSearchOnlyMode();
|
const globalSearchOnlyMode = isGlobalSearchOnlyMode();
|
||||||
|
setGlobalSearchHeadingMode(globalSearchOnlyMode);
|
||||||
|
|
||||||
if (!source || !work || !section) {
|
if (!source || !work || !section) {
|
||||||
renderPlaceholder("Text Reader", "Select a source to begin", "Choose a text source and section from the left panel.");
|
renderPlaceholder("Text Reader", "Select a source to begin", "Choose a text source and section from the left panel.");
|
||||||
@@ -1524,6 +1548,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (normalizedScope === "global" || normalizedScope === "source") {
|
||||||
|
showDetailOnlyMode();
|
||||||
|
}
|
||||||
|
|
||||||
const requestId = state.searchRequestId + 1;
|
const requestId = state.searchRequestId + 1;
|
||||||
state.searchRequestId = requestId;
|
state.searchRequestId = requestId;
|
||||||
state.searchLoading = true;
|
state.searchLoading = true;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-400.css">
|
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-400.css">
|
||||||
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-700.css">
|
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-700.css">
|
||||||
<link rel="stylesheet" href="node_modules/@fontsource/noto-naskh-arabic/arabic-400.css">
|
<link rel="stylesheet" href="node_modules/@fontsource/noto-naskh-arabic/arabic-400.css">
|
||||||
<link rel="stylesheet" href="app/styles.css?v=20260312-text-counts-01">
|
<link rel="stylesheet" href="app/styles.css?v=20260312-global-search-04">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="topbar">
|
<div class="topbar">
|
||||||
@@ -997,7 +997,7 @@
|
|||||||
<script src="app/ui-alphabet-detail.js?v=20260309-enochian-api"></script>
|
<script src="app/ui-alphabet-detail.js?v=20260309-enochian-api"></script>
|
||||||
<script src="app/ui-alphabet-kabbalah.js"></script>
|
<script src="app/ui-alphabet-kabbalah.js"></script>
|
||||||
<script src="app/ui-alphabet.js?v=20260308b"></script>
|
<script src="app/ui-alphabet.js?v=20260308b"></script>
|
||||||
<script src="app/ui-alphabet-text.js?v=20260312-text-counts-01"></script>
|
<script src="app/ui-alphabet-text.js?v=20260312-source-search-01"></script>
|
||||||
<script src="app/ui-zodiac-references.js"></script>
|
<script src="app/ui-zodiac-references.js"></script>
|
||||||
<script src="app/ui-zodiac.js"></script>
|
<script src="app/ui-zodiac.js"></script>
|
||||||
<script src="app/ui-quiz-bank-builtins-domains.js"></script>
|
<script src="app/ui-quiz-bank-builtins-domains.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user