Fiche acteur, WIP
This commit is contained in:
@ -127,47 +127,7 @@ export class HeritiersItemSheet extends ItemSheet {
|
||||
html.find('.delete-subitem').click(ev => {
|
||||
this.deleteSubitem(ev);
|
||||
})
|
||||
html.find('.edit-predilection').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".prediction-item")
|
||||
let index = li.data("prediction-index")
|
||||
let pred = duplicate(this.object.system.predilections)
|
||||
pred[index].name = ev.currentTarget.value
|
||||
pred[index].id = pred[index].id || randomID(16)
|
||||
this.object.update( { 'system.predilections': pred })
|
||||
})
|
||||
html.find('.edit-predilection-description').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".prediction-item")
|
||||
let index = li.data("prediction-index")
|
||||
let pred = duplicate(this.object.system.predilections)
|
||||
pred[index].description = ev.currentTarget.value
|
||||
pred[index].id = pred[index].id || randomID(16)
|
||||
this.object.update( { 'system.predilections': pred })
|
||||
})
|
||||
html.find('.predilection-acquise').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".prediction-item")
|
||||
let index = li.data("prediction-index")
|
||||
let pred = duplicate(this.object.system.predilections)
|
||||
pred[index].acquise = ev.currentTarget.checked
|
||||
pred[index].id = pred[index].id || randomID(16)
|
||||
this.object.update( { 'system.predilections': pred })
|
||||
})
|
||||
html.find('.predilection-maitrise').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".prediction-item")
|
||||
let index = li.data("prediction-index")
|
||||
let pred = duplicate(this.object.system.predilections)
|
||||
pred[index].maitrise = ev.currentTarget.checked
|
||||
pred[index].id = pred[index].id || randomID(16)
|
||||
this.object.update( { 'system.predilections': pred })
|
||||
})
|
||||
html.find('.predilection-used').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".prediction-item")
|
||||
let index = li.data("prediction-index")
|
||||
let pred = duplicate(this.object.system.predilections)
|
||||
pred[index].used = ev.currentTarget.checked
|
||||
pred[index].id = pred[index].id || randomID(16)
|
||||
this.object.update( { 'system.predilections': pred })
|
||||
})
|
||||
|
||||
|
||||
html.find('#add-specialite').click(ev => {
|
||||
let spec = duplicate(this.object.system.specialites)
|
||||
spec.push( { name: "Nouvelle Spécialité", id: randomID(16), used: false })
|
||||
@ -180,6 +140,22 @@ export class HeritiersItemSheet extends ItemSheet {
|
||||
spec.splice(index,1)
|
||||
this.object.update( { 'system.specialites': spec })
|
||||
})
|
||||
html.find('.edit-specialite').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".specialite-item")
|
||||
let index = li.data("specialite-index")
|
||||
let spec = duplicate(this.object.system.specialites)
|
||||
spec[index].name = ev.currentTarget.value
|
||||
spec[index].id = spec[index].id || randomID(16)
|
||||
this.object.update( { 'system.specialites': spec })
|
||||
})
|
||||
html.find('.edit-specialite-description').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".specialite-item")
|
||||
let index = li.data("specialite-index")
|
||||
let spec = duplicate(this.object.system.specialites)
|
||||
spec[index].description = ev.currentTarget.value
|
||||
spec[index].id = spec[index].id || randomID(16)
|
||||
this.object.update( { 'system.specialites': spec })
|
||||
})
|
||||
|
||||
html.find('#add-automation').click(ev => {
|
||||
let autom = duplicate(this.object.system.automations)
|
||||
|
Reference in New Issue
Block a user