Made Attacks come from items

This commit is contained in:
Thaum
2015-03-09 14:03:11 +00:00
parent 40a050d88f
commit 55784d0e3b
17 changed files with 185 additions and 67 deletions

View File

@@ -0,0 +1,21 @@
Template.attackEditList.helpers({
attacks: function(){
var cursor = Attacks.find({sourceId: this.sourceId, type: this.type});
return cursor;
}
});
Template.attackEditList.events({
"tap #addAttackButton": function(){
if ( !_.isBoolean(this.enabled) ) {
this.enabled = true;
}
Attacks.insert({
name: this.name,
charId: this.charId,
sourceId: this.sourceId,
type: this.type,
enabled: this.enabled
});
},
});