implemented UI for new parenting

This commit is contained in:
Thaum
2015-03-20 09:12:38 +00:00
parent ecc43752aa
commit 48f8cef928
23 changed files with 126 additions and 99 deletions

View File

@@ -1,21 +1,19 @@
Template.attackEditList.helpers({
attacks: function(){
var cursor = Attacks.find({sourceId: this.sourceId, type: this.type});
var cursor = Attacks.find({"parent.id": this.parentId, type: this.type, charId: this.charId});
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,
parent: {
id: this.parentId,
collection: this.parentCollection
},
type: this.type,
enabled: this.enabled
});
},
});