v2026.5.22 — Stabilité popups
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Planification",
|
"name": "Planification",
|
||||||
"version": "2026.5.21",
|
"version": "2026.5.22",
|
||||||
"description": "Vue claire et rapide du planning des techniciens EasyVista. Regroupe interventions et réservations par tech, affiche horaires, contact, lieu, catégorie et statut en un coup d'œil.",
|
"description": "Vue claire et rapide du planning des techniciens EasyVista. Regroupe interventions et réservations par tech, affiche horaires, contact, lieu, catégorie et statut en un coup d'œil.",
|
||||||
"permissions": ["activeTab", "scripting", "storage", "tabs", "alarms"],
|
"permissions": ["activeTab", "scripting", "storage", "tabs", "alarms"],
|
||||||
"host_permissions": [
|
"host_permissions": [
|
||||||
|
|||||||
+11
-6
@@ -2592,18 +2592,23 @@ header.topbar::before {
|
|||||||
v2026.5.17 : mode Minimisé (popup flottant compact, juste la ref)
|
v2026.5.17 : mode Minimisé (popup flottant compact, juste la ref)
|
||||||
v2026.5.19 : refonte — élément .pinned-popup-minref créé à la volée
|
v2026.5.19 : refonte — élément .pinned-popup-minref créé à la volée
|
||||||
v2026.5.21 : agrandi pour que la ref tienne sans déborder
|
v2026.5.21 : agrandi pour que la ref tienne sans déborder
|
||||||
|
v2026.5.22 : encore agrandi + plus d'espace entre dragbar et topbar
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
.pinned-popup.pinned-popup-minimized {
|
.pinned-popup.pinned-popup-minimized {
|
||||||
min-width: 240px !important;
|
min-width: 300px !important;
|
||||||
max-width: 320px !important;
|
max-width: 360px !important;
|
||||||
width: 260px !important;
|
width: 300px !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
min-height: 70px !important;
|
min-height: 80px !important;
|
||||||
padding: 36px 14px 14px 14px !important;
|
padding: 44px 16px 16px 16px !important;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
background: var(--bg-elevated) !important;
|
background: var(--bg-elevated) !important;
|
||||||
border: 1px solid var(--border) !important;
|
border: 1px solid var(--border) !important;
|
||||||
}
|
}
|
||||||
|
/* Séparer visuellement la dragbar (collée en haut) des boutons topbar */
|
||||||
|
.pinned-popup.pinned-popup-minimized .pinned-popup-topbar {
|
||||||
|
top: 14px !important; /* sous la dragbar (qui fait ~6-8px) */
|
||||||
|
}
|
||||||
/* Masquer tous les enfants directs du popup minimisé */
|
/* Masquer tous les enfants directs du popup minimisé */
|
||||||
.pinned-popup.pinned-popup-minimized > *:not(.pinned-popup-topbar):not(.pinned-popup-dragbar):not(.pinned-popup-minref) {
|
.pinned-popup.pinned-popup-minimized > *:not(.pinned-popup-topbar):not(.pinned-popup-dragbar):not(.pinned-popup-minref) {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
@@ -2612,7 +2617,7 @@ header.topbar::before {
|
|||||||
.pinned-popup-minref {
|
.pinned-popup-minref {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 8px 10px;
|
padding: 10px 12px;
|
||||||
font-family: var(--mono, monospace);
|
font-family: var(--mono, monospace);
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
@@ -6843,6 +6843,15 @@ function _softUnpinPopup(el) {
|
|||||||
_ensureDockCloseAllBtn();
|
_ensureDockCloseAllBtn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// v2026.5.22 : si le tooltip hover est actuellement affiché pour la même
|
||||||
|
// intervention que celle qu'on désépingle, il faut regénérer son HTML pour
|
||||||
|
// que l'icône passe de 📍 (active rouge) à 📌 (non active) — sinon l'user
|
||||||
|
// voit l'ancienne icône et croit qu'il est toujours épinglé.
|
||||||
|
const tip = tooltipEl();
|
||||||
|
if (tip && tip.classList.contains("visible") && state.currentTooltipIv) {
|
||||||
|
tip.innerHTML = buildTooltipHTML(state.currentTooltipIv);
|
||||||
|
}
|
||||||
|
|
||||||
// Helper qui joue l'animation de sortie puis supprime le DOM
|
// Helper qui joue l'animation de sortie puis supprime le DOM
|
||||||
const animateAndRemove = () => {
|
const animateAndRemove = () => {
|
||||||
el.classList.add("unpinning");
|
el.classList.add("unpinning");
|
||||||
@@ -7675,34 +7684,14 @@ function bindTooltipInteractions() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const action = btn.dataset.action;
|
const action = btn.dataset.action;
|
||||||
if (action === "pin") {
|
if (action === "pin") {
|
||||||
// v2026.5.21 : toggle — si déjà épinglée, désépingle ; sinon épingle
|
// v2026.5.22 : clic sur 📌/📍 dans le tooltip hover = TOUJOURS réépingler
|
||||||
|
// à la position actuelle. Si un popup existe déjà pour cette iv+date,
|
||||||
|
// il est supprimé avant d'en créer un nouveau à côté de la carte survolée.
|
||||||
|
// (La suppression de l'ancien est faite dans pinTooltip() qui gère
|
||||||
|
// l'unicité actionId+date — v2026.5.21.)
|
||||||
|
// Pour désépingler : bouton 📍 dans la topbar du popup, double-Ctrl, ou Échap.
|
||||||
if (state.currentTooltipIv) {
|
if (state.currentTooltipIv) {
|
||||||
const iv = state.currentTooltipIv;
|
pinTooltip();
|
||||||
const pinState = _getPinStateForIv(iv);
|
|
||||||
if (pinState.isPinned && pinState.popup) {
|
|
||||||
// Désépingle
|
|
||||||
const idx = pinnedPopups.findIndex(p => p.el === pinState.popup);
|
|
||||||
if (idx >= 0) pinnedPopups.splice(idx, 1);
|
|
||||||
if (pinState.popup._linkedPill) {
|
|
||||||
try { pinState.popup._linkedPill.remove(); } catch (err) {}
|
|
||||||
}
|
|
||||||
try { pinState.popup.remove(); } catch (err) {}
|
|
||||||
const dock = document.getElementById("pinned-popups-dock");
|
|
||||||
if (dock && dock.querySelectorAll(".pinned-popup-dock-pill").length === 0) {
|
|
||||||
dock.classList.remove("visible");
|
|
||||||
const closeAllBtn = document.getElementById("pinned-popups-close-all");
|
|
||||||
if (closeAllBtn) closeAllBtn.remove();
|
|
||||||
} else {
|
|
||||||
_ensureDockCloseAllBtn();
|
|
||||||
}
|
|
||||||
// Mettre à jour le tooltip (📍 → 📌)
|
|
||||||
const tip = tooltipEl();
|
|
||||||
if (tip && tip.classList.contains("visible")) {
|
|
||||||
tip.innerHTML = buildTooltipHTML(iv);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pinTooltip();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (action === "reload") {
|
} else if (action === "reload") {
|
||||||
// v4.1.14 : recharger uniquement l'intervention actuellement affichée
|
// v4.1.14 : recharger uniquement l'intervention actuellement affichée
|
||||||
|
|||||||
Reference in New Issue
Block a user