-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from draconas1/actionpointriders
#176 : Action Point Riders
- Loading branch information
Showing
7 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
export class ActionPointExtraDialog extends DocumentSheet { | ||
|
||
static get defaultOptions() { | ||
const options = super.defaultOptions; | ||
return mergeObject(options, { | ||
id: "action-point", | ||
classes: ["dnd4eBeta", "action-point"], | ||
template: "systems/dnd4e/templates/apps/action-point-extra.html", | ||
width: 500, | ||
closeOnSubmit: true | ||
}); | ||
} | ||
|
||
get title() { | ||
return `${this.object.name} - Action Point Riders`; | ||
} | ||
|
||
/** @override */ | ||
getData() { | ||
return {data: this.object.data.data} | ||
} | ||
|
||
async _updateObject(event, formData) { | ||
const updateData = {}; | ||
for(let data in formData) { updateData[`${data}`] = formData[`${data}`];} | ||
return this.object.update(updateData); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<form id="action-point-hd" class="dialog-content"> | ||
<p>Additional effects of spending an action point (from classes / features etc...). One per line</p> | ||
<textarea type="text" name="data.actionpoints.custom" value="{{data.actionpoints.custom}}" data-dtype="String" style="width: 100%; min-height: 10em; resize: vertical; border: none;" placeholder="Extra effects, 1 per line:" contentEditable>{{data.actionpoints.custom}}</textarea> | ||
<div class="dialog-buttons"> | ||
<button type="submit" name="submit">Update Action Point Riders</button> | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters