release: v2.2.58 sag tab top-position UX
This commit is contained in:
parent
9a3ada380f
commit
7a95623094
15
RELEASE_NOTES_v2.2.58.md
Normal file
15
RELEASE_NOTES_v2.2.58.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Release Notes v2.2.58
|
||||||
|
|
||||||
|
Dato: 2026-03-18
|
||||||
|
|
||||||
|
## Fokus
|
||||||
|
Forbedret UX paa SAG detaljesiden, saa fanernes indhold vises i toppen ved faneskift.
|
||||||
|
|
||||||
|
## Aendringer
|
||||||
|
- SAG tabs: aktiv tab-pane flyttes til toppen af tab-content ved faneskift.
|
||||||
|
- SAG tabs: automatisk scroll til fanebjaelken efter faneskift.
|
||||||
|
- SAG tabs: samme top-positionering og scroll ved `?tab=` deep-link aktivering.
|
||||||
|
|
||||||
|
## Berorte filer
|
||||||
|
- app/modules/sag/templates/detail.html
|
||||||
|
- RELEASE_NOTES_v2.2.58.md
|
||||||
@ -2207,6 +2207,24 @@
|
|||||||
let wikiSearchTimeout;
|
let wikiSearchTimeout;
|
||||||
let selectedRelationCaseId = null;
|
let selectedRelationCaseId = null;
|
||||||
const caseTypeKey = "{{ (case.template_key or case.type or 'ticket')|lower }}";
|
const caseTypeKey = "{{ (case.template_key or case.type or 'ticket')|lower }}";
|
||||||
|
|
||||||
|
function promoteCaseTabPane(tabId) {
|
||||||
|
if (!tabId) return;
|
||||||
|
const tabContent = document.getElementById('caseTabsContent');
|
||||||
|
const pane = document.getElementById(tabId);
|
||||||
|
if (!tabContent || !pane || !tabContent.contains(pane)) return;
|
||||||
|
if (tabContent.firstElementChild === pane) return;
|
||||||
|
tabContent.insertBefore(pane, tabContent.firstElementChild);
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollToCaseTabs() {
|
||||||
|
const tabs = document.getElementById('caseTabs');
|
||||||
|
if (!tabs) return;
|
||||||
|
const offset = 110;
|
||||||
|
const targetTop = tabs.getBoundingClientRect().top + window.pageYOffset - offset;
|
||||||
|
window.scrollTo({ top: Math.max(0, targetTop), behavior: 'smooth' });
|
||||||
|
}
|
||||||
|
|
||||||
window.moduleDisplayNames = {
|
window.moduleDisplayNames = {
|
||||||
'relations': 'Relationer',
|
'relations': 'Relationer',
|
||||||
'call-history': 'Opkaldshistorik',
|
'call-history': 'Opkaldshistorik',
|
||||||
@ -2304,6 +2322,11 @@
|
|||||||
} catch (tabLoadError) {
|
} catch (tabLoadError) {
|
||||||
console.error('Tab data reload failed:', tabLoadError);
|
console.error('Tab data reload failed:', tabLoadError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
promoteCaseTabPane(tabId);
|
||||||
|
scrollToCaseTabs();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7701,7 +7724,8 @@
|
|||||||
if (tabBtn) {
|
if (tabBtn) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
bootstrap.Tab.getOrCreateInstance(tabBtn).show();
|
bootstrap.Tab.getOrCreateInstance(tabBtn).show();
|
||||||
tabBtn.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
promoteCaseTabPane(tabParam);
|
||||||
|
scrollToCaseTabs();
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user