Can now set target of buffs

...to "Self only", "Others only", or "Both".
This commit is contained in:
Jacob
2017-08-09 16:08:19 +01:00
parent c9fe2f17a0
commit 18e5ab3f21
3 changed files with 22 additions and 1 deletions

View File

@@ -4,6 +4,22 @@
<!--name-->
<paper-input id="buffNameInput" class="fullwidth" label="Name" value={{name}}></paper-input>
<div class="layout horizontal center wrap justified">
<paper-dropdown-menu class=flex label="Target" style="flex-basis: 150px; max-width: 200px;">
<dicecloud-selector selected={{target}} class="dropdown-content target-dropdown">
<paper-item name="self" style="width: 150px;">
Self only
</paper-item>
<paper-item name="others">
Others only
</paper-item>
<paper-item name="both">
Both
</paper-item>
</dicecloud-selector>
</paper-dropdown-menu>
</div>
<!--description-->
<paper-textarea label="Description" id="buffDescriptionInput" value={{description}}></paper-textarea>

View File

@@ -32,4 +32,10 @@ Template.customBuffEdit.events({
trimStrings: false,
});
}),
"iron-select .target-dropdown": function(event){
var detail = event.originalEvent.detail;
var value = detail.item.getAttribute("name");
if (value === this.target) return;
CustomBuffs.update(this._id, {$set: {target: value}});
},
});

View File

@@ -66,7 +66,6 @@ Template.customBuffView.events({
Proficiencies.insert(temp);
});
popDialogStack();
}
},
});