Files
DiceCloud/rpg-docs/client/views/paperTemplates/undoToast/undoToast.js
2017-01-12 15:28:59 +02:00

19 lines
374 B
JavaScript

Template.undoToast.events({
"tap #undoButton": function(event, instance){
var collection = window[this.collection];
if (!collection){
console.warn(
"Collection with name ",
this.collection,
" could not be found"
);
return;
}
if (collection.restoreNode){
collection.restoreNode(this.id);
} else {
collection.restore(this.id);
}
}
});