Import initial du système
This commit is contained in:
@@ -9,7 +9,11 @@ export class CDEBaseItemSheet extends HandlebarsApplicationMixin(foundry.applica
|
||||
actions: {},
|
||||
}
|
||||
|
||||
tabGroups = { primary: "description" }
|
||||
tabGroups = { primary: "details" }
|
||||
|
||||
get title() {
|
||||
return this.document.name
|
||||
}
|
||||
|
||||
async _prepareContext() {
|
||||
const cssClass = this.options.classes?.join(" ") ?? ""
|
||||
@@ -19,6 +23,7 @@ export class CDEBaseItemSheet extends HandlebarsApplicationMixin(foundry.applica
|
||||
item: this.document,
|
||||
system: this.document.system,
|
||||
systemData: this.document.system,
|
||||
systemFields: this.document.system.schema.fields,
|
||||
editable: this.isEditable,
|
||||
cssClass,
|
||||
enrichedDescription,
|
||||
@@ -28,14 +33,9 @@ export class CDEBaseItemSheet extends HandlebarsApplicationMixin(foundry.applica
|
||||
}
|
||||
}
|
||||
|
||||
async _onFirstRender(context, options) {
|
||||
await super._onFirstRender(context, options)
|
||||
for (const [group, tab] of Object.entries(this.tabGroups)) {
|
||||
this.changeTab(tab, group, { force: true })
|
||||
}
|
||||
}
|
||||
|
||||
// Restore the active tab after every render (including re-renders from submitOnChange).
|
||||
_onRender(context, options) {
|
||||
super._onRender?.(context, options)
|
||||
for (const [group, tab] of Object.entries(this.tabGroups)) {
|
||||
this.changeTab(tab, group, { force: true })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user