Foundry v13 migration
This commit is contained in:
@@ -4,7 +4,7 @@ import { YggdrasillUtility } from "./yggdrasill-utility.js";
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class YggdrasillItemSheet extends ItemSheet {
|
||||
export class YggdrasillItemSheet extends foundry.appv1.sheets.ItemSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -26,7 +26,7 @@ export class YggdrasillItemSheet extends ItemSheet {
|
||||
{
|
||||
class: "post",
|
||||
icon: "fas fa-comment",
|
||||
onclick: ev => {}
|
||||
onclick: ev => {}
|
||||
})
|
||||
return buttons
|
||||
}
|
||||
@@ -40,11 +40,11 @@ export class YggdrasillItemSheet extends ItemSheet {
|
||||
sheetBody.css("height", bodyHeight);
|
||||
return position;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = foundry.utils.duplicate(this.object);
|
||||
|
||||
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: objectData.id,
|
||||
@@ -56,7 +56,7 @@ export class YggdrasillItemSheet extends ItemSheet {
|
||||
data: foundry.utils.deepClone(this.object.system),
|
||||
optionsBase: YggdrasillUtility.createDirectOptionList(0, 20),
|
||||
optionsNiveaux4: Array.fromRange(5, 1),
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.description, {async: true}),
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
@@ -65,7 +65,7 @@ export class YggdrasillItemSheet extends ItemSheet {
|
||||
}
|
||||
return formData;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
@@ -73,7 +73,7 @@ export class YggdrasillItemSheet extends ItemSheet {
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
@@ -85,9 +85,9 @@ export class YggdrasillItemSheet extends ItemSheet {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.object.options.actor.deleteEmbeddedDocuments( "Item", [li.data("item-id") ] ).then( this.render(true));
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
get template()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user