Make item list a grid for items and spells
This commit is contained in:
parent
0f1418d71b
commit
3867a23c2d
7 changed files with 147 additions and 155 deletions
|
@ -98,7 +98,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
|
|||
|
||||
// Update Inventory Item
|
||||
html.find(".item-edit").on("click", (ev) => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const li = $(ev.currentTarget).parents(".item-row");
|
||||
const id = li.data("itemId");
|
||||
const item = this.actor.getOwnedItem(id);
|
||||
if (!item) {
|
||||
|
@ -112,7 +112,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
|
|||
|
||||
// Delete Inventory Item
|
||||
html.find(".item-delete").on("click", (ev) => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const li = $(ev.currentTarget).parents(".item-row");
|
||||
this.actor.deleteOwnedItem(li.data("itemId"));
|
||||
li.slideUp(200, () => this.render(false));
|
||||
});
|
||||
|
@ -155,7 +155,7 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
|
|||
protected _onItemChange(ev: JQuery.ChangeEvent): void {
|
||||
ev.preventDefault();
|
||||
const el: HTMLFormElement = $(ev.currentTarget).get(0);
|
||||
const id = $(ev.currentTarget).parents(".item").data("itemId");
|
||||
const id = $(ev.currentTarget).parents(".item-row").data("itemId");
|
||||
const item = duplicate<DS4Item, "lenient">(this.actor.getOwnedItem(id));
|
||||
const property: string | undefined = $(ev.currentTarget).data("property");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue