Files
DiceCloud/rpg-docs/client/views/character/attacks/attackEditList/attackEditList.js
2015-04-22 12:44:25 +02:00

19 lines
369 B
JavaScript

Template.attackEditList.helpers({
attacks: function() {
var cursor = Attacks.find({"parent.id": this.parentId, charId: this.charId});
return cursor;
}
});
Template.attackEditList.events({
"tap #addAttackButton": function() {
Attacks.insert({
charId: this.charId,
parent: {
id: this.parentId,
collection: this.parentCollection
}
});
},
});