Fix: trier le contenu
This commit is contained in:
parent
9741028914
commit
673196c644
@ -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>";
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user