Background proficiencies now correctly open background dialog

Previously, when clicking on non-skill proficiencies from a character's
background, it would open a blank rectangle as its parent dialog. Now, it
correctly opens the Background dialog.
This commit is contained in:
Jacob
2017-07-18 23:01:14 +01:00
parent 1f0ea689dc
commit 24cc4fd2b1

View File

@@ -15,6 +15,22 @@ Template.proficiencyListItem.helpers({
Template.proficiencyListItem.events({
"click .proficiency": function(event, instance){
if (this.parent.collection == "Characters") {
if (this.parent.group == "background") {
pushDialogStack({
template: "backgroundDialog",
data: {
"charId": this.charId,
"field":"background",
"title":"Background",
"color":"j",
},
element: event.currentTarget,
})
return;
}
}
openParentDialog({
parent: this.parent,
charId: this.charId,