Tri des alphabétique des compétences
Dans lmes sélections, c'est plus facile de s'y retrouver
This commit is contained in:
parent
f1d7cfa1f8
commit
cf4be389b4
@ -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")) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each competences as |comp key|}}
|
||||
{{#each (trier competences) as |comp key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<a class="competence-label">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}" />
|
||||
|
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#each competences as |comp key|}}
|
||||
{{#each (trier competences) as |comp key|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.html" comp}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<label for="xp">Compétence</label>
|
||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||
{{#select system.competence}}
|
||||
{{#each competences as |competence key|}}
|
||||
{{#each (trier competences) as |competence key|}}
|
||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<label for="xp">Compétence</label>
|
||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||
{{#select system.competence}}
|
||||
{{#each competences as |competence key|}}
|
||||
{{#each (trier competences) as |competence key|}}
|
||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
|
@ -20,7 +20,7 @@
|
||||
<label>Compétence</label>
|
||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||
{{#select system.competence}}
|
||||
{{#each competences as |competence key|}}
|
||||
{{#each (trier competences) as |competence key|}}
|
||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||
{{#select system.competence}}
|
||||
<option value="">Sans compétence</option>
|
||||
{{#each competences as |competence key|}}
|
||||
{{#each (trier competences) as |competence key|}}
|
||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
|
Loading…
Reference in New Issue
Block a user