Added Soft remove and a character asset parenting system

This commit is contained in:
Thaum
2015-03-18 08:59:02 +00:00
parent 06b0ad7eba
commit 3656a0b66f
24 changed files with 215 additions and 121 deletions

View File

@@ -23,15 +23,8 @@ SpellLists.helpers({
}
});
SpellLists.before.remove(function (userId, list) {
if(Meteor.isServer){
Spells.remove({listId: list._id});
} else {
Spells.find({listId: list._id}).forEach(function(spell){
Spells.remove(spell._id);
});
}
});
SpellLists.attachBehaviour('softRemovable');
makeParent(SpellLists); //parents of spells
SpellLists.allow(CHARACTER_SUBSCHEMA_ALLOW);
SpellLists.deny(CHARACTER_SUBSCHEMA_DENY);