mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 21:21:08 +01:00
Simplified the handlebars templates for itemTransfer
This commit is contained in:
parent
d2768a2268
commit
5d0a59bd12
3 changed files with 8 additions and 11 deletions
|
|
@ -24,19 +24,16 @@ export default class ItemTransferDialog extends HandlebarsApplicationMixin(Appli
|
||||||
};
|
};
|
||||||
|
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
main: { template: 'systems/daggerheart/templates/dialogs/item-transfer/main.hbs' },
|
main: { template: 'systems/daggerheart/templates/dialogs/item-transfer.hbs' }
|
||||||
footer: { template: 'systems/daggerheart/templates/dialogs/item-transfer/footer.hbs' }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_attachPartListeners(partId, htmlElement, options) {
|
_attachPartListeners(partId, htmlElement, options) {
|
||||||
super._attachPartListeners(partId, htmlElement, options);
|
super._attachPartListeners(partId, htmlElement, options);
|
||||||
|
|
||||||
if (partId === 'main') {
|
htmlElement.querySelector('.number-display').addEventListener('change', event => {
|
||||||
htmlElement.querySelector('.number-display').addEventListener('change', event => {
|
this.quantity = isNaN(event.target.value) ? this.quantity : Number(event.target.value);
|
||||||
this.quantity = isNaN(event.target.value) ? this.quantity : Number(event.target.value);
|
this.render();
|
||||||
this.render();
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,7 @@
|
||||||
<input type="range" step="1" min="0" max="{{item.system.quantity}}" name="quantity" value="{{quantity}}" />
|
<input type="range" step="1" min="0" max="{{item.system.quantity}}" name="quantity" value="{{quantity}}" />
|
||||||
<input type="text" value="{{quantity}}" class="number-display" />
|
<input type="text" value="{{quantity}}" class="number-display" />
|
||||||
</div>
|
</div>
|
||||||
|
<footer class="item-sheet-footer">
|
||||||
|
<button type="button" data-action="finish">{{localize "DAGGERHEART.APPLICATIONS.ItemTransfer.transfer"}}</button>
|
||||||
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<footer class="item-sheet-footer">
|
|
||||||
<button type="button" data-action="finish">{{localize "DAGGERHEART.APPLICATIONS.ItemTransfer.transfer"}}</button>
|
|
||||||
</footer>
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue