diff --git a/rpg-docs/client/views/paperTemplates/undoToast/undoToast.js b/rpg-docs/client/views/paperTemplates/undoToast/undoToast.js index ac3d033d..25ff9b30 100644 --- a/rpg-docs/client/views/paperTemplates/undoToast/undoToast.js +++ b/rpg-docs/client/views/paperTemplates/undoToast/undoToast.js @@ -5,6 +5,6 @@ Template.undoToast.events({ console.warn("Collection with name ", this.collection, " could not be found"); return; } - collection.restore(this.id); + collection.restoreNode(this.id); } }); diff --git a/rpg-docs/lib/functions/parenting.js b/rpg-docs/lib/functions/parenting.js index 57d9ea5a..9b472c20 100644 --- a/rpg-docs/lib/functions/parenting.js +++ b/rpg-docs/lib/functions/parenting.js @@ -73,6 +73,14 @@ makeChild = function(collection, inheritedKeys){ } }); + collection.softRemoveNode = collection.softRemoveNode || function(id){ + collection.softRemove(id); + }; + + collection.restoreNode = collection.restoreNode || function(id){ + collection.restore(id); + }; + collection.attachSchema(childSchema); childCollections.push(collection);