Bouton d'export si mode avancé
This commit is contained in:
parent
40b0d7e6dc
commit
689e287ac7
@ -1,6 +1,7 @@
|
|||||||
import { RdDActorSheet } from "../../actor-sheet.js"
|
import { RdDActorSheet } from "../../actor-sheet.js"
|
||||||
import { SYSTEM_RDD } from "../../constants.js";
|
import { SYSTEM_RDD } from "../../constants.js";
|
||||||
import { Misc } from "../../misc.js";
|
import { Misc } from "../../misc.js";
|
||||||
|
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js";
|
||||||
import { ExportScriptarium } from "./export-scriptarium.js";
|
import { ExportScriptarium } from "./export-scriptarium.js";
|
||||||
import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.js";
|
import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.js";
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
|
|||||||
}
|
}
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
return foundry.utils.mergeObject(RdDActorSheet.defaultOptions, {
|
return foundry.utils.mergeObject(RdDActorSheet.defaultOptions, {
|
||||||
template: "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/actor-export-sheet.hbs",
|
template: "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/actor-encart-sheet.hbs",
|
||||||
width: 550,
|
width: 550,
|
||||||
showCompNiveauBase: false,
|
showCompNiveauBase: false,
|
||||||
vueArchetype: false,
|
vueArchetype: false,
|
||||||
@ -36,6 +37,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
|
|||||||
formData.export = this.getMappingValues();
|
formData.export = this.getMappingValues();
|
||||||
formData.competences = this.getCompetences(CATEGORIES_COMPETENCES)
|
formData.competences = this.getCompetences(CATEGORIES_COMPETENCES)
|
||||||
formData.draconic = this.getCompetences(CATEGORIES_DRACONIC)
|
formData.draconic = this.getCompetences(CATEGORIES_DRACONIC)
|
||||||
|
formData.options.exportScriptarium = OptionsAvancees.isUsing(EXPORT_CSV_SCRIPTARIUM)
|
||||||
return formData
|
return formData
|
||||||
}
|
}
|
||||||
|
|
@ -64,11 +64,10 @@ import { RdDItemArmure } from "./item/armure.js"
|
|||||||
import { AutoAdjustDarkness as AutoAdjustDarkness } from "./time/auto-adjust-darkness.js"
|
import { AutoAdjustDarkness as AutoAdjustDarkness } from "./time/auto-adjust-darkness.js"
|
||||||
import { RdDCreature } from "./actor/creature.js"
|
import { RdDCreature } from "./actor/creature.js"
|
||||||
import { RdDTMRDialog } from "./rdd-tmr-dialog.js"
|
import { RdDTMRDialog } from "./rdd-tmr-dialog.js"
|
||||||
//import { RdDActorExportSheet } from "./actor/actor-export-sheet.js"
|
|
||||||
import { OptionsAvancees } from "./settings/options-avancees.js"
|
import { OptionsAvancees } from "./settings/options-avancees.js"
|
||||||
import { ExportScriptarium } from "./actor/export-scriptarium/export-scriptarium.js"
|
import { ExportScriptarium } from "./actor/export-scriptarium/export-scriptarium.js"
|
||||||
import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.js"
|
import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.js"
|
||||||
import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-export-sheet.js"
|
import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-encart-sheet.js"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RdD system
|
* RdD system
|
||||||
|
@ -4,7 +4,7 @@ import { Misc } from "../misc.js"
|
|||||||
export const EXPORT_CSV_SCRIPTARIUM = 'export-csv-scriptarium'
|
export const EXPORT_CSV_SCRIPTARIUM = 'export-csv-scriptarium'
|
||||||
|
|
||||||
const OPTIONS_AVANCEES = [
|
const OPTIONS_AVANCEES = [
|
||||||
{ group: 'Menus', name: EXPORT_CSV_SCRIPTARIUM, descr: "Proposer le menu d'export csv Scriptarium (raffraichissement requis)" },
|
{ group: 'Menus', name: EXPORT_CSV_SCRIPTARIUM, descr: "Proposer le menu d'export csv Scriptarium" },
|
||||||
]
|
]
|
||||||
|
|
||||||
export class OptionsAvancees extends FormApplication {
|
export class OptionsAvancees extends FormApplication {
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
<section class="sheet-header">
|
<section class="sheet-header">
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<h1 class="flex-grow charname">{{name}}</h1>
|
<h1 class="flex-grow charname">{{name}}</h1>
|
||||||
|
{{#if options.exportScriptarium}}
|
||||||
<span class="flex-group-right flex-shrink chat-card-button-area"><a class="button-export chat-card-button">Export </a></span>
|
<span class="flex-group-right flex-shrink chat-card-button-area"><a class="button-export chat-card-button">Export </a></span>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="sheet-body" style=:"margin-bottom: 3rem;">
|
<section class="sheet-body" style=:"margin-bottom: 3rem;">
|
Loading…
Reference in New Issue
Block a user