fix(v2): scrollbar inline via _onRender flex styles

Le CSS via template ne fonctionnait pas car l'id V2 n'est pas
un sélecteur DOM fiable. On apply les styles flex/overflow
directement sur this.element et son premier enfant dans _onRender.
This commit is contained in:
fabres
2026-07-22 00:29:56 +02:00
parent 8400d88677
commit c4f9150fdb
4 changed files with 21 additions and 6 deletions
@@ -51,4 +51,16 @@ export class DialogEncaissementTables extends HandlebarsApplicationMixin(Applica
nonmortel: TABLE_NONMORTEL_DISPLAY,
}
}
async _onRender(context, options) {
this.element.style.flex = "1"
this.element.style.display = "flex"
this.element.style.flexDirection = "column"
this.element.style.overflow = "hidden"
const content = this.element.firstElementChild
if (content) {
content.style.overflowY = "auto"
content.style.flex = "1"
}
}
}
+9
View File
@@ -118,6 +118,15 @@ export class ReglesOptionnelles extends HandlebarsApplicationMixin(ApplicationV2
}
async _onRender(context, options) {
this.element.style.flex = "1"
this.element.style.display = "flex"
this.element.style.flexDirection = "column"
this.element.style.overflow = "hidden"
const content = this.element.firstElementChild
if (content) {
content.style.overflowY = "auto"
content.style.flex = "1"
}
this.element.querySelectorAll(".select-option").forEach(el => {
el.addEventListener("click", async event => {
const id = event.currentTarget.getAttribute("name");
@@ -1,7 +1,5 @@
<div>
<style>
#dialog-encaissement-tables .window-content form { height: 100%; display: flex; flex-direction: column; }
#dialog-encaissement-tables .window-content form > div { overflow-y: auto; flex: 1; }
.encaissement-tables { display: flex; flex-direction: column; gap: 1.5em; }
.encaissement-tables table { width: 100%; border-collapse: collapse; }
.encaissement-tables th, .encaissement-tables td { padding: 4px 8px; border: 1px solid #7a7971; text-align: center; }
@@ -1,8 +1,4 @@
<div>
<style>
#regles-optionnelles .window-content form { height: 100%; display: flex; flex-direction: column; }
#regles-optionnelles .window-content form > div { overflow-y: auto; flex: 1; }
</style>
{{#each groups as |group key|}}
<h3>{{key}}</h3>
<ul>