Tri des listes d'items

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

View File

@ -6,6 +6,7 @@
- Refonte du journal d'expérience - Refonte du journal d'expérience
- disponible pour les personnages des joueurs - disponible pour les personnages des joueurs
- explication "comptable" des changements (dépense ou ajout, changements de niveaux, ...) - 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 ## v10.7.13 - l'armure de Semolosse
- Fix: en cas d'armure variable, la détérioration diminue le dé d'armure - Fix: en cas d'armure variable, la détérioration diminue le dé d'armure

View File

@ -1,7 +1,7 @@
{{#if recettesAlchimiques.length}} {{#if recettesAlchimiques.length}}
<h3>Recettes Alchimiques</h3> <h3>Recettes Alchimiques</h3>
<ul class="item-list alterne-list"> <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> <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"> <div class="item-controls flex-shrink">
<a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>

View File

@ -61,7 +61,7 @@
{{/unless}} {{/unless}}
</label> </label>
</li> </li>
{{#each system.services as |service key|}} {{#each (trier system.services) as |service key|}}
<li class="item flexrow list-item" data-key="{{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="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}} /> <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-detail">Prix (sols)</span>
<span class="equipement-actions">Actions</span> <span class="equipement-actions">Actions</span>
</li> </li>
{{#each objets as |item id|}} {{#each (trier objets) as |item id|}}
{{#unless item.estContenu}} {{#unless item.estContenu}}
{{#if (ne item.type 'conteneur')}} {{#if (ne item.type 'conteneur')}}
{{buildLigneInventaire item ../options}} {{buildLigneInventaire item ../options}}
{{/if}} {{/if}}
{{/unless}} {{/unless}}
{{/each}} {{/each}}
{{#each conteneurs as |conteneur id|}} {{#each (trier conteneurs) as |conteneur id|}}
{{buildLigneInventaire conteneur ../options}} {{buildLigneInventaire conteneur ../options}}
{{/each}} {{/each}}
</ul> </ul>

View File

@ -1,7 +1,7 @@
{{#if meditations.length}} {{#if meditations.length}}
<h3>Méditations</h3> <h3>Méditations</h3>
<ul class="item-list"> <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}}"> <li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{meditation.img}}" /> <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> <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}} {{#if sortsReserve.length}}
<h3>Sorts en Réserve</h3> <h3>Sorts en Réserve</h3>
<ul class="item-list alterne-list"> <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}}"> <li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{sort.img}}" /> <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> <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}} {{#if sorts.length}}
<h3>Sorts</h3> <h3>Sorts</h3>
<ul class="item-list alterne-list"> <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}}"> <li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{sort.img}}" /> <img class="sheet-competence-img" src="{{sort.img}}" />
<span class="item-edit flex-grow-2"> <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> <h3>Oeuvres diverses</h3><a class="chat-card-button creer-une-oeuvre">Créer une oeuvre</a>
<ul class="item-list alterne-list"> <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"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=chant typeOeuvre="Chant" classOeuvre="chant-label"}}
{{/each}} {{/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"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=musique typeOeuvre="Musique" classOeuvre="musique-label"}}
{{/each}} {{/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"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=danse typeOeuvre="Danse" classOeuvre="danse-label"}}
{{/each}} {{/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"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=oeuvre typeOeuvre=oeuvre.system.competence classOeuvre="oeuvre-label"}}
{{/each}} {{/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"}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=recette typeOeuvre="Recette de cuisine" classOeuvre="recettecuisine-label"}}
{{/each}} {{/each}}
</ul> </ul>