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('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
||||||
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
||||||
Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionelles.isUsing(option));
|
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)
|
Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.system.isVisible)
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
|
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<ol class="item-list alterne-list">
|
<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}}">
|
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||||
<a class="competence-label">
|
<a class="competence-label">
|
||||||
<img class="sheet-competence-img" src="{{comp.img}}" />
|
<img class="sheet-competence-img" src="{{comp.img}}" />
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#each competences as |comp key|}}
|
{{#each (trier competences) as |comp key|}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.html" comp}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.html" comp}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<label for="xp">Compétence</label>
|
<label for="xp">Compétence</label>
|
||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select system.competence}}
|
{{#select system.competence}}
|
||||||
{{#each competences as |competence key|}}
|
{{#each (trier competences) as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<label for="xp">Compétence</label>
|
<label for="xp">Compétence</label>
|
||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select system.competence}}
|
{{#select system.competence}}
|
||||||
{{#each competences as |competence key|}}
|
{{#each (trier competences) as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<label>Compétence</label>
|
<label>Compétence</label>
|
||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select system.competence}}
|
{{#select system.competence}}
|
||||||
{{#each competences as |competence key|}}
|
{{#each (trier competences) as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select system.competence}}
|
{{#select system.competence}}
|
||||||
<option value="">Sans compétence</option>
|
<option value="">Sans compétence</option>
|
||||||
{{#each competences as |competence key|}}
|
{{#each (trier competences) as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
Loading…
Reference in New Issue
Block a user