#6 Suppression des sorts

This commit is contained in:
sladecraven 2020-11-05 20:23:16 +01:00
parent 4bc6434fda
commit bb82f139eb
21 changed files with 29 additions and 24 deletions

View File

@ -133,14 +133,15 @@ export class RdDActorSheet extends ActorSheet {
// Update Inventory Item // Update Inventory Item
html.find('.item-edit').click(ev => { html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
const item = this.actor.getOwnedItem(li.data("itemId")); const item = this.actor.getOwnedItem(li.data("item-id"));
item.sheet.render(true); item.sheet.render(true);
}); });
// Delete Inventory Item // Delete Inventory Item
html.find('.item-delete').click(ev => { html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
this.actor.deleteOwnedItem(li.data("itemId")); this.actor.deleteOwnedItem(li.data("item-id"));
console.log("Delete item :", li.data("item-id") );
li.slideUp(200, () => this.render(false)); li.slideUp(200, () => this.render(false));
}); });
@ -170,7 +171,7 @@ export class RdDActorSheet extends ActorSheet {
// Equip Inventory Item // Equip Inventory Item
html.find('.item-equip').click(ev => { html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
this.actor.equiperObjet(li.data("itemId")); this.actor.equiperObjet(li.data("item-id"));
this.render(true); this.render(true);
}); });

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-reve-de-dragon", "name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT", "description": "Rêve de Dragon RPG for FoundryVTT",
"version": "0.9.21", "version": "0.9.22",
"minimumCoreVersion": "0.6.0", "minimumCoreVersion": "0.6.0",
"compatibleCoreVersion": "0.7.5", "compatibleCoreVersion": "0.7.5",
"templateVersion": 38, "templateVersion": 38,

View File

@ -404,8 +404,12 @@
<span><strong>Sorts:</strong></span> <span><strong>Sorts:</strong></span>
<ol class="item-list"> <ol class="item-list">
{{#each data.sorts as |mysort key|}} {{#each data.sorts as |mysort key|}}
<li class="item flexrow" data-attribute={{key}}> <li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
<span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span> <span>{{mysort.data.draconic}} - {{mysort.data.difficulte}}</span> <span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span>
<span>{{mysort.data.draconic}} / {{mysort.data.difficulte}}</span>
<div class="item-controls">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li> </li>
{{/each}} {{/each}}
</ol> </ol>

View File

@ -55,7 +55,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -31,7 +31,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -27,7 +27,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -43,7 +43,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -27,7 +27,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -27,7 +27,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -23,7 +23,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -27,7 +27,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -39,7 +39,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -23,7 +23,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -15,7 +15,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -19,7 +19,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -15,7 +15,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -11,7 +11,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -55,7 +55,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -11,7 +11,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -27,7 +27,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>

View File

@ -11,7 +11,7 @@
<header class="header-field"> <header class="header-field">
<span>Description : </span> <span>Description : </span>
</header> </header>
<div class="form-group" style="height:200px"> <div class="form-group editor" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div> </div>
</section> </section>