@@ -0,0 +1,13 @@
+Template.layout.onRendered(function () {
+ this.find('#main')._uihooks = {
+ insertElement: function (node, next) {
+ $(node).hide().insertBefore(next).fadeIn();
+ },
+
+ removeElement: function (node) {
+ $(node).fadeOut(function () {
+ this.remove();
+ });
+ }
+ };
+});
@@ -78,7 +78,8 @@ Router.route('/posts/:_id/edit', {
},
data: function () {
// "this" is the matched route.
- return Posts.findOne(this.params._id);
+ var ret = Posts.findOne(this.params._id);
+ return ret;
}
});