Files
DiceCloud/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js
2015-03-04 10:17:32 +00:00

21 lines
442 B
JavaScript

Template.effectsEditList.helpers({
effects: function(){
var cursor = Effects.find({sourceId: this.sourceId, type: this.type});
return cursor;
}
});
Template.effectsEditList.events({
"tap #addEffectButton": function(){
if ( !_.isBoolean(this.enabled) ) {
this.enabled = true;
}
Effects.insert({
charId: this.charId,
sourceId: this.sourceId,
operation: "add",
type: this.type,
enabled: this.enabled
});
},
});