diff --git a/manifest.json b/manifest.json index 1c4d3a5..09448f4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Planification", - "version": "2026.5.33", + "version": "2026.5.34", "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.", "browser_specific_settings": { "gecko": { diff --git a/viewer.css b/viewer.css index 0169003..bb6a376 100644 --- a/viewer.css +++ b/viewer.css @@ -2706,14 +2706,25 @@ header.topbar::before { color: var(--text); cursor: pointer; user-select: none; - border-radius: 4px; - transition: background 0.12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + order: 2; + text-align: center; /* v2026.5.24 : centrer le texte */ } .pinned-popup-minref:hover { - background: var(--bg-muted); + color: var(--accent, #3b82f6); +} + +/* Boutons plus petits en mode minimisé */ +.pinned-popup.pinned-popup-minimized .pinned-popup-btn { + width: 22px !important; + height: 22px !important; + font-size: 12px !important; +} +.pinned-popup.pinned-popup-minimized .pinned-popup-refresh svg { + width: 12px; + height: 12px; } /* ========================================================================== diff --git a/viewer.js b/viewer.js index b3ad480..902a864 100644 --- a/viewer.js +++ b/viewer.js @@ -7596,24 +7596,34 @@ function _reducePinnedPopup(popup) { // Créer la pastille dock // v2026.5.18 : le fond de la pastille prend la couleur de catégorie - // (via la classe color-XXX déjà utilisée ailleurs dans le CSS) - // v2026.5.19 : pastille à 2 lignes — ref (gras) + date origine (petit) + // v2026.5.25 : pastille à 3 lignes — lieu (fort), service (petit), date (petit) + // La référence est affichée dans le mini-menu au survol. const pill = document.createElement("button"); pill.type = "button"; pill.className = "pinned-popup-dock-pill color-" + colorKey; pill.title = "Cliquer pour agrandir"; - const pillRef = document.createElement("span"); - pillRef.className = "pinned-popup-dock-pill-ref"; - pillRef.textContent = label; - pill.appendChild(pillRef); + // Ligne 1 : lieu (ou ref si pas de lieu) + const pillLieu = document.createElement("span"); + pillLieu.className = "pinned-popup-dock-pill-lieu"; + pillLieu.textContent = popup.dataset.lieu || label || "—"; + pill.appendChild(pillLieu); - // Date d'origine (ex: "21.04") + // Ligne 2 : service (2 dernières parties) + const serviceTxt = popup.dataset.service || ""; + if (serviceTxt) { + const pillService = document.createElement("span"); + pillService.className = "pinned-popup-dock-pill-service"; + pillService.textContent = serviceTxt; + pill.appendChild(pillService); + } + + // Ligne 3 : date "Mardi 22.04" const originDate = popup.dataset.originDate || ""; if (originDate) { const pillDate = document.createElement("span"); pillDate.className = "pinned-popup-dock-pill-date"; - pillDate.textContent = _formatDateShort(originDate); + pillDate.textContent = _formatDateForPill(originDate); pill.appendChild(pillDate); } @@ -7632,12 +7642,18 @@ function _reducePinnedPopup(popup) { popup._linkedPill = pill; pill.addEventListener("click", (e) => { + // v2026.5.23 : si on était en train de drag, ne pas déclencher le clic + if (pill._justDragged) { + pill._justDragged = false; + return; + } e.stopPropagation(); _restorePinnedPopupFromDock(popup); }); // v2026.5.20 : mini-menu au survol (Agrandir / Fermer) pill.addEventListener("mouseenter", () => { + if (pill._dragging) return; // pas de menu pendant le drag _showPillHoverMenu(pill, popup); }); pill.addEventListener("mouseleave", (e) => { @@ -7645,6 +7661,9 @@ function _reducePinnedPopup(popup) { _schedulePillMenuClose(); }); + // v2026.5.23 : drag & drop — réordonne dans le dock, ou restaure hors du dock + _attachPillDragHandler(pill, popup); + dock.appendChild(pill); dock.classList.add("visible"); @@ -7680,6 +7699,15 @@ function _showPillHoverMenu(pill, popup) { menu._linkedPill = pill; menu._linkedPopup = popup; + // v2026.5.25 : REF en haut du menu (info seulement, centrée) + const refText = popup.dataset.ref || ""; + if (refText) { + const refLabel = document.createElement("div"); + refLabel.className = "pill-hover-menu-ref"; + refLabel.textContent = refText; + menu.appendChild(refLabel); + } + const restoreBtn = document.createElement("button"); restoreBtn.type = "button"; restoreBtn.className = "pill-hover-menu-btn";