Tri des listes d'items

This commit is contained in:
Vincent Vandemeulebrouck 2023-05-28 22:00:04 +02:00
parent d6f8976298
commit 717029e572
8 changed files with 13 additions and 12 deletions

View File

@ -6,6 +6,7 @@
- Refonte du journal d'expérience
- disponible pour les personnages des joueurs
- explication "comptable" des changements (dépense ou ajout, changements de niveaux, ...)
- tri alphabétique des différentes listes (sorts, recettes, oeuvres, ...)
## v10.7.13 - l'armure de Semolosse
- Fix: en cas d'armure variable, la détérioration diminue le dé d'armure

View File

@ -1,7 +1,7 @@
{{#if recettesAlchimiques.length}}
<h3>Recettes Alchimiques</h3>
<ul class="item-list alterne-list">
{{#each recettesAlchimiques as |recette id|}}
{{#each (trier recettesAlchimiques) as |recette id|}}
<li class="item flexrow list-item" data-item-id="{{recette._id}}"><span class="competence-title recette-label item-edit"><a>{{recette.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>

View File

@ -61,7 +61,7 @@
{{/unless}}
</label>
</li>
{{#each system.services as |service key|}}
{{#each (trier system.services) as |service key|}}
<li class="item flexrow list-item" data-key="{{key}}">
<input {{@root.disabled}} type="text" name="services[{{key}}].name" value="{{service.name}}" data-dtype="String" />
<input {{@root.disabled}} type="checkbox" name="services[{{key}}].system.moral" {{#if service.system.moral}}checked{{/if}} />

View File

@ -25,14 +25,14 @@
<span class="equipement-detail">Prix (sols)</span>
<span class="equipement-actions">Actions</span>
</li>
{{#each objets as |item id|}}
{{#each (trier objets) as |item id|}}
{{#unless item.estContenu}}
{{#if (ne item.type 'conteneur')}}
{{buildLigneInventaire item ../options}}
{{/if}}
{{/unless}}
{{/each}}
{{#each conteneurs as |conteneur id|}}
{{#each (trier conteneurs) as |conteneur id|}}
{{buildLigneInventaire conteneur ../options}}
{{/each}}
</ul>

View File

@ -1,7 +1,7 @@
{{#if meditations.length}}
<h3>Méditations</h3>
<ul class="item-list">
{{#each meditations as |meditation key|}}
{{#each (trier meditations) as |meditation key|}}
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{meditation.img}}" />
<span class="meditation-label flex-grow"><a data-item-id="{{meditation._id}}">{{meditation.name}} - {{meditation.system.competence}}</a></span>

View File

@ -1,7 +1,7 @@
{{#if sortsReserve.length}}
<h3>Sorts en Réserve</h3>
<ul class="item-list alterne-list">
{{#each sortsReserve as |sort key|}}
{{#each (trier sortsReserve) as |sort key|}}
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{sort.img}}" />
<span class="item-edit"><a>{{#if sort.system.echectotal}}Echec total: {{/if}}{{sort.name}} r{{sort.system.ptreve}}</a></span>

View File

@ -1,7 +1,7 @@
{{#if sorts.length}}
<h3>Sorts</h3>
<ul class="item-list alterne-list">
{{#each sorts as |sort key|}}
{{#each (trier sorts) as |sort key|}}
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{sort.img}}" />
<span class="item-edit flex-grow-2">

View File

@ -1,18 +1,18 @@
<h3>Oeuvres diverses</h3><a class="chat-card-button creer-une-oeuvre">Créer une oeuvre</a>
<ul class="item-list alterne-list">
{{#each chants as |chant id|}}
{{#each (trier chants) as |chant id|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=chant typeOeuvre="Chant" classOeuvre="chant-label"}}
{{/each}}
{{#each musiques as |musique id|}}
{{#each (trier musiques) as |musique id|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=musique typeOeuvre="Musique" classOeuvre="musique-label"}}
{{/each}}
{{#each danses as |danse id|}}
{{#each (trier danses) as |danse id|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=danse typeOeuvre="Danse" classOeuvre="danse-label"}}
{{/each}}
{{#each oeuvres as |oeuvre id|}}
{{#each (trier oeuvres) as |oeuvre id|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=oeuvre typeOeuvre=oeuvre.system.competence classOeuvre="oeuvre-label"}}
{{/each}}
{{#each recettescuisine as |recette id|}}
{{#each (trier recettescuisine) as |recette id|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=recette typeOeuvre="Recette de cuisine" classOeuvre="recettecuisine-label"}}
{{/each}}
</ul>