From cf4be389b430db0a0e5ce1427944bebd052a040b Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Mon, 31 Oct 2022 15:20:09 +0100 Subject: [PATCH] =?UTF-8?q?Tri=20des=20alphab=C3=A9tique=20des=20comp?= =?UTF-8?q?=C3=A9tences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dans lmes sélections, c'est plus facile de s'y retrouver --- module/rdd-utility.js | 2 +- templates/actor/comp-creature.html | 2 +- templates/actor/competence-categorie.html | 2 +- templates/item-livre-sheet.html | 2 +- templates/item-meditation-sheet.html | 2 +- templates/item-oeuvre-sheet.html | 2 +- templates/item-tache-sheet.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/rdd-utility.js b/module/rdd-utility.js index 1e14f75c..f3db889f 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -280,7 +280,7 @@ export class RdDUtility { Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord)); Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1))); Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionelles.isUsing(option)); - + Handlebars.registerHelper('trier', competences => competences.sort((a, b) => a.name.localeCompare(b.name))); Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.system.isVisible) .sort((a, b) => { if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) { diff --git a/templates/actor/comp-creature.html b/templates/actor/comp-creature.html index c33df660..7628e807 100644 --- a/templates/actor/comp-creature.html +++ b/templates/actor/comp-creature.html @@ -1,5 +1,5 @@
    - {{#each competences as |comp key|}} + {{#each (trier competences) as |comp key|}}
  1. diff --git a/templates/actor/competence-categorie.html b/templates/actor/competence-categorie.html index c243de13..0f9511a4 100644 --- a/templates/actor/competence-categorie.html +++ b/templates/actor/competence-categorie.html @@ -22,7 +22,7 @@
  2. {{/if}} - {{#each competences as |comp key|}} + {{#each (trier competences) as |comp key|}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.html" comp}} {{/each}} diff --git a/templates/item-livre-sheet.html b/templates/item-livre-sheet.html index 9a940f3d..952cac89 100644 --- a/templates/item-livre-sheet.html +++ b/templates/item-livre-sheet.html @@ -21,7 +21,7 @@ {{#select system.competence}} - {{#each competences as |competence key|}} + {{#each (trier competences) as |competence key|}} {{/each}} {{/select}} diff --git a/templates/item-oeuvre-sheet.html b/templates/item-oeuvre-sheet.html index 5a7d2d26..013c81f3 100644 --- a/templates/item-oeuvre-sheet.html +++ b/templates/item-oeuvre-sheet.html @@ -20,7 +20,7 @@ {{#select system.competence}} - {{#each competences as |competence key|}} + {{#each (trier competences) as |competence key|}} {{/each}} {{/select}}