fix: barre flottante deplacee hors content-area (avant </body>) — immunisee contre innerHTML
This commit is contained in:
+3
-7
@@ -5203,9 +5203,7 @@
|
||||
// --- Legacy search results renderer (kept for backward compat) ---
|
||||
function renderSearchResults(data, query, tagFilter) {
|
||||
const area = document.getElementById("content-area");
|
||||
var rb = document.getElementById("results-bar");
|
||||
area.innerHTML = "";
|
||||
if (rb) area.appendChild(rb);
|
||||
const header = buildSearchResultsHeader(data, query, tagFilter);
|
||||
area.appendChild(header);
|
||||
if (data.results.length === 0) {
|
||||
@@ -5263,14 +5261,12 @@
|
||||
// --- Advanced search results renderer (facets, highlighted snippets, pagination, sort) ---
|
||||
function renderAdvancedSearchResults(data, query, tagFilter) {
|
||||
const area = document.getElementById("content-area");
|
||||
var rb = document.getElementById("results-bar");
|
||||
area.innerHTML = "";
|
||||
if (rb) area.appendChild(rb);
|
||||
|
||||
// Update match counter
|
||||
const countEl = document.getElementById("rb-count");
|
||||
// Update match counter + show floating results bar
|
||||
var rb = document.getElementById("results-bar");
|
||||
var countEl = document.getElementById("rb-count");
|
||||
if (countEl) countEl.textContent = `${data.total > 0 ? "1" : "0"}/${data.total}`;
|
||||
// Show floating results bar
|
||||
if (rb) rb.style.display = 'flex';
|
||||
|
||||
// Header with result count and sort controls
|
||||
|
||||
+10
-10
@@ -1129,16 +1129,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Floating results bar -->
|
||||
<div class="results-bar" id="results-bar" style="display:none">
|
||||
<span class="results-bar-count" id="rb-count">0/0</span>
|
||||
<button class="results-bar-btn" id="rb-prev" title="Resultat precedent" aria-label="Precedent">↑</button>
|
||||
<button class="results-bar-btn" id="rb-next" title="Resultat suivant" aria-label="Suivant">↓</button>
|
||||
<span class="results-bar-sep"></span>
|
||||
<button class="results-bar-btn tog" id="rb-case" title="Respecter la casse (Alt-C)">Aa</button>
|
||||
<button class="results-bar-btn tog" id="rb-word" title="Mot entier (Alt-W)">wd</button>
|
||||
<button class="results-bar-btn tog" id="rb-regex" title="Expression reguliere (Alt-R)">.*</button>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<!-- /content-wrapper -->
|
||||
@@ -4733,5 +4723,15 @@ curl -X POST https://votre-serveur.com/webhook \
|
||||
<div class="mt-sheet-list" id="mt-tab-list"></div>
|
||||
</div>
|
||||
<div class="mt-overlay" id="mt-overlay"></div>
|
||||
<!-- Floating results bar (outside content-area, survives innerHTML) -->
|
||||
<div class="results-bar" id="results-bar" style="display:none">
|
||||
<span class="results-bar-count" id="rb-count">0/0</span>
|
||||
<button class="results-bar-btn" id="rb-prev" title="Resultat precedent" aria-label="Precedent">↑</button>
|
||||
<button class="results-bar-btn" id="rb-next" title="Resultat suivant" aria-label="Suivant">↓</button>
|
||||
<span class="results-bar-sep"></span>
|
||||
<button class="results-bar-btn tog" id="rb-case" title="Respecter la casse (Alt-C)">Aa</button>
|
||||
<button class="results-bar-btn tog" id="rb-word" title="Mot entier (Alt-W)">wd</button>
|
||||
<button class="results-bar-btn tog" id="rb-regex" title="Expression reguliere (Alt-R)">.*</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -842,9 +842,7 @@ export async function performAdvancedSearch(query, vaultFilter, tagFilter, offse
|
||||
// --- Legacy search results renderer (kept for backward compat) ---
|
||||
export function renderSearchResults(data, query, tagFilter) {
|
||||
const area = document.getElementById("content-area");
|
||||
var rb = document.getElementById("results-bar");
|
||||
area.innerHTML = "";
|
||||
if (rb) area.appendChild(rb);
|
||||
const header = buildSearchResultsHeader(data, query, tagFilter);
|
||||
area.appendChild(header);
|
||||
if (data.results.length === 0) {
|
||||
@@ -902,15 +900,12 @@ export function renderSearchResults(data, query, tagFilter) {
|
||||
// --- Advanced search results renderer (facets, highlighted snippets, pagination, sort) ---
|
||||
export function renderAdvancedSearchResults(data, query, tagFilter) {
|
||||
const area = document.getElementById("content-area");
|
||||
// Save results bar before clearing
|
||||
var rb = document.getElementById("results-bar");
|
||||
area.innerHTML = "";
|
||||
if (rb) area.appendChild(rb);
|
||||
|
||||
// Update match counter
|
||||
const countEl = document.getElementById("rb-count");
|
||||
// Update match counter + show floating results bar
|
||||
var rb = document.getElementById("results-bar");
|
||||
var countEl = document.getElementById("rb-count");
|
||||
if (countEl) countEl.textContent = `${data.total > 0 ? "1" : "0"}/${data.total}`;
|
||||
// Show floating results bar
|
||||
if (rb) rb.style.display = 'flex';
|
||||
|
||||
// Header with result count and sort controls
|
||||
|
||||
Reference in New Issue
Block a user