Replaced restore with restoreNode for undo button

This commit is contained in:
Thaum
2015-04-07 11:40:54 +00:00
parent 67f08fc60f
commit 2fac76f702
2 changed files with 9 additions and 1 deletions

View File

@@ -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);
}
});

View File

@@ -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);