restores opening of linked documents in their respective sheet
parent
ee578e430e
commit
e118e8ba92
|
|
@ -118,8 +118,10 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static #openEmbeddedDocument(documentId) {
|
static #openEmbeddedDocument(event) {
|
||||||
this.object.items.get(documentId).sheet.render(true)
|
const dataset = event.target.parentElement.dataset
|
||||||
|
const id = dataset.itemId ?? dataset.id
|
||||||
|
this.document.items.get(id).sheet.render(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -79,14 +79,17 @@ export class GroupSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #openEmbeddedDocument(evt) {
|
|
||||||
const {documentId} = evt.srcElement.dataset
|
static #openEmbeddedDocument(event) {
|
||||||
this.document.items.get(documentId).sheet.render(true)
|
const dataset = event.target.parentElement.dataset
|
||||||
|
const id = dataset.itemId ?? dataset.id
|
||||||
|
this.document.items.get(id).sheet.render(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #openActorDocument(evt) {
|
|
||||||
const {id} = evt.srcElement.dataset
|
static async #openActorDocument(event) {
|
||||||
evt.stopPropagation()
|
const dataset = event.target.parentElement.dataset
|
||||||
|
const id = dataset.itemId ?? dataset.id
|
||||||
game.actors.get(id).sheet.render(true)
|
game.actors.get(id).sheet.render(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
|
data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}" data-operation="openActorSheet">
|
<td class="clickable" data-id="{{this.id}}" data-action="openActorSheet">
|
||||||
{{this.name}}</td>
|
{{this.name}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
|
data-lkp="{{../lkp}}" data-deity="{{this.deity}}">
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}" data-operation="openActorSheet">
|
<td class="clickable" data-id="{{this.id}}" data-action="openActorSheet">
|
||||||
{{this.name}}</td>
|
{{this.name}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}"
|
<td class="clickable" data-id="{{this.id}}"
|
||||||
data-operation="openActorSheet">{{this.name}}</td>
|
data-action="openActorSheet">{{this.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}"
|
<td class="clickable" data-id="{{this.id}}"
|
||||||
data-operation="openActorSheet">{{this.name}}</td>
|
data-action="openActorSheet">{{this.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}"
|
<td class="clickable" data-id="{{this.id}}"
|
||||||
data-operation="openActorSheet">{{this.name}}</td>
|
data-action="openActorSheet">{{this.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}{{/if}}
|
{{/each}}{{/if}}
|
||||||
{{#if this.countV}}
|
{{#if this.countV}}
|
||||||
|
|
@ -133,7 +133,7 @@
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}"
|
<td class="clickable" data-id="{{this.id}}"
|
||||||
data-operation="openActorSheet">{{this.name}}</td>
|
data-action="openActorSheet">{{this.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -152,7 +152,7 @@
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}"
|
<td class="clickable" data-id="{{this.id}}"
|
||||||
data-operation="openActorSheet">{{this.name}}</td>
|
data-action="openActorSheet">{{this.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}{{#if this.countVII}}
|
{{/if}}{{#if this.countVII}}
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}"
|
<td class="clickable" data-id="{{this.id}}"
|
||||||
data-operation="openActorSheet">{{this.name}}</td>
|
data-action="openActorSheet">{{this.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}{{#if this.countVIII}}
|
{{/if}}{{#if this.countVIII}}
|
||||||
|
|
@ -188,7 +188,7 @@
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}"
|
<td class="clickable" data-id="{{this.id}}"
|
||||||
data-operation="openActorSheet">{{this.name}}</td>
|
data-action="openActorSheet">{{this.name}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<td class="spell rollable">
|
<td class="spell rollable">
|
||||||
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="clickable" data-id="{{this.id}}" data-operation="openActorSheet">
|
<td class="clickable" data-id="{{this.id}}" data-action="openActorSheet">
|
||||||
<span>{{this.name}}</span></td>
|
<span>{{this.name}}</span></td>
|
||||||
<td>{{this.eigenschaft1}}</td>
|
<td>{{this.eigenschaft1}}</td>
|
||||||
<td>{{this.eigenschaft2}}</td>
|
<td>{{this.eigenschaft2}}</td>
|
||||||
|
|
|
||||||
|
|
@ -2,27 +2,6 @@
|
||||||
data-tab="{{tabs.inventory.id}}"
|
data-tab="{{tabs.inventory.id}}"
|
||||||
data-group="{{tabs.inventory.group}}">
|
data-group="{{tabs.inventory.group}}">
|
||||||
|
|
||||||
<table class="inventory-table">
|
{{> "systems/DSA_4-1/templates/ui/partial-equipment-button.hbs" inventoryItems}}
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2"></th>
|
|
||||||
<th>Anzahl</th>
|
|
||||||
<th>Gewicht</th>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
{{#each inventoryItems}}
|
|
||||||
<tr class="equipment" data-item-id="{{this.id}}" draggable="true">
|
|
||||||
<td class="icon"><img alt="" src="{{this.icon}}" width="16" height="16"></td>
|
|
||||||
<td class="name">{{this.name}}</td>
|
|
||||||
<td class="quantity">{{this.quantity}}</td>
|
|
||||||
<td class="weight">{{this.weight}}</td>
|
|
||||||
</tr>
|
|
||||||
{{/each}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
{{#each this.characters}}
|
{{#each this.characters}}
|
||||||
{{#if this.isVisible}}
|
{{#if this.isVisible}}
|
||||||
<div class="character">
|
<div class="character">
|
||||||
<div class="header clickable" data-id="{{this.id}}" data-operation="openActorSheet">
|
<div class="header clickable" data-id="{{this.id}}" data-action="openActorSheet">
|
||||||
<img class="profile-img" src="{{this.img}}" style="object-fit: cover;"
|
<img class="profile-img" src="{{this.img}}" style="object-fit: cover;"
|
||||||
title="{{this.name}}" alt="{{this.name}}"/>
|
title="{{this.name}}" alt="{{this.name}}"/>
|
||||||
<span class="name">{{this.name}}</span>
|
<span class="name">{{this.name}}</span>
|
||||||
|
|
@ -24,8 +24,7 @@
|
||||||
{{#each this.fields.head}}
|
{{#each this.fields.head}}
|
||||||
<th>
|
<th>
|
||||||
<div class="character">
|
<div class="character">
|
||||||
<div class="header clickable" data-id="{{this.id}}"
|
<div class="header clickable" data-id="{{this.id}}" data-action="openActorDocument">
|
||||||
data-operation="openActorSheet">
|
|
||||||
<img class="profile-img" src="{{this.img}}" style="object-fit: cover;"
|
<img class="profile-img" src="{{this.img}}" style="object-fit: cover;"
|
||||||
title="{{this.name}}" alt="{{this.name}}"/>
|
title="{{this.name}}" alt="{{this.name}}"/>
|
||||||
<span class="name">{{this.name}}</span>
|
<span class="name">{{this.name}}</span>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
{{#each this}}
|
{{#each this}}
|
||||||
<tr class="equipment" data-item-id="{{this.id}}" draggable="true">
|
<tr class="equipment" data-item-id="{{this.id}}" draggable="true" data-action="openEmbeddedDocument">
|
||||||
<td class="icon"><img alt="" src="{{this.icon}}" width="16" height="16"></td>
|
<td class="icon"><img alt="" src="{{this.icon}}" width="16" height="16"></td>
|
||||||
<td class="name">{{this.name}}</td>
|
<td class="name">{{this.name}}</td>
|
||||||
<td class="quantity">{{this.quantity}}</td>
|
<td class="quantity">{{this.quantity}}</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue