Files
DiceCloud/rpg-docs/client/views/character/buffs/buffViewList/buffViewList.js
Jacob b3ef43eb70 Added ability to add/remove basic conditions
Conditions are those listed in ./lib/methods/conditions.js
2017-07-16 04:27:32 +01:00

29 lines
628 B
JavaScript

Template.buffViewList.helpers({
buffs: function(){
var selector = {
// "parent.id": this.parentId,
"charId": this._id,
};
// if (this.parentGroup){
// selector["parent.group"] = this.parentGroup;
// }
return Buffs.find(selector);
}
});
Template.buffViewList.events({
"click #addBuff": function(event, template){
pushDialogStack({
template: "conditionLibraryDialog",
element: event.currentTarget,
callback: (result) => {
if (!result) {
return;
}
else Meteor.call("giveCondition", this._id, result)
},
//returnElement: () => $(`[data-id='${itemId}']`).get(0),
})
},
});