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:
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user