v10.6.17 - Les désordres de Pralinor #628

Merged
uberwald merged 3 commits from VincentVk/foundryvtt-reve-de-dragon:v10 into v10 2023-02-14 08:13:45 +01:00
Showing only changes of commit 673196c644 - Show all commits

View File

@ -444,12 +444,16 @@ export class RdDUtility {
static buildContenuConteneur(conteneur, options = {}, optionsArbre = {}) {
RdDUtility.prepareOptionsArbreInventaire(conteneur, optionsArbre);
const display = optionsArbre.ouvert ? 'item-display-show' : 'item-display-hide';
let strContenu = `<ul class='item-list alterne-list ${display} list-item-margin${Math.min(optionsArbre.profondeur, 6)}'>`;
const profondeur = optionsArbre.profondeur;
optionsArbre.profondeur++;
for (let contenu of conteneur.subItems) {
strContenu += this.buildLigneInventaire(contenu, options, optionsArbre);
}
return strContenu + "</ul>";
const lignesContenu = conteneur.subItems.sort(Misc.ascending(it => it.name))
.map(contenu => this.buildLigneInventaire(contenu, options, optionsArbre));
return `<ul class='item-list alterne-list ${display} list-item-margin${Math.min(profondeur, 6)}'>`
+ lignesContenu.reduce(Misc.joining(''), '')
+ "</ul>";
}
/* -------------------------------------------- */